Updated Render patches, Bipeds now have the ability to have helmets, of either blocks, or the new 'heads'
This commit is contained in:
parent
fd1f09a34e
commit
c81f696cd7
2 changed files with 63 additions and 40 deletions
|
@ -11,26 +11,42 @@
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class RenderBiped extends RenderLiving
|
public class RenderBiped extends RenderLiving
|
||||||
@@ -35,7 +39,10 @@
|
@@ -161,9 +165,12 @@
|
||||||
GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
|
GL11.glPushMatrix();
|
||||||
float var4;
|
this.modelBipedMain.bipedHead.postRender(0.0625F);
|
||||||
|
|
||||||
- if (var3.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[var3.itemID].getRenderType()))
|
- if (var5.getItem().shiftedIndex < 256)
|
||||||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var3, EQUIPPED);
|
- {
|
||||||
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var3, BLOCK_3D));
|
- if (RenderBlocks.renderItemIn3d(Block.blocksList[var5.itemID].getRenderType()))
|
||||||
|
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var5, EQUIPPED);
|
||||||
|
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var5, BLOCK_3D));
|
||||||
+
|
+
|
||||||
+ if (var3.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var3.itemID].getRenderType())))
|
+ if (var5.getItem() instanceof ItemBlock)
|
||||||
{
|
+ {
|
||||||
var4 = 0.5F;
|
+ if (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var5.itemID].getRenderType()))
|
||||||
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
{
|
||||||
@@ -75,7 +82,10 @@
|
var6 = 0.625F;
|
||||||
|
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
|
||||||
|
@@ -205,7 +212,10 @@
|
||||||
|
this.modelBipedMain.bipedRightArm.postRender(0.0625F);
|
||||||
|
GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
|
||||||
|
|
||||||
if (var3.getItem().requiresMultipleRenderPasses())
|
- if (var4.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[var4.itemID].getRenderType()))
|
||||||
|
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var4, EQUIPPED);
|
||||||
|
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var4, BLOCK_3D));
|
||||||
|
+
|
||||||
|
+ if (var4.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var4.itemID].getRenderType())))
|
||||||
{
|
{
|
||||||
- this.renderManager.itemRenderer.renderItem(par1EntityLiving, var3, 1);
|
var6 = 0.5F;
|
||||||
+ for (int x = 1; x < var3.getItem().getRenderPasses(var3.getItemDamage()); x++)
|
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
||||||
|
@@ -252,7 +262,10 @@
|
||||||
|
|
||||||
|
if (var4.getItem().requiresMultipleRenderPasses())
|
||||||
|
{
|
||||||
|
- this.renderManager.itemRenderer.renderItem(par1EntityLiving, var4, 1);
|
||||||
|
+ for (int x = 1; x < var4.getItem().getRenderPasses(var4.getItemDamage()); x++)
|
||||||
+ {
|
+ {
|
||||||
+ this.renderManager.itemRenderer.renderItem(par1EntityLiving, var3, x);
|
+ this.renderManager.itemRenderer.renderItem(par1EntityLiving, var4, x);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,26 +22,33 @@
|
||||||
ModelBiped var7 = par2 == 2 ? this.modelArmor : this.modelArmorChestplate;
|
ModelBiped var7 = par2 == 2 ? this.modelArmor : this.modelArmorChestplate;
|
||||||
var7.bipedHead.showModel = par2 == 0;
|
var7.bipedHead.showModel = par2 == 0;
|
||||||
var7.bipedHeadwear.showModel = par2 == 0;
|
var7.bipedHeadwear.showModel = par2 == 0;
|
||||||
@@ -159,12 +165,14 @@
|
@@ -104,7 +110,7 @@
|
||||||
super.renderEquippedItems(par1EntityPlayer, par2);
|
if (var5 instanceof ItemArmor)
|
||||||
ItemStack var3 = par1EntityPlayer.inventory.armorItemInSlot(3);
|
|
||||||
|
|
||||||
- if (var3 != null && var3.getItem().shiftedIndex < 256)
|
|
||||||
+ if (var3 != null && var3.getItem() instanceof ItemBlock)
|
|
||||||
{
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
this.modelBipedMain.bipedHead.postRender(0.0625F);
|
|
||||||
-
|
|
||||||
- if (RenderBlocks.renderItemIn3d(Block.blocksList[var3.itemID].getRenderType()))
|
|
||||||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var3, EQUIPPED);
|
|
||||||
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var3, BLOCK_3D));
|
|
||||||
+
|
|
||||||
+ if (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var3.itemID].getRenderType()))
|
|
||||||
{
|
{
|
||||||
float var4 = 0.625F;
|
ItemArmor var6 = (ItemArmor)var5;
|
||||||
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
|
- this.loadTexture("/armor/" + armorFilenamePrefix[var6.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + "_b.png");
|
||||||
@@ -266,7 +274,10 @@
|
+ this.loadTexture(ForgeHooksClient.getArmorTexture(var4, "/armor/" + armorFilenamePrefix[var6.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + ".png"));
|
||||||
var20 = var21.getItemUseAction();
|
float var7 = 1.0F;
|
||||||
|
GL11.glColor3f(var7, var7, var7);
|
||||||
|
}
|
||||||
|
@@ -230,9 +236,12 @@
|
||||||
|
this.modelBipedMain.bipedHead.postRender(0.0625F);
|
||||||
|
float var5;
|
||||||
|
|
||||||
|
- if (var4.getItem().shiftedIndex < 256)
|
||||||
|
- {
|
||||||
|
- if (RenderBlocks.renderItemIn3d(Block.blocksList[var4.itemID].getRenderType()))
|
||||||
|
+ if (var4 != null && var4.getItem() instanceof ItemBlock)
|
||||||
|
+ {
|
||||||
|
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var4, EQUIPPED);
|
||||||
|
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var4, BLOCK_3D));
|
||||||
|
+
|
||||||
|
+ if (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var4.itemID].getRenderType()))
|
||||||
|
{
|
||||||
|
var5 = 0.625F;
|
||||||
|
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
|
||||||
|
@@ -349,7 +358,10 @@
|
||||||
|
var23 = var21.getItemUseAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (var21.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[var21.itemID].getRenderType()))
|
- if (var21.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[var21.itemID].getRenderType()))
|
||||||
|
@ -50,14 +57,14 @@
|
||||||
+
|
+
|
||||||
+ if (var21.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var21.itemID].getRenderType())))
|
+ if (var21.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var21.itemID].getRenderType())))
|
||||||
{
|
{
|
||||||
var6 = 0.5F;
|
var7 = 0.5F;
|
||||||
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
||||||
@@ -319,7 +330,7 @@
|
@@ -402,7 +414,7 @@
|
||||||
|
|
||||||
if (var21.getItem().requiresMultipleRenderPasses())
|
if (var21.getItem().requiresMultipleRenderPasses())
|
||||||
{
|
{
|
||||||
- for (int var25 = 0; var25 <= 1; ++var25)
|
- for (int var27 = 0; var27 <= 1; ++var27)
|
||||||
+ for (int var25 = 0; var25 < var21.getItem().getRenderPasses(var21.getItemDamage()); ++var25)
|
+ for (int var27 = 0; var27 <= var21.getItem().getRenderPasses(var21.getItemDamage()); ++var27)
|
||||||
{
|
{
|
||||||
int var24 = var21.getItem().getColorFromDamage(var21.getItemDamage(), var25);
|
int var26 = var21.getItem().func_82790_a(var21, var27);
|
||||||
float var26 = (float)(var24 >> 16 & 255) / 255.0F;
|
float var28 = (float)(var26 >> 16 & 255) / 255.0F;
|
||||||
|
|
Loading…
Reference in a new issue