mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 19:59:36 +00:00
Fix fabulous pool item render, move TE render color calc from awt
This commit is contained in:
1 parent
c65062dd53
commit
d365273ead
2 files changed
+4
-3
No files matched your search
@@ -62,8 +62,8 @@ public final class ColorHandler {
|
||||
}
|
||||
}
|
||||
if (((BlockPool) state.getBlock()).variant == BlockPool.Variant.FABULOUS){
|
||||
float time = ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks;
|
||||
int fabulousColor = MathHelper.hsvToRGB(time * 0.005F, 0.6F, 1F);
|
||||
float time = (ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) * 0.005F;
|
||||
int fabulousColor = MathHelper.hsvToRGB(time - (int) time, 0.6F, 1F);
|
||||
return MathHelper.multiplyColor(fabulousColor, color);
|
||||
}
|
||||
return color;
|
||||
|
||||
@@ -64,7 +64,8 @@ public class RenderTilePool extends TileEntityRenderer<TilePool> {
|
||||
if (fab) {
|
||||
float time = ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks;
|
||||
time += new Random(pool.getPos().getX() ^ pool.getPos().getY() ^ pool.getPos().getZ()).nextInt(100000);
|
||||
int color = MathHelper.multiplyColor(Color.HSBtoRGB(time * 0.005F, 0.6F, 1F), pool.color.colorValue);
|
||||
time *= 0.005F;
|
||||
int color = MathHelper.multiplyColor(MathHelper.hsvToRGB(time - (int) time, 0.6F, 1F), pool.color.colorValue);
|
||||
|
||||
int red = (color & 0xFF0000) >> 16;
|
||||
int green = (color & 0xFF00) >> 8;
|
||||
|
||||
Reference in new issue
Block a user