mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Merge pull request #1602 from Chicken-Bones/1.8
Allow blocks to render in multiple layers
This commit is contained in:
commit
dcabad2bd1
4 files changed
+42
-1
No files matched your search
@@ -26,6 +26,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.IRegistry;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -272,6 +273,12 @@ public class ForgeHooksClient
|
||||
renderPass = pass;
|
||||
}
|
||||
|
||||
static EnumWorldBlockLayer renderLayer = EnumWorldBlockLayer.SOLID;
|
||||
public static void setRenderLayer(EnumWorldBlockLayer layer)
|
||||
{
|
||||
renderLayer = layer;
|
||||
}
|
||||
|
||||
public static ModelBase getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int slotID, ModelBase _default)
|
||||
{
|
||||
ModelBase modelbase = itemStack.getItem().getArmorModel(entityLiving, itemStack, slotID);
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.google.common.collect.Maps;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
||||
|
||||
public class MinecraftForgeClient
|
||||
@@ -46,6 +47,11 @@ public class MinecraftForgeClient
|
||||
return ForgeHooksClient.renderPass;
|
||||
}
|
||||
|
||||
public static EnumWorldBlockLayer getRenderLayer()
|
||||
{
|
||||
return ForgeHooksClient.renderLayer;
|
||||
}
|
||||
|
||||
private static BitSet stencilBits = new BitSet(8);
|
||||
static
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user