MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / updateWaterFX

Method updateWaterFX

src/main/java/net/optifine/CustomColors.java:1135–1161  ·  view source on GitHub ↗
(EntityFX fx, IBlockAccess blockAccess, double x, double y, double z, RenderEnv renderEnv)

Source from the content-addressed store, hash-verified

1133 }
1134
1135 public static void updateWaterFX(EntityFX fx, IBlockAccess blockAccess, double x, double y, double z, RenderEnv renderEnv)
1136 {
1137 if (waterColors != null || blockColormaps != null || particleWaterColor >= 0)
1138 {
1139 BlockPos blockpos = new BlockPos(x, y, z);
1140 renderEnv.reset(BLOCK_STATE_WATER, blockpos);
1141 int i = getFluidColor(blockAccess, BLOCK_STATE_WATER, blockpos, renderEnv);
1142 int j = i >> 16 & 255;
1143 int k = i >> 8 & 255;
1144 int l = i & 255;
1145 float f = (float)j / 255.0F;
1146 float f1 = (float)k / 255.0F;
1147 float f2 = (float)l / 255.0F;
1148
1149 if (particleWaterColor >= 0)
1150 {
1151 int i1 = particleWaterColor >> 16 & 255;
1152 int j1 = particleWaterColor >> 8 & 255;
1153 int k1 = particleWaterColor & 255;
1154 f *= (float)i1 / 255.0F;
1155 f1 *= (float)j1 / 255.0F;
1156 f2 *= (float)k1 / 255.0F;
1157 }
1158
1159 fx.setRBGColorF(f, f1, f2);
1160 }
1161 }
1162
1163 private static int getLilypadColorMultiplier(IBlockAccess blockAccess, BlockPos blockPos)
1164 {

Callers 1

spawnEntityFXMethod · 0.95

Calls 3

getFluidColorMethod · 0.95
setRBGColorFMethod · 0.80
resetMethod · 0.65

Tested by

no test coverage detected