mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 19:15:32 +00:00
made renderLayer ThreadLocal, now it should hold correct value for use inside custom baked models
This commit is contained in:
1 parent
9a6fb600ec
commit
2419d4913b
2 files changed
+10
-3
No files matched your search
@@ -295,10 +295,17 @@ public class ForgeHooksClient
|
||||
renderPass = pass;
|
||||
}
|
||||
|
||||
static EnumWorldBlockLayer renderLayer = EnumWorldBlockLayer.SOLID;
|
||||
static final ThreadLocal<EnumWorldBlockLayer> renderLayer = new ThreadLocal<EnumWorldBlockLayer>()
|
||||
{
|
||||
protected EnumWorldBlockLayer initialValue()
|
||||
{
|
||||
return EnumWorldBlockLayer.SOLID;
|
||||
}
|
||||
};
|
||||
|
||||
public static void setRenderLayer(EnumWorldBlockLayer layer)
|
||||
{
|
||||
renderLayer = layer;
|
||||
renderLayer.set(layer);
|
||||
}
|
||||
|
||||
public static ModelBase getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int slotID, ModelBase _default)
|
||||
|
||||
@@ -49,7 +49,7 @@ public class MinecraftForgeClient
|
||||
|
||||
public static EnumWorldBlockLayer getRenderLayer()
|
||||
{
|
||||
return ForgeHooksClient.renderLayer;
|
||||
return ForgeHooksClient.renderLayer.get();
|
||||
}
|
||||
|
||||
private static BitSet stencilBits = new BitSet(8);
|
||||
|
||||
Reference in new issue
Block a user