mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 06:53:20 +00:00
New hook to allow Items to provide there own armor models. Closes #487
This commit is contained in:
1 parent
0034a0c6c2
commit
2ee07bb250
4 files changed
+56
-17
No files matched your search
@@ -21,6 +21,7 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.RenderEngine;
|
||||
import net.minecraft.client.renderer.RenderGlobal;
|
||||
@@ -259,4 +260,10 @@ public class ForgeHooksClient
|
||||
{
|
||||
renderPass = pass;
|
||||
}
|
||||
|
||||
public static ModelBiped getArmorModel(EntityLiving entityLiving, ItemStack itemStack, int slotID, ModelBiped _default)
|
||||
{
|
||||
ModelBiped modelbiped = itemStack.getItem().getArmorModel(entityLiving, itemStack, slotID);
|
||||
return modelbiped == null ? _default : modelbiped;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user