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

Method updateReddustFX

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

Source from the content-addressed store, hash-verified

1051 }
1052
1053 public static void updateReddustFX(EntityFX fx, IBlockAccess blockAccess, double x, double y, double z)
1054 {
1055 if (redstoneColors != null)
1056 {
1057 IBlockState iblockstate = blockAccess.getBlockState(new BlockPos(x, y, z));
1058 int i = getRedstoneLevel(iblockstate, 15);
1059 int j = redstoneColors.getColor(i);
1060 int k = j >> 16 & 255;
1061 int l = j >> 8 & 255;
1062 int i1 = j & 255;
1063 float f = (float)k / 255.0F;
1064 float f1 = (float)l / 255.0F;
1065 float f2 = (float)i1 / 255.0F;
1066 fx.setRBGColorF(f, f1, f2);
1067 }
1068 }
1069
1070 private static int getRedstoneLevel(IBlockState state, int def)
1071 {

Callers 1

spawnEntityFXMethod · 0.95

Calls 4

getRedstoneLevelMethod · 0.95
setRBGColorFMethod · 0.80
getBlockStateMethod · 0.65
getColorMethod · 0.65

Tested by

no test coverage detected