@@ -58,13 +58,13 @@ public static int pulseColor(int source, float speed, int magnitude) {
5858
5959 public static int pulseColor (int source , float multiplier , float speed , int magnitude ) {
6060 int add = (int ) (Mth .sin (ClientTickHandler .ticksInGame * speed ) * magnitude );
61- int red = (0xFF0000 & source ) >> 16 ;
62- int green = (0x00FF00 & source ) >> 8 ;
63- int blue = 0x0000FF & source ;
61+ int red = (0x00FF0000 & source ) >> 16 ;
62+ int green = (0x0000FF00 & source ) >> 8 ;
63+ int blue = 0x000000FF & source ;
6464 int addedRed = Mth .clamp ((int ) (multiplier * (red + add )), 0 , 255 );
6565 int addedGreen = Mth .clamp ((int ) (multiplier * (green + add )), 0 , 255 );
6666 int addedBlue = Mth .clamp ((int ) (multiplier * (blue + add )), 0 , 255 );
67- return (addedRed << 16 ) | (addedGreen << 8 ) | addedBlue ;
67+ return 0xFF000000 | (addedRed << 16 ) | (addedGreen << 8 ) | addedBlue ;
6868 }
6969
7070 public static int slideColorTime (int color , int secondColor , float t ) {
@@ -75,17 +75,17 @@ public static int slideColorTime(int color, int secondColor, float t) {
7575 return secondColor ;
7676 }
7777
78- int redA = (0xFF0000 & color ) >> 16 ;
79- int greenA = (0x00FF00 & color ) >> 8 ;
80- int blueA = 0x0000FF & color ;
81- int redB = (0xFF0000 & secondColor ) >> 16 ;
82- int greenB = (0x00FF00 & secondColor ) >> 8 ;
83- int blueB = 0x0000FF & secondColor ;
78+ int redA = (0x00FF0000 & color ) >> 16 ;
79+ int greenA = (0x0000FF00 & color ) >> 8 ;
80+ int blueA = 0x000000FF & color ;
81+ int redB = (0x00FF0000 & secondColor ) >> 16 ;
82+ int greenB = (0x0000FF00 & secondColor ) >> 8 ;
83+ int blueB = 0x000000FF & secondColor ;
8484
8585 int newRed = (int ) (redA * (1 - shift ) + redB * shift );
8686 int newGreen = (int ) (greenA * (1 - shift ) + greenB * shift );
8787 int newBlue = (int ) (blueA * (1 - shift ) + blueB * shift );
88- return (newRed << 16 ) | (newGreen << 8 ) | newBlue ;
88+ return 0xFF000000 | (newRed << 16 ) | (newGreen << 8 ) | newBlue ;
8989 }
9090
9191}
0 commit comments