mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 12:19:46 +00:00
Fix armor rendering - thanks primetoxinz for the find!
This commit is contained in:
1 parent
906fb74ec0
commit
f7e5054bf4
5 files changed
+41
-36
No files matched your search
@@ -211,21 +211,21 @@ public class ModelArmorElementium extends ModelBiped {
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
helm.showModel = slot == 0;
|
||||
body.showModel = slot == 1;
|
||||
armR.showModel = slot == 1;
|
||||
armL.showModel = slot == 1;
|
||||
legR.showModel = slot == 2;
|
||||
legL.showModel = slot == 2;
|
||||
bootL.showModel = slot == 3;
|
||||
bootR.showModel = slot == 3;
|
||||
helm.showModel = slot == 3; // 1.8: now reversed. Yay mojang.
|
||||
body.showModel = slot == 2;
|
||||
armR.showModel = slot == 2;
|
||||
armL.showModel = slot == 2;
|
||||
legR.showModel = slot == 1;
|
||||
legL.showModel = slot == 1;
|
||||
bootL.showModel = slot == 0;
|
||||
bootR.showModel = slot == 0;
|
||||
bipedHeadwear.showModel = false;
|
||||
|
||||
bipedHead = helm;
|
||||
bipedBody = body;
|
||||
bipedRightArm = armR;
|
||||
bipedLeftArm = armL;
|
||||
if(slot == 2) {
|
||||
if(slot == 1) {
|
||||
bipedRightLeg = legR;
|
||||
bipedLeftLeg = legL;
|
||||
} else {
|
||||
@@ -240,6 +240,7 @@ public class ModelArmorElementium extends ModelBiped {
|
||||
public void prepareForRender(Entity entity) {
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
isSneak = living != null ? living.isSneaking() : false;
|
||||
isChild = living != null ? living.isChild() : false;
|
||||
if(living != null && living instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) living;
|
||||
|
||||
|
||||
@@ -141,21 +141,21 @@ public class ModelArmorManasteel extends ModelBiped {
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
helm.showModel = slot == 0;
|
||||
body.showModel = slot == 1;
|
||||
armR.showModel = slot == 1;
|
||||
armL.showModel = slot == 1;
|
||||
legR.showModel = slot == 2;
|
||||
legL.showModel = slot == 2;
|
||||
bootL.showModel = slot == 3;
|
||||
bootR.showModel = slot == 3;
|
||||
helm.showModel = slot == 3; // 1.8: now reversed. yay mojang.
|
||||
body.showModel = slot == 2;
|
||||
armR.showModel = slot == 2;
|
||||
armL.showModel = slot == 2;
|
||||
legR.showModel = slot == 1;
|
||||
legL.showModel = slot == 1;
|
||||
bootL.showModel = slot == 0;
|
||||
bootR.showModel = slot == 0;
|
||||
bipedHeadwear.showModel = false;
|
||||
|
||||
bipedHead = helm;
|
||||
bipedBody = body;
|
||||
bipedRightArm = armR;
|
||||
bipedLeftArm = armL;
|
||||
if(slot == 2) {
|
||||
if(slot == 1) {
|
||||
bipedRightLeg = legR;
|
||||
bipedLeftLeg = legL;
|
||||
} else {
|
||||
@@ -170,6 +170,7 @@ public class ModelArmorManasteel extends ModelBiped {
|
||||
public void prepareForRender(Entity entity) {
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
isSneak = living != null ? living.isSneaking() : false;
|
||||
isChild = living != null ? living.isChild() : false;
|
||||
if(living != null && living instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) living;
|
||||
|
||||
|
||||
@@ -141,21 +141,21 @@ public class ModelArmorManaweave extends ModelBiped {
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
helm.showModel = slot == 0;
|
||||
body.showModel = slot == 1;
|
||||
armR.showModel = slot == 1;
|
||||
armL.showModel = slot == 1;
|
||||
legR.showModel = slot == 2;
|
||||
legL.showModel = slot == 2;
|
||||
bootL.showModel = slot == 3;
|
||||
bootR.showModel = slot == 3;
|
||||
helm.showModel = slot == 3; // 1.8: now reversed. yay mojang.
|
||||
body.showModel = slot == 2;
|
||||
armR.showModel = slot == 2;
|
||||
armL.showModel = slot == 2;
|
||||
legR.showModel = slot == 1;
|
||||
legL.showModel = slot == 1;
|
||||
bootL.showModel = slot == 0;
|
||||
bootR.showModel = slot == 0;
|
||||
bipedHeadwear.showModel = false;
|
||||
|
||||
bipedHead = helm;
|
||||
bipedBody = body;
|
||||
bipedRightArm = armR;
|
||||
bipedLeftArm = armL;
|
||||
if(slot == 2) {
|
||||
if(slot == 1) {
|
||||
bipedRightLeg = legR;
|
||||
bipedLeftLeg = legL;
|
||||
} else {
|
||||
@@ -170,6 +170,7 @@ public class ModelArmorManaweave extends ModelBiped {
|
||||
public void prepareForRender(Entity entity) {
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
isSneak = living != null ? living.isSneaking() : false;
|
||||
isChild = living != null ? living.isChild() : false;
|
||||
if(living != null && living instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) living;
|
||||
|
||||
|
||||
@@ -232,21 +232,21 @@ public class ModelArmorTerrasteel extends ModelBiped {
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
helm.showModel = slot == 0;
|
||||
body.showModel = slot == 1;
|
||||
armr.showModel = slot == 1;
|
||||
armL.showModel = slot == 1;
|
||||
legR.showModel = slot == 2;
|
||||
legL.showModel = slot == 2;
|
||||
bootL.showModel = slot == 3;
|
||||
bootR.showModel = slot == 3;
|
||||
helm.showModel = slot == 3; // 1.8: now reversed. yay mojang.
|
||||
body.showModel = slot == 2;
|
||||
armr.showModel = slot == 2;
|
||||
armL.showModel = slot == 2;
|
||||
legR.showModel = slot == 1;
|
||||
legL.showModel = slot == 1;
|
||||
bootL.showModel = slot == 0;
|
||||
bootR.showModel = slot == 0;
|
||||
bipedHeadwear.showModel = false;
|
||||
|
||||
bipedHead = helm;
|
||||
bipedBody = body;
|
||||
bipedRightArm = armr;
|
||||
bipedLeftArm = armL;
|
||||
if(slot == 2) {
|
||||
if(slot == 1) {
|
||||
bipedRightLeg = legR;
|
||||
bipedLeftLeg = legL;
|
||||
} else {
|
||||
@@ -261,6 +261,7 @@ public class ModelArmorTerrasteel extends ModelBiped {
|
||||
public void prepareForRender(Entity entity) {
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
isSneak = living != null ? living.isSneaking() : false;
|
||||
isChild = living != null ? living.isChild() : false;
|
||||
if(living != null && living instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) living;
|
||||
|
||||
|
||||
+1
@@ -117,6 +117,7 @@ public class ItemManasteelArmor extends ItemArmor implements ISpecialArmor, IMan
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
if(ConfigHandler.enableArmorModels) {
|
||||
armorSlot--; // 1.8: mojang is dumb and made armorSlot 1-4 instead of 0-3.
|
||||
ModelBiped model = getArmorModelForSlot(entityLiving, itemStack, armorSlot);
|
||||
if(model == null)
|
||||
model = provideArmorModelForSlot(itemStack, armorSlot);
|
||||
|
||||
Reference in new issue
Block a user