Merge branch 'main' into 'main'
Fix querying block colors at constant position. See merge request jeseibel/minecraft-lod-mod!34
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ public class ClientBlockDetailMap
|
||||
|
||||
public int getColor(BlockState state, BiomeWrapper biome, DhBlockPos pos)
|
||||
{
|
||||
return getBlockStateData(state, pos).getAndResolveFaceColor(biome);
|
||||
return getBlockStateData(state, pos).getAndResolveFaceColor(biome, pos);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -211,12 +211,12 @@ public class ClientBlockStateCache
|
||||
isColorResolved = true;
|
||||
}
|
||||
|
||||
public int getAndResolveFaceColor(BiomeWrapper biome)
|
||||
public int getAndResolveFaceColor(BiomeWrapper biome, DhBlockPos pos)
|
||||
{
|
||||
// FIXME: impl per-face colors
|
||||
if (!needPostTinting) return baseColor;
|
||||
int tintColor = Minecraft.getInstance().getBlockColors()
|
||||
.getColor(state, new TintWithoutLevelOverrider(biome), pos, tintIndex);
|
||||
.getColor(state, new TintWithoutLevelOverrider(biome), McObjectConverter.Convert(pos), tintIndex);
|
||||
if (tintColor == -1) return baseColor;
|
||||
return ColorUtil.multiplyARGBwithRGB(baseColor, tintColor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user