Fluid color in cell changes color based on biome's water color + some other fixes and changes

This commit is contained in:
modmuss50 2019-07-28 17:29:01 +01:00
parent 0da3168bbf
commit b89a52e594
2 changed files with 11 additions and 3 deletions

View file

@ -85,7 +85,7 @@ public class DynamicCellBakedModel implements BakedModel, FabricBakedModel {
if(fluid != Fluids.EMPTY){
FluidRenderHandler fluidRenderHandler = FluidRenderHandlerRegistry.INSTANCE.get(fluid);
if(fluidRenderHandler != null){
int color = fluidRenderHandler.getFluidColor(MinecraftClient.getInstance().world, BlockPos.ORIGIN, fluid.getDefaultState());
int color = fluidRenderHandler.getFluidColor(MinecraftClient.getInstance().world, MinecraftClient.getInstance().player.getBlockPos(), fluid.getDefaultState());
//Does maths that works
color = new Color((float)(color >> 16 & 255) / 255.0F, (float)(color >> 8 & 255) / 255.0F,(float)(color & 255) / 255.0F).getRGB();