Skip to content

Commit

Permalink
tweak: clamp red adjustment to 0x98
Browse files Browse the repository at this point in the history
  • Loading branch information
sylv256 committed Oct 12, 2024
1 parent c63b097 commit a64e917
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private int saturateBlockTint(ColorResolver colorResolver, Biome biome, double x
int tint = original.call(colorResolver, biome, x, z);
int red = ((tint & 0x00FF0000)) >> 16;
red += 0x28;
red = Math.clamp(red, 0, 0xFF);
red = Math.clamp(red, 0, 0x98);
int green = ((tint & 0x0000FF00)) >> 8;
green += 0x28;
green = Math.clamp(green, 0, 0xFF); // prevent overflow/underflow
Expand Down

0 comments on commit a64e917

Please sign in to comment.