diff --git a/src/main/java/com/hbm/items/armor/ArmorModel.java b/src/main/java/com/hbm/items/armor/ArmorModel.java index 88eed031d..8158f539a 100644 --- a/src/main/java/com/hbm/items/armor/ArmorModel.java +++ b/src/main/java/com/hbm/items/armor/ArmorModel.java @@ -1,6 +1,7 @@ package com.hbm.items.armor; import java.util.List; +import java.util.stream.IntStream; import org.lwjgl.opengl.GL11; @@ -10,7 +11,6 @@ import com.hbm.lib.RefStrings; import com.hbm.render.model.ModelCloak; import com.hbm.render.model.ModelGoggles; import com.hbm.render.model.ModelHat; -import com.hbm.render.model.ModelM65; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -32,20 +32,16 @@ import net.minecraft.util.ResourceLocation; public class ArmorModel extends ItemArmor { @SideOnly(Side.CLIENT) - private ModelGoggles modelGoggles; + private static final ModelGoggles modelGoggles = new ModelGoggles(); @SideOnly(Side.CLIENT) - private ModelCloak modelCloak; + private static final ModelHat modelHat = new ModelHat(0); @SideOnly(Side.CLIENT) - private ModelM65 modelM65; + private static final ModelCloak modelCloak = new ModelCloak(); + @SideOnly(Side.CLIENT) - private ModelHat modelHat; - @Spaghetti("replace this garbage with an array") - private ResourceLocation goggleBlur0 = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_goggles_0.png"); - private ResourceLocation goggleBlur1 = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_goggles_1.png"); - private ResourceLocation goggleBlur2 = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_goggles_2.png"); - private ResourceLocation goggleBlur3 = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_goggles_3.png"); - private ResourceLocation goggleBlur4 = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_goggles_4.png"); - private ResourceLocation goggleBlur5 = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_goggles_5.png"); + private final ResourceLocation[] gogglesBlurs = IntStream.range(0, 6) + .mapToObj(i -> new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_goggles_" + i + ".png")) + .toArray(ResourceLocation[]::new); public ArmorModel(ArmorMaterial armorMaterial, int armorType) { super(armorMaterial, 0, armorType); @@ -56,26 +52,17 @@ public class ArmorModel extends ItemArmor { public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { if(this == ModItems.goggles) { if(armorSlot == 0) { - if(this.modelGoggles == null) { - this.modelGoggles = new ModelGoggles(); - } - return this.modelGoggles; + return modelGoggles; } } if(this == ModItems.hat) { if(armorSlot == 0) { - if(this.modelHat == null) { - this.modelHat = new ModelHat(0); - } - return this.modelHat; + return modelHat; } } if(this == ModItems.cape_radiation || this == ModItems.cape_gasmask || this == ModItems.cape_schrabidium || this == ModItems.cape_hidden) { if(armorSlot == 1) { - if(this.modelCloak == null) { - this.modelCloak = new ModelCloak(); - } - return this.modelCloak; + return modelCloak; } } return null; @@ -110,45 +97,29 @@ public class ArmorModel extends ItemArmor { GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_DEPTH_TEST); - GL11.glDepthMask(false); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_ALPHA_TEST); - switch((int) ((double) stack.getItemDamage() / (double) stack.getMaxDamage() * 6D)) { - case 0: - Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur0); - break; - case 1: - Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur1); - break; - case 2: - Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur2); - break; - case 3: - Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur3); - break; - case 4: - Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur4); - break; - case 5: - Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur5); - break; - default: - Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur5); - break; - } + GL11.glDepthMask(false); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO); + + int blurTextureIndex = (int) ((double) stack.getItemDamage() / (double) stack.getMaxDamage() * 6D); + if (blurTextureIndex < 0 || blurTextureIndex > 5) + blurTextureIndex = 5; + + Minecraft.getMinecraft().getTextureManager().bindTexture(gogglesBlurs[blurTextureIndex]); Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); - tessellator.addVertexWithUV(0.0D, (double) resolution.getScaledHeight(), -90.0D, 0.0D, 1.0D); - tessellator.addVertexWithUV((double) resolution.getScaledWidth(), (double) resolution.getScaledHeight(), -90.0D, 1.0D, 1.0D); - tessellator.addVertexWithUV((double) resolution.getScaledWidth(), 0.0D, -90.0D, 1.0D, 0.0D); + tessellator.addVertexWithUV(0.0D, resolution.getScaledHeight(), -90.0D, 0.0D, 1.0D); + tessellator.addVertexWithUV(resolution.getScaledWidth(), resolution.getScaledHeight(), -90.0D, 1.0D, 1.0D); + tessellator.addVertexWithUV(resolution.getScaledWidth(), 0.0D, -90.0D, 1.0D, 0.0D); tessellator.addVertexWithUV(0.0D, 0.0D, -90.0D, 0.0D, 0.0D); tessellator.draw(); + GL11.glDepthMask(true); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_ALPHA_TEST); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glDisable(GL11.GL_BLEND); } @Override diff --git a/src/main/java/com/hbm/render/entity/mob/RenderHunterChopper.java b/src/main/java/com/hbm/render/entity/mob/RenderHunterChopper.java index 0fac7dd10..cfa1cab78 100644 --- a/src/main/java/com/hbm/render/entity/mob/RenderHunterChopper.java +++ b/src/main/java/com/hbm/render/entity/mob/RenderHunterChopper.java @@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11; import com.hbm.entity.mob.EntityHunterChopper; import com.hbm.lib.RefStrings; import com.hbm.render.model.ModelHunterChopper; -import com.hbm.render.model.ProtoCopter; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; @@ -14,39 +13,35 @@ import net.minecraft.util.ResourceLocation; public class RenderHunterChopper extends Render { - ProtoCopter mine; - ModelHunterChopper mine2; + private static final ResourceLocation chopperTexture = new ResourceLocation(RefStrings.MODID + ":textures/entity/chopper.png"); + private final ModelHunterChopper chopperModel = new ModelHunterChopper(); - public RenderHunterChopper() { - mine = new ProtoCopter(); - mine2 = new ModelHunterChopper(); - } + @Override + public void doRender(Entity entity, double x, double y, double z, float entityYaw, float partialTicks) { + + BossStatus.setBossStatus((EntityHunterChopper) entity, true); + GL11.glPushMatrix(); + GL11.glTranslated(x, y, z); + GL11.glTranslatef(0.0625F * 0, 0.0625F * 32, 0.0625F * 0); + GL11.glTranslatef(0.0625F * 0, 0.0625F * 12, 0.0625F * 0); + GL11.glScalef(4F, 4F, 4F); + GL11.glRotatef(180, 1, 0, 0); + + GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * partialTicks - 90.0F, 0, 1.0F, 0); + GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTicks, 0, 0, 1.0F); + + this.bindTexture(chopperTexture); - @Override - public void doRender(Entity rocket, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, - float p_76986_9_) { - BossStatus.setBossStatus((EntityHunterChopper)rocket, true); - GL11.glPushMatrix(); - GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_); - GL11.glTranslatef(0.0625F * 0, 0.0625F * 32, 0.0625F * 0); - GL11.glTranslatef(0.0625F * 0, 0.0625F * 12, 0.0625F * 0); - GL11.glScalef(4F, 4F, 4F); - GL11.glRotatef(180, 1, 0, 0); - - GL11.glRotatef(rocket.prevRotationYaw + (rocket.rotationYaw - rocket.prevRotationYaw) * p_76986_9_ - 90.0F, 0, 1.0F, 0); - GL11.glRotatef(rocket.prevRotationPitch + (rocket.rotationPitch - rocket.prevRotationPitch) * p_76986_9_, 0, 0, 1.0F); - - bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/chopper.png")); - //if(rocket instanceof EntityHunterChopper) - // mine2.setGunRotations((EntityHunterChopper)rocket, yaw, pitch); - - mine2.renderAll(0.0625F); - GL11.glPopMatrix(); - } + // mine2.setGunRotations((EntityHunterChopper)rocket, yaw, pitch); + + this.chopperModel.renderAll(0.0625F); + GL11.glPopMatrix(); + } @Override protected ResourceLocation getEntityTexture(Entity p_110775_1_) { - return new ResourceLocation(RefStrings.MODID + ":textures/entity/chopper.png"); + + return chopperTexture; } } diff --git a/src/main/java/com/hbm/render/model/ModelArmorAJR.java b/src/main/java/com/hbm/render/model/ModelArmorAJR.java index 5beb058c7..22f56a97b 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorAJR.java +++ b/src/main/java/com/hbm/render/model/ModelArmorAJR.java @@ -5,54 +5,54 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; public class ModelArmorAJR extends ModelArmorBase { - + public ModelArmorAJR(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_ajr, "Head"); - body = new ModelRendererObj(ResourceManager.armor_ajr, "Body"); - leftArm = new ModelRendererObj(ResourceManager.armor_ajr, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_ajr, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_ajr, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_ajr, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_ajr, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_ajr, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_ajr, "Head"); + this.body = new ModelRendererObj(ResourceManager.armor_ajr, "Body"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_ajr, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_ajr, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_ajr, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_ajr, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_ajr, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_ajr, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); GL11.glShadeModel(GL11.GL_SMOOTH); - - if(type == 0) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajr_helmet); - head.render(par7); + + if(this.type == 0) { + bindTexture(ResourceManager.ajr_helmet); + this.head.render(scaleFactor); } - if(type == 1) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajr_chest); - body.render(par7); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajr_arm); - leftArm.render(par7); - rightArm.render(par7); + if(this.type == 1) { + bindTexture(ResourceManager.ajr_chest); + this.body.render(scaleFactor); + + bindTexture(ResourceManager.ajr_arm); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); } - if(type == 2) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajr_leg); - leftLeg.render(par7); - rightLeg.render(par7); + if(this.type == 2) { + bindTexture(ResourceManager.ajr_leg); + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); } - if(type == 3) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajr_leg); - leftFoot.render(par7); - rightFoot.render(par7); + if(this.type == 3) { + bindTexture(ResourceManager.ajr_leg); + this.leftFoot.render(scaleFactor); + this.rightFoot.render(scaleFactor); } - + GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); } diff --git a/src/main/java/com/hbm/render/model/ModelArmorAJRO.java b/src/main/java/com/hbm/render/model/ModelArmorAJRO.java index 7d7b2676c..ea650811b 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorAJRO.java +++ b/src/main/java/com/hbm/render/model/ModelArmorAJRO.java @@ -5,54 +5,54 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; public class ModelArmorAJRO extends ModelArmorBase { - + public ModelArmorAJRO(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_ajr, "Head"); - body = new ModelRendererObj(ResourceManager.armor_ajr, "Body"); - leftArm = new ModelRendererObj(ResourceManager.armor_ajr, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_ajr, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_ajr, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_ajr, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_ajr, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_ajr, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_ajr, "Head"); + this.body = new ModelRendererObj(ResourceManager.armor_ajr, "Body"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_ajr, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_ajr, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_ajr, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_ajr, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_ajr, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_ajr, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); GL11.glShadeModel(GL11.GL_SMOOTH); - - if(type == 0) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajro_helmet); - head.render(par7); + + if(this.type == 0) { + bindTexture(ResourceManager.ajro_helmet); + this.head.render(scaleFactor); } - if(type == 1) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajro_chest); - body.render(par7); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajro_arm); - leftArm.render(par7); - rightArm.render(par7); + if(this.type == 1) { + bindTexture(ResourceManager.ajro_chest); + this.body.render(scaleFactor); + + bindTexture(ResourceManager.ajro_arm); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); } - if(type == 2) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajro_leg); - leftLeg.render(par7); - rightLeg.render(par7); + if(this.type == 2) { + bindTexture(ResourceManager.ajro_leg); + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); } - if(type == 3) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajro_leg); - leftFoot.render(par7); - rightFoot.render(par7); + if(this.type == 3) { + bindTexture(ResourceManager.ajro_leg); + this.leftFoot.render(scaleFactor); + this.rightFoot.render(scaleFactor); } - + GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); } diff --git a/src/main/java/com/hbm/render/model/ModelArmorBJ.java b/src/main/java/com/hbm/render/model/ModelArmorBJ.java index 8f07fd4c7..8d6619080 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorBJ.java +++ b/src/main/java/com/hbm/render/model/ModelArmorBJ.java @@ -5,62 +5,62 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; public class ModelArmorBJ extends ModelArmorBase { - + ModelRendererObj jetpack; - + public ModelArmorBJ(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_bj, "Head"); - body = new ModelRendererObj(ResourceManager.armor_bj, "Body"); - jetpack = new ModelRendererObj(ResourceManager.armor_bj, "Jetpack"); - leftArm = new ModelRendererObj(ResourceManager.armor_bj, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_bj, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_bj, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_bj, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_bj, "LeftFoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_bj, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_bj, "Head"); + this.body = new ModelRendererObj(ResourceManager.armor_bj, "Body"); + this.jetpack = new ModelRendererObj(ResourceManager.armor_bj, "Jetpack"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_bj, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_bj, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_bj, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_bj, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_bj, "LeftFoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_bj, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - body.copyTo(jetpack); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.body.copyTo(this.jetpack); + GL11.glPushMatrix(); - - if(type == 0) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bj_eyepatch); - head.render(par7); + + if(this.type == 0) { + bindTexture(ResourceManager.bj_eyepatch); + this.head.render(scaleFactor); } - if(type == 1 || type == 5) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bj_chest); - body.render(par7); - - if(type == 5) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bj_jetpack); - jetpack.render(par7); + if(this.type == 1 || this.type == 5) { + bindTexture(ResourceManager.bj_chest); + this.body.render(scaleFactor); + + if(this.type == 5) { + bindTexture(ResourceManager.bj_jetpack); + this.jetpack.render(scaleFactor); } - - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bj_arm); - leftArm.render(par7); - rightArm.render(par7); + + bindTexture(ResourceManager.bj_arm); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); } - if(type == 2) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bj_leg); - leftLeg.render(par7); - rightLeg.render(par7); + if(this.type == 2) { + bindTexture(ResourceManager.bj_leg); + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); } - if(type == 3) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bj_leg); - leftFoot.render(par7); - rightFoot.render(par7); + if(this.type == 3) { + bindTexture(ResourceManager.bj_leg); + this.leftFoot.render(scaleFactor); + this.rightFoot.render(scaleFactor); } - + GL11.glPopMatrix(); } } diff --git a/src/main/java/com/hbm/render/model/ModelArmorBase.java b/src/main/java/com/hbm/render/model/ModelArmorBase.java index be561bcaa..4408f39df 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorBase.java +++ b/src/main/java/com/hbm/render/model/ModelArmorBase.java @@ -5,6 +5,7 @@ import com.hbm.render.loader.ModelRendererObj; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderBiped; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.entity.RenderPlayer; @@ -16,8 +17,7 @@ import net.minecraft.util.ResourceLocation; public class ModelArmorBase extends ModelBiped { - int type; - + public int type; public ModelRendererObj head; public ModelRendererObj body; public ModelRendererObj leftArm; @@ -30,30 +30,37 @@ public class ModelArmorBase extends ModelBiped { public ModelArmorBase(int type) { this.type = type; - // generate null defaults to prevent major breakage from using - // incomplete models - head = new ModelRendererObj(null); - body = new ModelRendererObj(null); - leftArm = new ModelRendererObj(null).setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(null).setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); + // Generate null defaults to prevent major breakage from using incomplete models + this.head = new ModelRendererObj(null); + this.body = new ModelRendererObj(null); + this.leftArm = new ModelRendererObj(null).setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(null).setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); } - public void setRotationAngles(float walkCycle, float walkAmplitude, float idleCycle, float headYaw, float headPitch, float scale, Entity entity) { + @Override + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { - head.rotateAngleY = headYaw / (180F / (float) Math.PI); - head.rotateAngleX = headPitch / (180F / (float) Math.PI); - rightArm.rotateAngleX = MathHelper.cos(walkCycle * 0.6662F + (float) Math.PI) * 2.0F * walkAmplitude * 0.5F; - leftArm.rotateAngleX = MathHelper.cos(walkCycle * 0.6662F) * 2.0F * walkAmplitude * 0.5F; - rightArm.rotateAngleZ = 0.0F; - leftArm.rotateAngleZ = 0.0F; - rightFoot.rotateAngleX = rightLeg.rotateAngleX = MathHelper.cos(walkCycle * 0.6662F) * 1.4F * walkAmplitude; - leftFoot.rotateAngleX = leftLeg.rotateAngleX = MathHelper.cos(walkCycle * 0.6662F + (float) Math.PI) * 1.4F * walkAmplitude; - rightFoot.rotateAngleY = rightLeg.rotateAngleY = 0.0F; - leftFoot.rotateAngleY = leftLeg.rotateAngleY = 0.0F; + boolean calculateRotations = true; + + Render render = RenderManager.instance.getEntityRenderObject(entity); + if(render instanceof RenderPlayer) { + RenderPlayer renderPlayer = (RenderPlayer) render; + this.copyPropertiesFromBiped(renderPlayer.modelBipedMain); + calculateRotations = false; + } else if(render instanceof RenderBiped) { + RenderBiped renderBiped = (RenderBiped) render; + this.copyPropertiesFromBiped(renderBiped.modelBipedMain); + calculateRotations = false; + } + + this.rightFoot.rotateAngleX = this.rightLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount; + this.leftFoot.rotateAngleX = this.leftLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float) Math.PI) * 1.4F * limbSwingAmount; + this.rightFoot.rotateAngleY = this.rightLeg.rotateAngleY = 0.0F; + this.leftFoot.rotateAngleY = this.leftLeg.rotateAngleY = 0.0F; if(entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; @@ -78,7 +85,8 @@ public class ModelArmorBase extends ModelBiped { if(player.getHeldItem().getItem() instanceof IHoldableWeapon) this.aimedBow = true; - rightArm.rotateAngleX = rightArm.rotateAngleX * 0.5F - ((float) Math.PI / 10F) * hold; + if(calculateRotations) + this.rightArm.rotateAngleX = this.rightArm.rotateAngleX * 0.5F - ((float) Math.PI / 10F) * hold; } } @@ -86,106 +94,120 @@ public class ModelArmorBase extends ModelBiped { this.isRiding = entity.isRiding(); if(this.isRiding) { - rightArm.rotateAngleX += -((float) Math.PI / 5F); - leftArm.rotateAngleX += -((float) Math.PI / 5F); - rightFoot.rotateAngleX = rightLeg.rotateAngleX = -((float) Math.PI * 2F / 5F); - leftFoot.rotateAngleX = leftLeg.rotateAngleX = -((float) Math.PI * 2F / 5F); - rightFoot.rotateAngleY = rightLeg.rotateAngleY = ((float) Math.PI / 10F); - leftFoot.rotateAngleY = leftLeg.rotateAngleY = -((float) Math.PI / 10F); - } - - if(this.heldItemLeft != 0) { - leftArm.rotateAngleX = leftArm.rotateAngleX * 0.5F - ((float) Math.PI / 10F) * (float) this.heldItemLeft; - } - - if(this.heldItemRight != 0) { - rightArm.rotateAngleX = rightArm.rotateAngleX * 0.5F - ((float) Math.PI / 10F) * (float) this.heldItemRight; - } - - rightArm.rotateAngleY = 0.0F; - leftArm.rotateAngleY = 0.0F; - float f6; - float f7; - - if(this.onGround > -9990.0F) { - f6 = this.onGround; - body.rotateAngleY = MathHelper.sin(MathHelper.sqrt_float(f6) * (float) Math.PI * 2.0F) * 0.2F; - rightArm.rotationPointZ = MathHelper.sin(body.rotateAngleY) * 5.0F; - rightArm.rotationPointX = -MathHelper.cos(body.rotateAngleY) * 5.0F; - leftArm.rotationPointZ = -MathHelper.sin(body.rotateAngleY) * 5.0F; - leftArm.rotationPointX = MathHelper.cos(body.rotateAngleY) * 5.0F; - rightArm.rotateAngleY += body.rotateAngleY; - leftArm.rotateAngleY += body.rotateAngleY; - leftArm.rotateAngleX += body.rotateAngleY; - f6 = 1.0F - this.onGround; - f6 *= f6; - f6 *= f6; - f6 = 1.0F - f6; - f7 = MathHelper.sin(f6 * (float) Math.PI); - float f8 = MathHelper.sin(this.onGround * (float) Math.PI) * -(head.rotateAngleX - 0.7F) * 0.75F; - rightArm.rotateAngleX = (float) ((double) rightArm.rotateAngleX - ((double) f7 * 1.2D + (double) f8)); - rightArm.rotateAngleY += body.rotateAngleY * 2.0F; - rightArm.rotateAngleZ = MathHelper.sin(this.onGround * (float) Math.PI) * -0.4F; + this.rightFoot.rotateAngleX = this.rightLeg.rotateAngleX = -((float) Math.PI * 2F / 5F); + this.leftFoot.rotateAngleX = this.leftLeg.rotateAngleX = -((float) Math.PI * 2F / 5F); + this.rightFoot.rotateAngleY = this.rightLeg.rotateAngleY = ((float) Math.PI / 10F); + this.leftFoot.rotateAngleY = this.leftLeg.rotateAngleY = -((float) Math.PI / 10F); } if(this.isSneak) { - body.rotateAngleX = 0.5F; - rightArm.rotateAngleX += 0.4F; - leftArm.rotateAngleX += 0.4F; - rightFoot.offsetZ = rightLeg.offsetZ = 4.0F; - leftFoot.offsetZ = leftLeg.offsetZ = 4.0F; - rightFoot.offsetY = rightLeg.offsetY = -3.0F; - leftFoot.offsetY = leftLeg.offsetY = -3.0F; - head.offsetY = 1.0F; + this.rightFoot.offsetZ = this.rightLeg.offsetZ = 4.0F; + this.leftFoot.offsetZ = this.leftLeg.offsetZ = 4.0F; + this.rightFoot.offsetY = this.rightLeg.offsetY = -3.0F; + this.leftFoot.offsetY = this.leftLeg.offsetY = -3.0F; } else { - body.rotateAngleX = 0.0F; - rightFoot.offsetZ = rightLeg.offsetZ = 0.1F; - leftFoot.offsetZ = leftLeg.offsetZ = 0.1F; - rightFoot.offsetY = rightLeg.offsetY = 0.0F; - leftFoot.offsetY = leftLeg.offsetY = 0.0F; - head.offsetY = 0.0F; + this.rightFoot.offsetZ = this.rightLeg.offsetZ = 0.1F; + this.leftFoot.offsetZ = this.leftLeg.offsetZ = 0.1F; + this.rightFoot.offsetY = this.rightLeg.offsetY = 0.0F; + this.leftFoot.offsetY = this.leftLeg.offsetY = 0.0F; } - rightArm.rotateAngleZ += MathHelper.cos(idleCycle * 0.09F) * 0.05F + 0.05F; - leftArm.rotateAngleZ -= MathHelper.cos(idleCycle * 0.09F) * 0.05F + 0.05F; - rightArm.rotateAngleX += MathHelper.sin(idleCycle * 0.067F) * 0.05F; - leftArm.rotateAngleX -= MathHelper.sin(idleCycle * 0.067F) * 0.05F; + if(calculateRotations) { + this.head.rotateAngleY = netHeadYaw / (180F / (float) Math.PI); + this.head.rotateAngleX = headPitch / (180F / (float) Math.PI); + this.rightArm.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float) Math.PI) * 2.0F * limbSwingAmount * 0.5F; + this.leftArm.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 2.0F * limbSwingAmount * 0.5F; + this.rightArm.rotateAngleZ = 0.0F; + this.leftArm.rotateAngleZ = 0.0F; - if(this.aimedBow) { - f6 = 0.0F; - f7 = 0.0F; - rightArm.rotateAngleZ = 0.0F; - leftArm.rotateAngleZ = 0.0F; - rightArm.rotateAngleY = -(0.1F - f6 * 0.6F) + head.rotateAngleY; - leftArm.rotateAngleY = 0.1F - f6 * 0.6F + head.rotateAngleY + 0.4F; - rightArm.rotateAngleX = -((float) Math.PI / 2F) + head.rotateAngleX; - leftArm.rotateAngleX = -((float) Math.PI / 2F) + head.rotateAngleX; - rightArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F; - leftArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F; - rightArm.rotateAngleZ += MathHelper.cos(idleCycle * 0.09F) * 0.05F + 0.05F; - leftArm.rotateAngleZ -= MathHelper.cos(idleCycle * 0.09F) * 0.05F + 0.05F; - rightArm.rotateAngleX += MathHelper.sin(idleCycle * 0.067F) * 0.05F; - leftArm.rotateAngleX -= MathHelper.sin(idleCycle * 0.067F) * 0.05F; - } - - if(entity instanceof EntityPlayer) { - Object o = RenderManager.instance.entityRenderMap.get(EntityPlayer.class); - if(o instanceof RenderPlayer) { - RenderPlayer render = (RenderPlayer) o; - leftArm.copyRotationFrom(render.modelBipedMain.bipedLeftArm); - rightArm.copyRotationFrom(render.modelBipedMain.bipedRightArm); + if(this.isRiding) { + this.rightArm.rotateAngleX -= (float) Math.PI / 5F; + this.leftArm.rotateAngleX -= (float) Math.PI / 5F; } - } else { - Object o = RenderManager.instance.entityRenderMap.get(entity.getClass()); - if(o instanceof RenderBiped) { - RenderBiped render = (RenderBiped) o; - leftArm.copyRotationFrom(render.modelBipedMain.bipedLeftArm); - rightArm.copyRotationFrom(render.modelBipedMain.bipedRightArm); + + if(this.heldItemLeft != 0) { + this.leftArm.rotateAngleX = this.leftArm.rotateAngleX * 0.5F - ((float) Math.PI / 10F) * (float) this.heldItemLeft; + } + + if(this.heldItemRight != 0) { + this.rightArm.rotateAngleX = this.rightArm.rotateAngleX * 0.5F - ((float) Math.PI / 10F) * (float) this.heldItemRight; + } + + this.rightArm.rotateAngleY = 0.0F; + this.leftArm.rotateAngleY = 0.0F; + float f6; + float f7; + + if(this.onGround > -9990.0F) { + f6 = this.onGround; + this.body.rotateAngleY = MathHelper.sin(MathHelper.sqrt_float(f6) * (float) Math.PI * 2.0F) * 0.2F; + this.rightArm.rotationPointZ = MathHelper.sin(this.body.rotateAngleY) * 5.0F; + this.rightArm.rotationPointX = -MathHelper.cos(this.body.rotateAngleY) * 5.0F; + this.leftArm.rotationPointZ = -MathHelper.sin(this.body.rotateAngleY) * 5.0F; + this.leftArm.rotationPointX = MathHelper.cos(this.body.rotateAngleY) * 5.0F; + this.rightArm.rotateAngleY += this.body.rotateAngleY; + this.leftArm.rotateAngleY += this.body.rotateAngleY; + this.leftArm.rotateAngleX += this.body.rotateAngleY; + f6 = 1.0F - this.onGround; + f6 *= f6; + f6 *= f6; + f6 = 1.0F - f6; + f7 = MathHelper.sin(f6 * (float) Math.PI); + float f8 = MathHelper.sin(this.onGround * (float) Math.PI) * -(this.head.rotateAngleX - 0.7F) * 0.75F; + this.rightArm.rotateAngleX = (float) ((double) this.rightArm.rotateAngleX - ((double) f7 * 1.2D + (double) f8)); + this.rightArm.rotateAngleY += this.body.rotateAngleY * 2.0F; + this.rightArm.rotateAngleZ = MathHelper.sin(this.onGround * (float) Math.PI) * -0.4F; + } + + if(this.isSneak) { + this.body.rotateAngleX = 0.5F; + this.rightArm.rotateAngleX += 0.4F; + this.leftArm.rotateAngleX += 0.4F; + this.head.offsetY = 1.0F; + } else { + this.body.rotateAngleX = 0.0F; + this.head.offsetY = 0.0F; + } + + this.rightArm.rotateAngleZ += MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F; + this.leftArm.rotateAngleZ -= MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F; + this.rightArm.rotateAngleX += MathHelper.sin(ageInTicks * 0.067F) * 0.05F; + this.leftArm.rotateAngleX -= MathHelper.sin(ageInTicks * 0.067F) * 0.05F; + + if(this.aimedBow) { + f6 = 0.0F; + f7 = 0.0F; + this.rightArm.rotateAngleZ = 0.0F; + this.leftArm.rotateAngleZ = 0.0F; + this.rightArm.rotateAngleY = -(0.1F - f6 * 0.6F) + this.head.rotateAngleY; + this.leftArm.rotateAngleY = 0.1F - f6 * 0.6F + this.head.rotateAngleY + 0.4F; + this.rightArm.rotateAngleX = -((float) Math.PI / 2F) + this.head.rotateAngleX; + this.leftArm.rotateAngleX = -((float) Math.PI / 2F) + this.head.rotateAngleX; + this.rightArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F; + this.leftArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F; + this.rightArm.rotateAngleZ += MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F; + this.leftArm.rotateAngleZ -= MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F; + this.rightArm.rotateAngleX += MathHelper.sin(ageInTicks * 0.067F) * 0.05F; + this.leftArm.rotateAngleX -= MathHelper.sin(ageInTicks * 0.067F) * 0.05F; } } } - protected void bindTexture(ResourceLocation loc) { - Minecraft.getMinecraft().renderEngine.bindTexture(loc); + protected static void bindTexture(ResourceLocation location) { + + Minecraft.getMinecraft().renderEngine.bindTexture(location); + } + + private void copyPropertiesFromBiped(ModelBiped modelBiped) { + + this.head.copyRotationFrom(modelBiped.bipedHead); + this.head.offsetY = modelBiped.bipedHead.offsetY; + this.body.copyRotationFrom(modelBiped.bipedBody); + this.leftArm.copyRotationFrom(modelBiped.bipedLeftArm); + this.leftArm.rotationPointX = modelBiped.bipedLeftArm.rotationPointX; + this.leftArm.rotationPointZ = modelBiped.bipedLeftArm.rotationPointZ; + this.rightArm.copyRotationFrom(modelBiped.bipedRightArm); + this.rightArm.rotationPointX = modelBiped.bipedRightArm.rotationPointX; + this.rightArm.rotationPointZ = modelBiped.bipedRightArm.rotationPointZ; } } diff --git a/src/main/java/com/hbm/render/model/ModelArmorBismuth.java b/src/main/java/com/hbm/render/model/ModelArmorBismuth.java index 1081a23a7..0ce51f4e9 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorBismuth.java +++ b/src/main/java/com/hbm/render/model/ModelArmorBismuth.java @@ -5,51 +5,50 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; public class ModelArmorBismuth extends ModelArmorBase { - + public ModelArmorBismuth(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_bismuth, "Head"); - body = new ModelRendererObj(ResourceManager.armor_bismuth, "Body"); - leftArm = new ModelRendererObj(ResourceManager.armor_bismuth, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_bismuth, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_bismuth, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_bismuth, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_bismuth, "LeftFoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_bismuth, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_bismuth, "Head"); + this.body = new ModelRendererObj(ResourceManager.armor_bismuth, "Body"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_bismuth, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_bismuth, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_bismuth, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_bismuth, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_bismuth, "LeftFoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_bismuth, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); GL11.glShadeModel(GL11.GL_SMOOTH); - - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.armor_bismuth_tex); - - if(type == 0) { - head.render(par7); + + bindTexture(ResourceManager.armor_bismuth_tex); + + if(this.type == 0) { + this.head.render(scaleFactor); } - if(type == 1) { - leftArm.render(par7); - rightArm.render(par7); - body.render(par7); + if(this.type == 1) { + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); + this.body.render(scaleFactor); } - if(type == 2) { - leftLeg.render(par7); - rightLeg.render(par7); + if(this.type == 2) { + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); } - if(type == 3) { - leftFoot.render(par7); - rightFoot.render(par7); + if(this.type == 3) { + this.leftFoot.render(scaleFactor); + this.rightFoot.render(scaleFactor); } - + GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); } diff --git a/src/main/java/com/hbm/render/model/ModelArmorDNT.java b/src/main/java/com/hbm/render/model/ModelArmorDNT.java index 9f26beec7..6784deff5 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorDNT.java +++ b/src/main/java/com/hbm/render/model/ModelArmorDNT.java @@ -5,54 +5,53 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; public class ModelArmorDNT extends ModelArmorBase { - + public ModelArmorDNT(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_dnt, "Head"); - body = new ModelRendererObj(ResourceManager.armor_dnt, "Body"); - leftArm = new ModelRendererObj(ResourceManager.armor_dnt, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_dnt, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_dnt, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_dnt, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_dnt, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_dnt, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_dnt, "Head"); + this.body = new ModelRendererObj(ResourceManager.armor_dnt, "Body"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_dnt, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_dnt, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_dnt, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_dnt, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_dnt, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_dnt, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); GL11.glShadeModel(GL11.GL_SMOOTH); - - if(type == 0) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.dnt_helmet); - head.render(par7); + + if(this.type == 0) { + bindTexture(ResourceManager.dnt_helmet); + this.head.render(scaleFactor); } - if(type == 1) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.dnt_chest); - body.render(par7); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.dnt_arm); - leftArm.render(par7); - rightArm.render(par7); + if(this.type == 1) { + bindTexture(ResourceManager.dnt_chest); + this.body.render(scaleFactor); + bindTexture(ResourceManager.dnt_arm); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); } - if(type == 2) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.dnt_leg); - leftLeg.render(par7); - rightLeg.render(par7); + if(this.type == 2) { + bindTexture(ResourceManager.dnt_leg); + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); } - if(type == 3) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.dnt_leg); - leftFoot.render(par7); - rightFoot.render(par7); + if(this.type == 3) { + bindTexture(ResourceManager.dnt_leg); + this.leftFoot.render(scaleFactor); + this.rightFoot.render(scaleFactor); } - + GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); } diff --git a/src/main/java/com/hbm/render/model/ModelArmorDesh.java b/src/main/java/com/hbm/render/model/ModelArmorDesh.java index f4dd02051..fdb3591f9 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorDesh.java +++ b/src/main/java/com/hbm/render/model/ModelArmorDesh.java @@ -8,50 +8,50 @@ import com.hbm.render.loader.ModelRendererObj; import net.minecraft.entity.Entity; public class ModelArmorDesh extends ModelArmorBase { - + public ModelArmorDesh(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_steamsuit, "Head"); - body = new ModelRendererObj(ResourceManager.armor_steamsuit, "Body"); - leftArm = new ModelRendererObj(ResourceManager.armor_steamsuit, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_steamsuit, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_steamsuit, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_steamsuit, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_steamsuit, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_steamsuit, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_steamsuit, "Head"); + this.body = new ModelRendererObj(ResourceManager.armor_steamsuit, "Body"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_steamsuit, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_steamsuit, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_steamsuit, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_steamsuit, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_steamsuit, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_steamsuit, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); GL11.glShadeModel(GL11.GL_SMOOTH); - - if(type == 0) { + + if(this.type == 0) { bindTexture(ResourceManager.steamsuit_helmet); - head.render(par7); + this.head.render(scaleFactor); } - if(type == 1) { + if(this.type == 1) { bindTexture(ResourceManager.steamsuit_chest); - body.render(par7); + this.body.render(scaleFactor); bindTexture(ResourceManager.steamsuit_arm); - leftArm.render(par7); - rightArm.render(par7); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); } - if(type == 2) { + if(this.type == 2) { bindTexture(ResourceManager.steamsuit_leg); - leftLeg.render(par7); - rightLeg.render(par7); + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); } - if(type == 3) { + if(this.type == 3) { bindTexture(ResourceManager.steamsuit_leg); - leftFoot.render(par7); - rightFoot.render(par7); + this.leftFoot.render(scaleFactor); + this.rightFoot.render(scaleFactor); } - + GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); } diff --git a/src/main/java/com/hbm/render/model/ModelArmorDiesel.java b/src/main/java/com/hbm/render/model/ModelArmorDiesel.java index 9ccb36b65..2d1cc2b39 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorDiesel.java +++ b/src/main/java/com/hbm/render/model/ModelArmorDiesel.java @@ -8,50 +8,50 @@ import com.hbm.render.loader.ModelRendererObj; import net.minecraft.entity.Entity; public class ModelArmorDiesel extends ModelArmorBase { - + public ModelArmorDiesel(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_dieselsuit, "Head"); - body = new ModelRendererObj(ResourceManager.armor_dieselsuit, "Body"); - leftArm = new ModelRendererObj(ResourceManager.armor_dieselsuit, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_dieselsuit, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_dieselsuit, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_dieselsuit, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_dieselsuit, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_dieselsuit, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_dieselsuit, "Head"); + this.body = new ModelRendererObj(ResourceManager.armor_dieselsuit, "Body"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_dieselsuit, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_dieselsuit, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_dieselsuit, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_dieselsuit, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_dieselsuit, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_dieselsuit, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); GL11.glShadeModel(GL11.GL_SMOOTH); - - if(type == 0) { + + if(this.type == 0) { bindTexture(ResourceManager.dieselsuit_helmet); - head.render(par7); + this.head.render(scaleFactor); } - if(type == 1) { + if(this.type == 1) { bindTexture(ResourceManager.dieselsuit_chest); - body.render(par7); + this.body.render(scaleFactor); bindTexture(ResourceManager.dieselsuit_arm); - leftArm.render(par7); - rightArm.render(par7); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); } - if(type == 2) { + if(this.type == 2) { bindTexture(ResourceManager.dieselsuit_leg); - leftLeg.render(par7); - rightLeg.render(par7); + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); } - if(type == 3) { + if(this.type == 3) { bindTexture(ResourceManager.dieselsuit_leg); - leftFoot.render(par7); - rightFoot.render(par7); + this.leftFoot.render(scaleFactor); + this.rightFoot.render(scaleFactor); } - + GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); } diff --git a/src/main/java/com/hbm/render/model/ModelArmorDigamma.java b/src/main/java/com/hbm/render/model/ModelArmorDigamma.java index 6410a0333..d0ad0e7f0 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorDigamma.java +++ b/src/main/java/com/hbm/render/model/ModelArmorDigamma.java @@ -5,64 +5,63 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.entity.Entity; public class ModelArmorDigamma extends ModelArmorBase { ModelRendererObj cassette; - + public ModelArmorDigamma(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_fau, "Head"); - body = new ModelRendererObj(ResourceManager.armor_fau, "Body"); - cassette = new ModelRendererObj(ResourceManager.armor_fau, "Cassette"); - leftArm = new ModelRendererObj(ResourceManager.armor_fau, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_fau, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_fau, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_fau, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_fau, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_fau, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_fau, "Head"); + this.body = new ModelRendererObj(ResourceManager.armor_fau, "Body"); + this.cassette = new ModelRendererObj(ResourceManager.armor_fau, "Cassette"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_fau, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_fau, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_fau, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_fau, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_fau, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_fau, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); GL11.glShadeModel(GL11.GL_SMOOTH); - - body.copyTo(cassette); - - if(type == 0) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_helmet); - head.render(par7); + + this.body.copyTo(this.cassette); + + if(this.type == 0) { + bindTexture(ResourceManager.fau_helmet); + this.head.render(scaleFactor); } - if(type == 1) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_chest); - body.render(par7); + if(this.type == 1) { + bindTexture(ResourceManager.fau_chest); + this.body.render(scaleFactor); GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_cassette); - cassette.render(par7); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_arm); - leftArm.render(par7); - rightArm.render(par7); + OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO); + bindTexture(ResourceManager.fau_cassette); + this.cassette.render(scaleFactor); + bindTexture(ResourceManager.fau_arm); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); } - if(type == 2) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_leg); - leftLeg.render(par7); - rightLeg.render(par7); + if(this.type == 2) { + bindTexture(ResourceManager.fau_leg); + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); } - if(type == 3) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_leg); - leftFoot.render(par7); - rightFoot.render(par7); + if(this.type == 3) { + bindTexture(ResourceManager.fau_leg); + this.leftFoot.render(scaleFactor); + this.rightFoot.render(scaleFactor); } - + GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); } diff --git a/src/main/java/com/hbm/render/model/ModelArmorEnvsuit.java b/src/main/java/com/hbm/render/model/ModelArmorEnvsuit.java index 0f5e0aa7a..095028ca2 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorEnvsuit.java +++ b/src/main/java/com/hbm/render/model/ModelArmorEnvsuit.java @@ -5,42 +5,42 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.entity.Entity; public class ModelArmorEnvsuit extends ModelArmorBase { - + ModelRendererObj lamps; - + public ModelArmorEnvsuit(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_envsuit, "Helmet"); - lamps = new ModelRendererObj(ResourceManager.armor_envsuit, "Lamps"); - body = new ModelRendererObj(ResourceManager.armor_envsuit, "Chest"); - leftArm = new ModelRendererObj(ResourceManager.armor_envsuit, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_envsuit, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_envsuit, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_envsuit, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_envsuit, "LeftFoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_envsuit, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_envsuit, "Helmet"); + this.lamps = new ModelRendererObj(ResourceManager.armor_envsuit, "Lamps"); + this.body = new ModelRendererObj(ResourceManager.armor_envsuit, "Chest"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_envsuit, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_envsuit, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_envsuit, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_envsuit, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_envsuit, "LeftFoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_envsuit, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - head.copyTo(lamps); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.head.copyTo(this.lamps); + GL11.glPushMatrix(); - - if(type == 0) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.envsuit_helmet); + + if(this.type == 0) { + bindTexture(ResourceManager.envsuit_helmet); GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - head.render(par7); + OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO); + this.head.render(scaleFactor); GL11.glDisable(GL11.GL_BLEND); - + /// START GLOW /// float lastX = OpenGlHelper.lastBrightnessX; float lastY = OpenGlHelper.lastBrightnessY; @@ -49,7 +49,7 @@ public class ModelArmorEnvsuit extends ModelArmorBase { GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glColor3f(1F, 1F, 0.8F); - lamps.render(par7); + this.lamps.render(scaleFactor); GL11.glColor3f(1F, 1F, 1F); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_LIGHTING); @@ -57,24 +57,24 @@ public class ModelArmorEnvsuit extends ModelArmorBase { OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY); /// END GLOW /// } - if(type == 1) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.envsuit_chest); - body.render(par7); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.envsuit_arm); - leftArm.render(par7); - rightArm.render(par7); + if(this.type == 1) { + bindTexture(ResourceManager.envsuit_chest); + this.body.render(scaleFactor); + bindTexture(ResourceManager.envsuit_arm); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); } - if(type == 2) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.envsuit_leg); - leftLeg.render(par7); - rightLeg.render(par7); + if(this.type == 2) { + bindTexture(ResourceManager.envsuit_leg); + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); } - if(type == 3) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.envsuit_leg); - leftFoot.render(par7); - rightFoot.render(par7); + if(this.type == 3) { + bindTexture(ResourceManager.envsuit_leg); + this.leftFoot.render(scaleFactor); + this.rightFoot.render(scaleFactor); } - + GL11.glPopMatrix(); } } diff --git a/src/main/java/com/hbm/render/model/ModelArmorHEV.java b/src/main/java/com/hbm/render/model/ModelArmorHEV.java index a0e24e8b9..307b80753 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorHEV.java +++ b/src/main/java/com/hbm/render/model/ModelArmorHEV.java @@ -5,53 +5,52 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; public class ModelArmorHEV extends ModelArmorBase { - + public ModelArmorHEV(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_hev, "Head"); - body = new ModelRendererObj(ResourceManager.armor_hev, "Body"); - leftArm = new ModelRendererObj(ResourceManager.armor_hev, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_hev, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_hev, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_hev, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_hev, "LeftFoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_hev, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_hev, "Head"); + this.body = new ModelRendererObj(ResourceManager.armor_hev, "Body"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_hev, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_hev, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_hev, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_hev, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_hev, "LeftFoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_hev, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); - - if(type == 0) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hev_helmet); - head.render(par7); + + if(this.type == 0) { + bindTexture(ResourceManager.hev_helmet); + this.head.render(scaleFactor); } - if(type == 1) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hev_chest); - body.render(par7); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hev_arm); - leftArm.render(par7); - rightArm.render(par7); + if(this.type == 1) { + bindTexture(ResourceManager.hev_chest); + this.body.render(scaleFactor); + bindTexture(ResourceManager.hev_arm); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); } - if(type == 2) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hev_leg); - leftLeg.render(par7); - rightLeg.render(par7); + if(this.type == 2) { + bindTexture(ResourceManager.hev_leg); + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); } - if(type == 3) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hev_leg); - leftFoot.render(par7); - rightFoot.render(par7); + if(this.type == 3) { + bindTexture(ResourceManager.hev_leg); + this.leftFoot.render(scaleFactor); + this.rightFoot.render(scaleFactor); } - + GL11.glPopMatrix(); } } diff --git a/src/main/java/com/hbm/render/model/ModelArmorRPA.java b/src/main/java/com/hbm/render/model/ModelArmorRPA.java index 7553d3636..50cefff98 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorRPA.java +++ b/src/main/java/com/hbm/render/model/ModelArmorRPA.java @@ -5,101 +5,100 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.entity.Entity; public class ModelArmorRPA extends ModelArmorBase { - + ModelRendererObj fan; ModelRendererObj glow; - + public ModelArmorRPA(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_remnant, "Head"); - body = new ModelRendererObj(ResourceManager.armor_remnant, "Body"); - fan = new ModelRendererObj(ResourceManager.armor_remnant, "Fan"); - glow = new ModelRendererObj(ResourceManager.armor_remnant, "Glow"); - leftArm = new ModelRendererObj(ResourceManager.armor_remnant, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_remnant, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_remnant, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_remnant, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_remnant, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_remnant, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_remnant, "Head"); + this.body = new ModelRendererObj(ResourceManager.armor_remnant, "Body"); + this.fan = new ModelRendererObj(ResourceManager.armor_remnant, "Fan"); + this.glow = new ModelRendererObj(ResourceManager.armor_remnant, "Glow"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_remnant, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_remnant, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_remnant, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_remnant, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_remnant, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_remnant, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); //body.copyTo(fan); - body.copyTo(glow); - + this.body.copyTo(this.glow); + GL11.glPushMatrix(); GL11.glShadeModel(GL11.GL_SMOOTH); - - if(type == 0) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.rpa_helmet); - head.render(par7); + + if(this.type == 0) { + bindTexture(ResourceManager.rpa_helmet); + this.head.render(scaleFactor); } - if(type == 1) { - - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.rpa_arm); - leftArm.render(par7); - rightArm.render(par7); - - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.rpa_chest); - body.render(par7); - + if(this.type == 1) { + + bindTexture(ResourceManager.rpa_arm); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); + + bindTexture(ResourceManager.rpa_chest); + this.body.render(scaleFactor); + /// START GLOW /// float lastX = OpenGlHelper.lastBrightnessX; float lastY = OpenGlHelper.lastBrightnessY; GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F); GL11.glDisable(GL11.GL_LIGHTING); - glow.render(par7); + this.glow.render(scaleFactor); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopAttrib(); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY); /// END GLOW /// - + /// START FAN /// GL11.glPushMatrix(); double px = 0.0625D; - GL11.glTranslatef(body.offsetX * (float) px, body.offsetY * (float) px, body.offsetZ * (float) px); - GL11.glTranslatef(body.rotationPointX * (float) px, body.rotationPointY * (float) px, body.rotationPointZ * (float) px); + GL11.glTranslatef(this.body.offsetX * (float) px, this.body.offsetY * (float) px, this.body.offsetZ * (float) px); + GL11.glTranslatef(this.body.rotationPointX * (float) px, this.body.rotationPointY * (float) px, this.body.rotationPointZ * (float) px); - if(body.rotateAngleZ != 0.0F) { - GL11.glRotatef(body.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F); + if(this.body.rotateAngleZ != 0.0F) { + GL11.glRotatef(this.body.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F); } - if(body.rotateAngleY != 0.0F) { - GL11.glRotatef(body.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F); + if(this.body.rotateAngleY != 0.0F) { + GL11.glRotatef(this.body.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F); } - if(body.rotateAngleX != 0.0F) { - GL11.glRotatef(body.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F); + if(this.body.rotateAngleX != 0.0F) { + GL11.glRotatef(this.body.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F); } - + GL11.glTranslated(0, 4.875 * px, 0); - GL11.glRotated(-System.currentTimeMillis() / 2 % 360, 0, 0, 1); + GL11.glRotated(-System.currentTimeMillis() / 2D % 360, 0, 0, 1); GL11.glTranslated(0, -4.875 * px, 0); - fan.render(par7); + this.fan.render(scaleFactor); GL11.glPopMatrix(); /// END FAN /// } - if(type == 2) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.rpa_leg); - leftLeg.render(par7); - rightLeg.render(par7); + if(this.type == 2) { + bindTexture(ResourceManager.rpa_leg); + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); } - if(type == 3) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.rpa_leg); - leftFoot.render(par7); - rightFoot.render(par7); + if(this.type == 3) { + bindTexture(ResourceManager.rpa_leg); + this.leftFoot.render(scaleFactor); + this.rightFoot.render(scaleFactor); } - + GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); } diff --git a/src/main/java/com/hbm/render/model/ModelArmorTailPeep.java b/src/main/java/com/hbm/render/model/ModelArmorTailPeep.java index 5a8cb8370..37790ef50 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorTailPeep.java +++ b/src/main/java/com/hbm/render/model/ModelArmorTailPeep.java @@ -3,24 +3,24 @@ package com.hbm.render.model; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; public class ModelArmorTailPeep extends ModelArmorBase { ModelRendererObj tail; - + public ModelArmorTailPeep() { super(0); - tail = new ModelRendererObj(ResourceManager.armor_tail, "FaggyAssFuckingTailThing"); + this.tail = new ModelRendererObj(ResourceManager.armor_tail, "FaggyAssFuckingTailThing"); } @Override - public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, entity); - body.copyTo(tail); - - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.tail_peep); - tail.render(par7); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.body.copyTo(this.tail); + + bindTexture(ResourceManager.tail_peep); + this.tail.render(scaleFactor); } } diff --git a/src/main/java/com/hbm/render/model/ModelArmorTaurun.java b/src/main/java/com/hbm/render/model/ModelArmorTaurun.java index 282be3f7b..7924fcc03 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorTaurun.java +++ b/src/main/java/com/hbm/render/model/ModelArmorTaurun.java @@ -5,56 +5,56 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; public class ModelArmorTaurun extends ModelArmorBase { - + public ModelArmorTaurun(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_taurun, "Helmet"); - body = new ModelRendererObj(ResourceManager.armor_taurun, "Chest"); - leftArm = new ModelRendererObj(ResourceManager.armor_taurun, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_taurun, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_taurun, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_taurun, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_taurun, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_taurun, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_taurun, "Helmet"); + this.body = new ModelRendererObj(ResourceManager.armor_taurun, "Chest"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_taurun, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_taurun, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_taurun, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_taurun, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_taurun, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_taurun, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); - - if(type == 0) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_helmet); - head.render(par7); + + if(this.type == 0) { + bindTexture(ResourceManager.taurun_helmet); + this.head.render(scaleFactor); } - if(type == 1) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_chest); - body.render(par7); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_arm); - leftArm.render(par7); - rightArm.render(par7); + if(this.type == 1) { + bindTexture(ResourceManager.taurun_chest); + this.body.render(scaleFactor); + bindTexture(ResourceManager.taurun_arm); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); } - if(type == 2) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_leg); + if(this.type == 2) { + bindTexture(ResourceManager.taurun_leg); GL11.glTranslated(-0.01, 0, 0); - leftLeg.render(par7); + this.leftLeg.render(scaleFactor); GL11.glTranslated(0.02, 0, 0); - rightLeg.render(par7); + this.rightLeg.render(scaleFactor); } - if(type == 3) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_leg); + if(this.type == 3) { + bindTexture(ResourceManager.taurun_leg); GL11.glTranslated(-0.01, 0, 0); - leftFoot.render(par7); + this.leftFoot.render(scaleFactor); GL11.glTranslated(0.02, 0, 0); - rightFoot.render(par7); + this.rightFoot.render(scaleFactor); } - + GL11.glPopMatrix(); } } diff --git a/src/main/java/com/hbm/render/model/ModelArmorTrenchmaster.java b/src/main/java/com/hbm/render/model/ModelArmorTrenchmaster.java index 16fc1aa88..566f106de 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorTrenchmaster.java +++ b/src/main/java/com/hbm/render/model/ModelArmorTrenchmaster.java @@ -5,76 +5,76 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.entity.Entity; public class ModelArmorTrenchmaster extends ModelArmorBase { - + ModelRendererObj light; - + public ModelArmorTrenchmaster(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Helmet"); - light = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Light"); - body = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Chest"); - leftArm = new ModelRendererObj(ResourceManager.armor_trenchmaster, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_trenchmaster, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_trenchmaster, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_trenchmaster, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_trenchmaster, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_trenchmaster, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Helmet"); + this.light = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Light"); + this.body = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Chest"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_trenchmaster, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_trenchmaster, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_trenchmaster, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_trenchmaster, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_trenchmaster, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_trenchmaster, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - head.copyTo(light); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.head.copyTo(this.light); + GL11.glPushMatrix(); - - if(type == 0) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_helmet); + + if(this.type == 0) { + bindTexture(ResourceManager.trenchmaster_helmet); GL11.glEnable(GL11.GL_BLEND); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - head.render(par7); + OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO); + this.head.render(scaleFactor); GL11.glDisable(GL11.GL_BLEND); - + /// START GLOW /// float lastX = OpenGlHelper.lastBrightnessX; float lastY = OpenGlHelper.lastBrightnessY; GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F); GL11.glDisable(GL11.GL_LIGHTING); - light.render(par7); + this.light.render(scaleFactor); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopAttrib(); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY); /// END GLOW /// } - if(type == 1) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_chest); - body.render(par7); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_arm); - leftArm.render(par7); - rightArm.render(par7); + if(this.type == 1) { + bindTexture(ResourceManager.trenchmaster_chest); + this.body.render(scaleFactor); + bindTexture(ResourceManager.trenchmaster_arm); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); } - if(type == 2) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_leg); + if(this.type == 2) { + bindTexture(ResourceManager.trenchmaster_leg); GL11.glTranslated(-0.01, 0, 0); - leftLeg.render(par7); + this.leftLeg.render(scaleFactor); GL11.glTranslated(0.02, 0, 0); - rightLeg.render(par7); + this.rightLeg.render(scaleFactor); } - if(type == 3) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_leg); + if(this.type == 3) { + bindTexture(ResourceManager.trenchmaster_leg); GL11.glTranslated(-0.01, 0, 0); - leftFoot.render(par7); + this.leftFoot.render(scaleFactor); GL11.glTranslated(0.02, 0, 0); - rightFoot.render(par7); + this.rightFoot.render(scaleFactor); } - + GL11.glPopMatrix(); } } diff --git a/src/main/java/com/hbm/render/model/ModelArmorWings.java b/src/main/java/com/hbm/render/model/ModelArmorWings.java index 280da5bdc..a61933250 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorWings.java +++ b/src/main/java/com/hbm/render/model/ModelArmorWings.java @@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; @@ -15,77 +14,74 @@ public class ModelArmorWings extends ModelArmorBase { ModelRendererObj wingLT; ModelRendererObj wingRB; ModelRendererObj wingRT; - + public ModelArmorWings(int type) { super(type); - wingLB = new ModelRendererObj(ResourceManager.armor_wings, "LeftBase"); - wingLT = new ModelRendererObj(ResourceManager.armor_wings, "LeftTip"); - wingRB = new ModelRendererObj(ResourceManager.armor_wings, "RightBase"); - wingRT = new ModelRendererObj(ResourceManager.armor_wings, "RightTip"); + this.wingLB = new ModelRendererObj(ResourceManager.armor_wings, "LeftBase"); + this.wingLT = new ModelRendererObj(ResourceManager.armor_wings, "LeftTip"); + this.wingRB = new ModelRendererObj(ResourceManager.armor_wings, "RightBase"); + this.wingRT = new ModelRendererObj(ResourceManager.armor_wings, "RightTip"); //i should really stop doing that - head = new ModelRendererObj(ResourceManager.anvil); - body = new ModelRendererObj(ResourceManager.anvil); - leftArm = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.anvil); + this.body = new ModelRendererObj(ResourceManager.anvil); + this.leftArm = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, entity); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); //body.copyTo(wingLB); //body.copyTo(wingLT); //body.copyTo(wingRB); //body.copyTo(wingRT); - + GL11.glPushMatrix(); - - Minecraft.getMinecraft().renderEngine.bindTexture(this.getTexture()); - + + bindTexture(this.getTexture()); + double px = 0.0625D; double rot = Math.sin((entity.ticksExisted) * 0.2D) * 20; double rot2 = Math.sin((entity.ticksExisted) * 0.2D - Math.PI * 0.5) * 50 + 30; - + int pivotSideOffset = 1; int pivotFrontOffset = 5; int pivotZOffset = 3; int tipSideOffset = 16; int tipZOffset = 2; double inwardAngle = 10D; - + GL11.glPushMatrix(); - GL11.glTranslatef(body.offsetX * (float) px, body.offsetY * (float) px, body.offsetZ * (float) px); - GL11.glTranslatef(body.rotationPointX * (float) px, body.rotationPointY * (float) px, body.rotationPointZ * (float) px); + GL11.glTranslatef(this.body.offsetX * (float) px, this.body.offsetY * (float) px, this.body.offsetZ * (float) px); + GL11.glTranslatef(this.body.rotationPointX * (float) px, this.body.rotationPointY * (float) px, this.body.rotationPointZ * (float) px); - if(body.rotateAngleZ != 0.0F) { - GL11.glRotatef(body.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F); + if(this.body.rotateAngleZ != 0.0F) { + GL11.glRotatef(this.body.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F); } - if(body.rotateAngleY != 0.0F) { - GL11.glRotatef(body.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F); + if(this.body.rotateAngleY != 0.0F) { + GL11.glRotatef(this.body.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F); } - if(body.rotateAngleX != 0.0F) { - GL11.glRotatef(body.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F); + if(this.body.rotateAngleX != 0.0F) { + GL11.glRotatef(this.body.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F); } - + if(this.type != 1 && entity.onGround) { rot = 20; rot2 = 160; } - + if(this.type == 1) { - rot = 0; - rot2 = 10; - if(entity.onGround) { rot = 30; rot2 = -30; @@ -97,75 +93,79 @@ public class ModelArmorWings extends ModelArmorBase { rot2 = 20; } } - + GL11.glTranslated(0, -2 * px, 0); - + GL11.glEnable(GL11.GL_CULL_FACE); GL11.glPushMatrix(); - - GL11.glRotated(-inwardAngle, 0, 1, 0); - - GL11.glTranslated(pivotSideOffset * px, pivotFrontOffset * px, pivotZOffset * px); - GL11.glRotated(rot * 0.5, 0, 1, 0); - GL11.glRotated(rot + 5, 0, 0, 1); - GL11.glRotated(45, 1, 0, 0); - GL11.glTranslated(-pivotSideOffset * px, -pivotFrontOffset * px, -pivotZOffset * px); - - GL11.glTranslated(pivotSideOffset * px, pivotFrontOffset * px, pivotZOffset * px); - GL11.glRotated(rot, 0, 0, 1); - GL11.glTranslated(-pivotSideOffset * px, -pivotFrontOffset * px, -pivotZOffset * px); - wingLB.render(par7); - - GL11.glTranslated(tipSideOffset * px, pivotFrontOffset * px, tipZOffset * px); - GL11.glRotated(rot2, 0, 1, 0); - if(doesRotateZ()) - GL11.glRotated(rot2 * 0.25 + 5, 0, 0, 1); - GL11.glTranslated(-tipSideOffset * px, -pivotFrontOffset * px, -tipZOffset * px); - wingLT.render(par7); - + + // + GL11.glRotated(-inwardAngle, 0, 1, 0); + + GL11.glTranslated(pivotSideOffset * px, pivotFrontOffset * px, pivotZOffset * px); + GL11.glRotated(rot * 0.5, 0, 1, 0); + GL11.glRotated(rot + 5, 0, 0, 1); + GL11.glRotated(45, 1, 0, 0); + GL11.glTranslated(-pivotSideOffset * px, -pivotFrontOffset * px, -pivotZOffset * px); + + GL11.glTranslated(pivotSideOffset * px, pivotFrontOffset * px, pivotZOffset * px); + GL11.glRotated(rot, 0, 0, 1); + GL11.glTranslated(-pivotSideOffset * px, -pivotFrontOffset * px, -pivotZOffset * px); + this.wingLB.render(scaleFactor); + + GL11.glTranslated(tipSideOffset * px, pivotFrontOffset * px, tipZOffset * px); + GL11.glRotated(rot2, 0, 1, 0); + if(doesRotateZ()) + GL11.glRotated(rot2 * 0.25 + 5, 0, 0, 1); + GL11.glTranslated(-tipSideOffset * px, -pivotFrontOffset * px, -tipZOffset * px); + this.wingLT.render(scaleFactor); + // + GL11.glPopMatrix(); - + GL11.glPushMatrix(); - - GL11.glRotated(inwardAngle, 0, 1, 0); - - GL11.glTranslated(-pivotSideOffset * px, pivotFrontOffset * px, pivotZOffset * px); - GL11.glRotated(-rot * 0.5, 0, 1, 0); - GL11.glRotated(-rot - 5, 0, 0, 1); - GL11.glRotated(45, 1, 0, 0); - GL11.glTranslated(pivotSideOffset * px, -pivotFrontOffset * px, -pivotZOffset * px); - - GL11.glTranslated(-pivotSideOffset * px, pivotFrontOffset * px, pivotZOffset * px); - GL11.glRotated(-rot, 0, 0, 1); - GL11.glTranslated(pivotSideOffset * px, -pivotFrontOffset * px, -pivotZOffset * px); - wingRB.render(par7); - - GL11.glTranslated(-tipSideOffset * px, pivotFrontOffset * px, tipZOffset * px); - GL11.glRotated(-rot2, 0, 1, 0); - if(doesRotateZ()) - GL11.glRotated(-rot2 * 0.25 - 5, 0, 0, 1); - GL11.glTranslated(tipSideOffset * px, -pivotFrontOffset * px, -tipZOffset * px); - wingRT.render(par7); - + + // + GL11.glRotated(inwardAngle, 0, 1, 0); + + GL11.glTranslated(-pivotSideOffset * px, pivotFrontOffset * px, pivotZOffset * px); + GL11.glRotated(-rot * 0.5, 0, 1, 0); + GL11.glRotated(-rot - 5, 0, 0, 1); + GL11.glRotated(45, 1, 0, 0); + GL11.glTranslated(pivotSideOffset * px, -pivotFrontOffset * px, -pivotZOffset * px); + + GL11.glTranslated(-pivotSideOffset * px, pivotFrontOffset * px, pivotZOffset * px); + GL11.glRotated(-rot, 0, 0, 1); + GL11.glTranslated(pivotSideOffset * px, -pivotFrontOffset * px, -pivotZOffset * px); + this.wingRB.render(scaleFactor); + + GL11.glTranslated(-tipSideOffset * px, pivotFrontOffset * px, tipZOffset * px); + GL11.glRotated(-rot2, 0, 1, 0); + if(doesRotateZ()) + GL11.glRotated(-rot2 * 0.25 - 5, 0, 0, 1); + GL11.glTranslated(tipSideOffset * px, -pivotFrontOffset * px, -tipZOffset * px); + this.wingRT.render(scaleFactor); + // + GL11.glPopMatrix(); GL11.glDisable(GL11.GL_CULL_FACE); - + GL11.glPopMatrix(); - + GL11.glPopMatrix(); } - + protected boolean doesRotateZ() { return true; } - + protected ResourceLocation getTexture() { if(this.type == 2) return ResourceManager.wings_bob; if(this.type == 3) return ResourceManager.wings_black; - + return ResourceManager.wings_murk; } } diff --git a/src/main/java/com/hbm/render/model/ModelArmorWingsPheo.java b/src/main/java/com/hbm/render/model/ModelArmorWingsPheo.java index eade0094e..97b320adc 100644 --- a/src/main/java/com/hbm/render/model/ModelArmorWingsPheo.java +++ b/src/main/java/com/hbm/render/model/ModelArmorWingsPheo.java @@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.entity.Entity; @@ -13,21 +12,22 @@ import net.minecraft.entity.Entity; public class ModelArmorWingsPheo extends ModelArmorBase { ModelRendererObj axe; - + public ModelArmorWingsPheo() { super(0); - axe = new ModelRendererObj(ResourceManager.armor_axepack, "Wings"); + this.axe = new ModelRendererObj(ResourceManager.armor_axepack, "Wings"); } @Override - public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, entity); - body.copyTo(axe); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.body.copyTo(this.axe); + GL11.glShadeModel(GL11.GL_SMOOTH); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.wings_pheo); - axe.render(par7); - + bindTexture(ResourceManager.wings_pheo); + this.axe.render(scaleFactor); + GL11.glPushMatrix(); float lastX = OpenGlHelper.lastBrightnessX; float lastY = OpenGlHelper.lastBrightnessY; @@ -37,16 +37,16 @@ public class ModelArmorWingsPheo extends ModelArmorBase { GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); - + double pixel = 0.0625D; - + if(entity.isSneaking()) { GL11.glRotated(28.6479D, 1, 0, 0); } - + GL11.glPushMatrix(); GL11.glTranslated(0, pixel * 15, pixel * 5.5); - this.renderFlame(); + renderFlame(); GL11.glPopMatrix(); GL11.glPushMatrix(); @@ -54,26 +54,26 @@ public class ModelArmorWingsPheo extends ModelArmorBase { GL11.glRotated(-25, 0, 1, 0); GL11.glRotated(-90, 0, 0, 1); GL11.glTranslated(0, pixel * 5, 0); - this.renderFlame(); + renderFlame(); GL11.glPushMatrix(); GL11.glTranslated(0, -pixel * 5, 0); GL11.glRotated(45, 0, 0, 1); GL11.glTranslated(-pixel, pixel * 5.5, 0); - this.renderFlame(); + renderFlame(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslated(0, -pixel * 5, 0); GL11.glRotated(-45, 0, 0, 1); GL11.glTranslated(pixel, pixel * 5.5, 0); - this.renderFlame(); + renderFlame(); GL11.glPopMatrix(); GL11.glPopMatrix(); - + GL11.glPushMatrix(); GL11.glTranslated(0, pixel * 15, pixel * 5.5); - this.renderFlame(); + renderFlame(); GL11.glPopMatrix(); GL11.glPushMatrix(); @@ -81,20 +81,20 @@ public class ModelArmorWingsPheo extends ModelArmorBase { GL11.glRotated(25, 0, 1, 0); GL11.glRotated(90, 0, 0, 1); GL11.glTranslated(0, pixel * 5, 0); - this.renderFlame(); + renderFlame(); GL11.glPushMatrix(); GL11.glTranslated(0, -pixel * 5, 0); GL11.glRotated(45, 0, 0, 1); GL11.glTranslated(-pixel, pixel * 5.5, 0); - this.renderFlame(); + renderFlame(); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslated(0, -pixel * 5, 0); GL11.glRotated(-45, 0, 0, 1); GL11.glTranslated(pixel, pixel * 5.5, 0); - this.renderFlame(); + renderFlame(); GL11.glPopMatrix(); GL11.glPopMatrix(); @@ -104,15 +104,15 @@ public class ModelArmorWingsPheo extends ModelArmorBase { GL11.glPopAttrib(); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY); GL11.glPopMatrix(); - + GL11.glShadeModel(GL11.GL_FLAT); } - + private static void renderFlame() { - + Tessellator tess = Tessellator.instance; tess.startDrawing(GL11.GL_TRIANGLES); - + double b = 0.125D; double t = 0.375; double w = 0.0625D; @@ -120,7 +120,7 @@ public class ModelArmorWingsPheo extends ModelArmorBase { int colorBase = 0x808080; int colorFlame = 0x004040; int colorTip = 0x000000; - + tess.setColorOpaque_I(colorBase); tess.addVertex(0, 0, 0); tess.setColorOpaque_I(colorFlame); @@ -168,9 +168,9 @@ public class ModelArmorWingsPheo extends ModelArmorBase { tess.setColorOpaque_I(colorFlame); tess.addVertex(s2, b, -s2); tess.addVertex(w, b, 0); - + //////////////////////// - + tess.setColorOpaque_I(colorTip); tess.addVertex(0, t, 0); tess.setColorOpaque_I(colorFlame); @@ -218,7 +218,7 @@ public class ModelArmorWingsPheo extends ModelArmorBase { tess.setColorOpaque_I(colorFlame); tess.addVertex(s2, b, -s2); tess.addVertex(w, b, 0); - + tess.draw(); } } diff --git a/src/main/java/com/hbm/render/model/ModelB92.java b/src/main/java/com/hbm/render/model/ModelB92.java index 4fae59313..98cd1878f 100644 --- a/src/main/java/com/hbm/render/model/ModelB92.java +++ b/src/main/java/com/hbm/render/model/ModelB92.java @@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelB92 extends ModelBase { - // fields + ModelRenderer Muzzle1; ModelRenderer Barrel1; ModelRenderer Barrel2; @@ -35,182 +35,178 @@ public class ModelB92 extends ModelBase { ModelRenderer BodyPlate; public ModelB92() { - textureWidth = 64; - textureHeight = 64; + this.textureWidth = 64; + this.textureHeight = 64; - Muzzle1 = new ModelRenderer(this, 22, 36); - Muzzle1.addBox(0F, 0F, 0F, 2, 3, 2); - Muzzle1.setRotationPoint(-24F, 0.5F, -1F); - Muzzle1.setTextureSize(64, 64); - Muzzle1.mirror = true; - setRotation(Muzzle1, 0F, 0F, 0F); - Barrel1 = new ModelRenderer(this, 0, 0); - Barrel1.addBox(0F, 0F, 0F, 24, 2, 3); - Barrel1.setRotationPoint(-24F, 1F, -1.5F); - Barrel1.setTextureSize(64, 64); - Barrel1.mirror = true; - setRotation(Barrel1, 0F, 0F, 0F); - Barrel2 = new ModelRenderer(this, 0, 5); - Barrel2.addBox(0F, 0F, 0F, 22, 1, 2); - Barrel2.setRotationPoint(-22F, 0.5F, -1F); - Barrel2.setTextureSize(64, 64); - Barrel2.mirror = true; - setRotation(Barrel2, 0F, 0F, 0F); - Grip = new ModelRenderer(this, 0, 8); - Grip.addBox(0F, 0F, 0F, 20, 3, 4); - Grip.setRotationPoint(-20F, 3F, -2F); - Grip.setTextureSize(64, 64); - Grip.mirror = true; - setRotation(Grip, 0F, 0F, 0F); - Front1 = new ModelRenderer(this, 10, 36); - Front1.addBox(0F, 0F, 0F, 2, 4, 4); - Front1.setRotationPoint(-22F, 0.5F, -2F); - Front1.setTextureSize(64, 64); - Front1.mirror = true; - setRotation(Front1, 0F, 0F, 0F); - Front2 = new ModelRenderer(this, 0, 36); - Front2.addBox(0F, 0F, 0F, 2, 6, 3); - Front2.setRotationPoint(-22F, 0F, -1.5F); - Front2.setTextureSize(64, 64); - Front2.mirror = true; - setRotation(Front2, 0F, 0F, 0F); - Body = new ModelRenderer(this, 0, 15); - Body.addBox(0F, 0F, 0F, 15, 7, 4); - Body.setRotationPoint(0F, 0.5F, -2F); - Body.setTextureSize(64, 64); - Body.mirror = true; - setRotation(Body, 0F, 0F, 0F); - Top = new ModelRenderer(this, 28, 60); - Top.addBox(0F, 0F, 0F, 15, 1, 3); - Top.setRotationPoint(0F, 0F, -1.5F); - Top.setTextureSize(64, 64); - Top.mirror = true; - setRotation(Top, 0F, 0F, 0F); - GripBottom = new ModelRenderer(this, 24, 43); - GripBottom.addBox(0F, 0F, 0F, 18, 1, 2); - GripBottom.setRotationPoint(-18F, 5.5F, -1F); - GripBottom.setTextureSize(64, 64); - GripBottom.mirror = true; - setRotation(GripBottom, 0F, 0F, 0F); - Handle = new ModelRenderer(this, 0, 45); - Handle.addBox(0F, 0F, 0F, 6, 15, 4); - Handle.setRotationPoint(6F, 7F, -2F); - Handle.setTextureSize(64, 64); - Handle.mirror = true; - setRotation(Handle, 0F, 0F, -0.2268928F); - HandleBack = new ModelRenderer(this, 20, 46); - HandleBack.addBox(5.5F, 0F, 0F, 1, 15, 3); - HandleBack.setRotationPoint(6F, 7F, -1.5F); - HandleBack.setTextureSize(64, 64); - HandleBack.mirror = true; - setRotation(HandleBack, 0F, 0F, -0.2268928F); - Frame1 = new ModelRenderer(this, 28, 57); - Frame1.addBox(0F, 0F, 0F, 7, 1, 2); - Frame1.setRotationPoint(0.5F, 11F, -1F); - Frame1.setTextureSize(64, 64); - Frame1.mirror = true; - setRotation(Frame1, 0F, 0F, 0F); - Frame2 = new ModelRenderer(this, 28, 51); - Frame2.addBox(0F, 0F, 0F, 2, 4, 2); - Frame2.setRotationPoint(-2F, 6.5F, -1F); - Frame2.setTextureSize(64, 64); - Frame2.mirror = true; - setRotation(Frame2, 0F, 0F, 0F); - Frame3 = new ModelRenderer(this, 46, 57); - Frame3.addBox(0F, -1F, 0F, 3, 1, 2); - Frame3.setRotationPoint(-2F, 10.5F, -1F); - Frame3.setTextureSize(64, 64); - Frame3.mirror = true; - setRotation(Frame3, 0F, 0F, 0.5235988F); - Trigger = new ModelRenderer(this, 36, 53); - Trigger.addBox(0F, 0F, 0F, 2, 3, 1); - Trigger.setRotationPoint(4F, 7F, -0.5F); - Trigger.setTextureSize(64, 64); - Trigger.mirror = true; - setRotation(Trigger, 0F, 0F, 0.1919862F); - BackPlate1 = new ModelRenderer(this, 56, 53); - BackPlate1.addBox(-1F, 0F, 0F, 1, 4, 3); - BackPlate1.setRotationPoint(15F, 0F, -1.5F); - BackPlate1.setTextureSize(64, 64); - BackPlate1.mirror = true; - setRotation(BackPlate1, 0F, 0F, -0.5235988F); - Back = new ModelRenderer(this, 42, 49); - Back.addBox(0F, 0F, 0F, 2, 4, 4); - Back.setRotationPoint(15F, 3.5F, -2F); - Back.setTextureSize(64, 64); - Back.mirror = true; - setRotation(Back, 0F, 0F, 0F); - BackPlate2 = new ModelRenderer(this, 48, 5); - BackPlate2.addBox(-2F, 0F, 0F, 2, 4, 4); - BackPlate2.setRotationPoint(15F, 0.5F, -2F); - BackPlate2.setTextureSize(64, 64); - BackPlate2.mirror = true; - setRotation(BackPlate2, 0F, 0F, -0.4886922F); - Pump1 = new ModelRenderer(this, 46, 29); - Pump1.addBox(0F, 0F, 0F, 7, 2, 2); - Pump1.setRotationPoint(10F, 1F, -1F); - Pump1.setTextureSize(64, 64); - Pump1.mirror = true; - setRotation(Pump1, 0F, 0F, 0F); - Pump2 = new ModelRenderer(this, 44, 33); - Pump2.addBox(0F, 0F, 0F, 3, 3, 7); - Pump2.setRotationPoint(17F, 0.5F, -3.5F); - Pump2.setTextureSize(64, 64); - Pump2.mirror = true; - setRotation(Pump2, 0F, 0F, 0F); - BodyPlate = new ModelRenderer(this, 0, 26); - BodyPlate.addBox(0F, 0F, 0F, 14, 5, 5); - BodyPlate.setRotationPoint(1.5F, 2F, -2.5F); - BodyPlate.setTextureSize(64, 64); - BodyPlate.mirror = true; - setRotation(BodyPlate, 0F, 0F, 0F); + this.Muzzle1 = new ModelRenderer(this, 22, 36); + this.Muzzle1.addBox(0F, 0F, 0F, 2, 3, 2); + this.Muzzle1.setRotationPoint(-24F, 0.5F, -1F); + this.Muzzle1.setTextureSize(64, 64); + this.Muzzle1.mirror = true; + setRotation(this.Muzzle1, 0F, 0F, 0F); + this.Barrel1 = new ModelRenderer(this, 0, 0); + this.Barrel1.addBox(0F, 0F, 0F, 24, 2, 3); + this.Barrel1.setRotationPoint(-24F, 1F, -1.5F); + this.Barrel1.setTextureSize(64, 64); + this.Barrel1.mirror = true; + setRotation(this.Barrel1, 0F, 0F, 0F); + this.Barrel2 = new ModelRenderer(this, 0, 5); + this.Barrel2.addBox(0F, 0F, 0F, 22, 1, 2); + this.Barrel2.setRotationPoint(-22F, 0.5F, -1F); + this.Barrel2.setTextureSize(64, 64); + this.Barrel2.mirror = true; + setRotation(this.Barrel2, 0F, 0F, 0F); + this.Grip = new ModelRenderer(this, 0, 8); + this.Grip.addBox(0F, 0F, 0F, 20, 3, 4); + this.Grip.setRotationPoint(-20F, 3F, -2F); + this.Grip.setTextureSize(64, 64); + this.Grip.mirror = true; + setRotation(this.Grip, 0F, 0F, 0F); + this.Front1 = new ModelRenderer(this, 10, 36); + this.Front1.addBox(0F, 0F, 0F, 2, 4, 4); + this.Front1.setRotationPoint(-22F, 0.5F, -2F); + this.Front1.setTextureSize(64, 64); + this.Front1.mirror = true; + setRotation(this.Front1, 0F, 0F, 0F); + this.Front2 = new ModelRenderer(this, 0, 36); + this.Front2.addBox(0F, 0F, 0F, 2, 6, 3); + this.Front2.setRotationPoint(-22F, 0F, -1.5F); + this.Front2.setTextureSize(64, 64); + this.Front2.mirror = true; + setRotation(this.Front2, 0F, 0F, 0F); + this.Body = new ModelRenderer(this, 0, 15); + this.Body.addBox(0F, 0F, 0F, 15, 7, 4); + this.Body.setRotationPoint(0F, 0.5F, -2F); + this.Body.setTextureSize(64, 64); + this.Body.mirror = true; + setRotation(this.Body, 0F, 0F, 0F); + this.Top = new ModelRenderer(this, 28, 60); + this.Top.addBox(0F, 0F, 0F, 15, 1, 3); + this.Top.setRotationPoint(0F, 0F, -1.5F); + this.Top.setTextureSize(64, 64); + this.Top.mirror = true; + setRotation(this.Top, 0F, 0F, 0F); + this.GripBottom = new ModelRenderer(this, 24, 43); + this.GripBottom.addBox(0F, 0F, 0F, 18, 1, 2); + this.GripBottom.setRotationPoint(-18F, 5.5F, -1F); + this.GripBottom.setTextureSize(64, 64); + this.GripBottom.mirror = true; + setRotation(this.GripBottom, 0F, 0F, 0F); + this.Handle = new ModelRenderer(this, 0, 45); + this.Handle.addBox(0F, 0F, 0F, 6, 15, 4); + this.Handle.setRotationPoint(6F, 7F, -2F); + this.Handle.setTextureSize(64, 64); + this.Handle.mirror = true; + setRotation(this.Handle, 0F, 0F, -0.2268928F); + this.HandleBack = new ModelRenderer(this, 20, 46); + this.HandleBack.addBox(5.5F, 0F, 0F, 1, 15, 3); + this.HandleBack.setRotationPoint(6F, 7F, -1.5F); + this.HandleBack.setTextureSize(64, 64); + this.HandleBack.mirror = true; + setRotation(this.HandleBack, 0F, 0F, -0.2268928F); + this.Frame1 = new ModelRenderer(this, 28, 57); + this.Frame1.addBox(0F, 0F, 0F, 7, 1, 2); + this.Frame1.setRotationPoint(0.5F, 11F, -1F); + this.Frame1.setTextureSize(64, 64); + this.Frame1.mirror = true; + setRotation(this.Frame1, 0F, 0F, 0F); + this.Frame2 = new ModelRenderer(this, 28, 51); + this.Frame2.addBox(0F, 0F, 0F, 2, 4, 2); + this.Frame2.setRotationPoint(-2F, 6.5F, -1F); + this.Frame2.setTextureSize(64, 64); + this.Frame2.mirror = true; + setRotation(this.Frame2, 0F, 0F, 0F); + this.Frame3 = new ModelRenderer(this, 46, 57); + this.Frame3.addBox(0F, -1F, 0F, 3, 1, 2); + this.Frame3.setRotationPoint(-2F, 10.5F, -1F); + this.Frame3.setTextureSize(64, 64); + this.Frame3.mirror = true; + setRotation(this.Frame3, 0F, 0F, 0.5235988F); + this.Trigger = new ModelRenderer(this, 36, 53); + this.Trigger.addBox(0F, 0F, 0F, 2, 3, 1); + this.Trigger.setRotationPoint(4F, 7F, -0.5F); + this.Trigger.setTextureSize(64, 64); + this.Trigger.mirror = true; + setRotation(this.Trigger, 0F, 0F, 0.1919862F); + this.BackPlate1 = new ModelRenderer(this, 56, 53); + this.BackPlate1.addBox(-1F, 0F, 0F, 1, 4, 3); + this.BackPlate1.setRotationPoint(15F, 0F, -1.5F); + this.BackPlate1.setTextureSize(64, 64); + this.BackPlate1.mirror = true; + setRotation(this.BackPlate1, 0F, 0F, -0.5235988F); + this.Back = new ModelRenderer(this, 42, 49); + this.Back.addBox(0F, 0F, 0F, 2, 4, 4); + this.Back.setRotationPoint(15F, 3.5F, -2F); + this.Back.setTextureSize(64, 64); + this.Back.mirror = true; + setRotation(this.Back, 0F, 0F, 0F); + this.BackPlate2 = new ModelRenderer(this, 48, 5); + this.BackPlate2.addBox(-2F, 0F, 0F, 2, 4, 4); + this.BackPlate2.setRotationPoint(15F, 0.5F, -2F); + this.BackPlate2.setTextureSize(64, 64); + this.BackPlate2.mirror = true; + setRotation(this.BackPlate2, 0F, 0F, -0.4886922F); + this.Pump1 = new ModelRenderer(this, 46, 29); + this.Pump1.addBox(0F, 0F, 0F, 7, 2, 2); + this.Pump1.setRotationPoint(10F, 1F, -1F); + this.Pump1.setTextureSize(64, 64); + this.Pump1.mirror = true; + setRotation(this.Pump1, 0F, 0F, 0F); + this.Pump2 = new ModelRenderer(this, 44, 33); + this.Pump2.addBox(0F, 0F, 0F, 3, 3, 7); + this.Pump2.setRotationPoint(17F, 0.5F, -3.5F); + this.Pump2.setTextureSize(64, 64); + this.Pump2.mirror = true; + setRotation(this.Pump2, 0F, 0F, 0F); + this.BodyPlate = new ModelRenderer(this, 0, 26); + this.BodyPlate.addBox(0F, 0F, 0F, 14, 5, 5); + this.BodyPlate.setRotationPoint(1.5F, 2F, -2.5F); + this.BodyPlate.setTextureSize(64, 64); + this.BodyPlate.mirror = true; + setRotation(this.BodyPlate, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Muzzle1.render(f5); - Barrel1.render(f5); - Barrel2.render(f5); - Grip.render(f5); - Front1.render(f5); - Front2.render(f5); - Body.render(f5); - Top.render(f5); - GripBottom.render(f5); - Handle.render(f5); - HandleBack.render(f5); - Frame1.render(f5); - Frame2.render(f5); - Frame3.render(f5); - Trigger.render(f5); - BackPlate1.render(f5); - Back.render(f5); - BackPlate2.render(f5); - Pump1.render(f5); - Pump2.render(f5); - BodyPlate.render(f5); + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.Muzzle1.render(scaleFactor); + this.Barrel1.render(scaleFactor); + this.Barrel2.render(scaleFactor); + this.Grip.render(scaleFactor); + this.Front1.render(scaleFactor); + this.Front2.render(scaleFactor); + this.Body.render(scaleFactor); + this.Top.render(scaleFactor); + this.GripBottom.render(scaleFactor); + this.Handle.render(scaleFactor); + this.HandleBack.render(scaleFactor); + this.Frame1.render(scaleFactor); + this.Frame2.render(scaleFactor); + this.Frame3.render(scaleFactor); + this.Trigger.render(scaleFactor); + this.BackPlate1.render(scaleFactor); + this.Back.render(scaleFactor); + this.BackPlate2.render(scaleFactor); + this.Pump1.render(scaleFactor); + this.Pump2.render(scaleFactor); + this.BodyPlate.render(scaleFactor); } - public void renderAnim(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, float tran) { + public void renderAnim(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, float tran) { - Pump1.offsetX += tran; - Pump2.offsetX += tran; - - render(entity, f, f1, f2, f3, f4, f5); - - Pump1.offsetX -= tran; - Pump2.offsetX -= tran; + this.Pump1.offsetX += tran; + this.Pump2.offsetX += tran; + + this.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor); + + this.Pump1.offsetX -= tran; + this.Pump2.offsetX -= tran; } - private void setRotation(ModelRenderer model, float x, float y, float z) { + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - } diff --git a/src/main/java/com/hbm/render/model/ModelBackTesla.java b/src/main/java/com/hbm/render/model/ModelBackTesla.java index 6c9296886..7f1bf8321 100644 --- a/src/main/java/com/hbm/render/model/ModelBackTesla.java +++ b/src/main/java/com/hbm/render/model/ModelBackTesla.java @@ -5,29 +5,27 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; public class ModelBackTesla extends ModelArmorBase { public ModelBackTesla() { super(1); - body = new ModelRendererObj(ResourceManager.armor_mod_tesla); + this.body = new ModelRendererObj(ResourceManager.armor_mod_tesla); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); GL11.glShadeModel(GL11.GL_SMOOTH); - - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.mod_tesla); - body.render(par7); - + + bindTexture(ResourceManager.mod_tesla); + this.body.render(scaleFactor); + GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); } - } diff --git a/src/main/java/com/hbm/render/model/ModelBigSword.java b/src/main/java/com/hbm/render/model/ModelBigSword.java index 29765119a..b4ea17f5f 100644 --- a/src/main/java/com/hbm/render/model/ModelBigSword.java +++ b/src/main/java/com/hbm/render/model/ModelBigSword.java @@ -4,94 +4,78 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX - - - - - package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelBigSword extends ModelBase -{ - //fields - ModelRenderer HandleBottom; - ModelRenderer HandleGrip; - ModelRenderer Handle1; - ModelRenderer Handle2; - ModelRenderer Blade; - ModelRenderer SBladeTip; - - public ModelBigSword() - { - textureWidth = 128; - textureHeight = 32; - - HandleBottom = new ModelRenderer(this, 1, 1); - HandleBottom.addBox(0F, 0F, 0F, 1, 3, 3); - HandleBottom.setRotationPoint(0F, 0F, 0F); - HandleBottom.setTextureSize(64, 32); - HandleBottom.mirror = true; - setRotation(HandleBottom, -0.7853982F, 0F, 0F); - HandleGrip = new ModelRenderer(this, 17, 1); - HandleGrip.addBox(0F, 0F, 0F, 1, 5, 2); - HandleGrip.setRotationPoint(0F, -4F, -1F); - HandleGrip.setTextureSize(64, 32); - HandleGrip.mirror = true; - setRotation(HandleGrip, 0F, 0F, 0F); - Handle1 = new ModelRenderer(this, 25, 1); - Handle1.addBox(0F, -1F, 0F, 2, 1, 4); - Handle1.setRotationPoint(-0.5F, -3F, 0F); - Handle1.setTextureSize(64, 32); - Handle1.mirror = true; - setRotation(Handle1, 0.2617994F, 0F, 0F); - Handle2 = new ModelRenderer(this, 41, 1); - Handle2.addBox(0F, -1F, -4F, 2, 1, 4); - Handle2.setRotationPoint(-0.5F, -3F, 0F); - Handle2.setTextureSize(64, 32); - Handle2.mirror = true; - setRotation(Handle2, -0.2617994F, 0F, 0F); - Blade = new ModelRenderer(this, 57, 1); - Blade.addBox(0F, 0F, 0F, 3, 18, 1); - Blade.setRotationPoint(0F, -22F, 1.5F); - Blade.setTextureSize(64, 32); - Blade.mirror = true; - setRotation(Blade, 0F, 1.570796F, 0F); - SBladeTip = new ModelRenderer(this, 2, 10); - SBladeTip.addBox(0F, 0F, 0F, 1, 2, 2); - SBladeTip.setRotationPoint(0F, -23.5F, 0F); - SBladeTip.setTextureSize(64, 32); - SBladeTip.mirror = true; - setRotation(SBladeTip, -0.7853982F, 0F, 0F); - } - - @Override -public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - HandleBottom.render(f5); - HandleGrip.render(f5); - Handle1.render(f5); - Handle2.render(f5); - Blade.render(f5); - SBladeTip.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override -public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } +public class ModelBigSword extends ModelBase { + ModelRenderer HandleBottom; + ModelRenderer HandleGrip; + ModelRenderer Handle1; + ModelRenderer Handle2; + ModelRenderer Blade; + ModelRenderer SBladeTip; + + public ModelBigSword() { + this.textureWidth = 128; + this.textureHeight = 32; + + this.HandleBottom = new ModelRenderer(this, 1, 1); + this.HandleBottom.addBox(0F, 0F, 0F, 1, 3, 3); + this.HandleBottom.setRotationPoint(0F, 0F, 0F); + this.HandleBottom.setTextureSize(64, 32); + this.HandleBottom.mirror = true; + setRotation(this.HandleBottom, -0.7853982F, 0F, 0F); + this.HandleGrip = new ModelRenderer(this, 17, 1); + this.HandleGrip.addBox(0F, 0F, 0F, 1, 5, 2); + this.HandleGrip.setRotationPoint(0F, -4F, -1F); + this.HandleGrip.setTextureSize(64, 32); + this.HandleGrip.mirror = true; + setRotation(this.HandleGrip, 0F, 0F, 0F); + this.Handle1 = new ModelRenderer(this, 25, 1); + this.Handle1.addBox(0F, -1F, 0F, 2, 1, 4); + this.Handle1.setRotationPoint(-0.5F, -3F, 0F); + this.Handle1.setTextureSize(64, 32); + this.Handle1.mirror = true; + setRotation(this.Handle1, 0.2617994F, 0F, 0F); + this.Handle2 = new ModelRenderer(this, 41, 1); + this.Handle2.addBox(0F, -1F, -4F, 2, 1, 4); + this.Handle2.setRotationPoint(-0.5F, -3F, 0F); + this.Handle2.setTextureSize(64, 32); + this.Handle2.mirror = true; + setRotation(this.Handle2, -0.2617994F, 0F, 0F); + this.Blade = new ModelRenderer(this, 57, 1); + this.Blade.addBox(0F, 0F, 0F, 3, 18, 1); + this.Blade.setRotationPoint(0F, -22F, 1.5F); + this.Blade.setTextureSize(64, 32); + this.Blade.mirror = true; + setRotation(this.Blade, 0F, 1.570796F, 0F); + this.SBladeTip = new ModelRenderer(this, 2, 10); + this.SBladeTip.addBox(0F, 0F, 0F, 1, 2, 2); + this.SBladeTip.setRotationPoint(0F, -23.5F, 0F); + this.SBladeTip.setTextureSize(64, 32); + this.SBladeTip.mirror = true; + setRotation(this.SBladeTip, -0.7853982F, 0F, 0F); + } + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.HandleBottom.render(scaleFactor); + this.HandleGrip.render(scaleFactor); + this.Handle1.render(scaleFactor); + this.Handle2.render(scaleFactor); + this.Blade.render(scaleFactor); + this.SBladeTip.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelBlockSpider.java b/src/main/java/com/hbm/render/model/ModelBlockSpider.java index a5fe9d714..4a7a61132 100644 --- a/src/main/java/com/hbm/render/model/ModelBlockSpider.java +++ b/src/main/java/com/hbm/render/model/ModelBlockSpider.java @@ -13,30 +13,26 @@ import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class ModelBlockSpider extends ModelBase { - - private final RenderBlocks field_147920_a = new RenderBlocks(); @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + int blockId = entity.getDataWatcher().getWatchableObjectInt(12); + Block block = Block.getBlockById(blockId); + + if(block == null) { + return; + } + + float rot = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + 0.0F) * 0.4F) * limbSwingAmount * 57.3F; + int meta = entity.getDataWatcher().getWatchableObjectInt(13); + GL11.glPushMatrix(); GL11.glRotatef(90, 0, -1, 0); GL11.glRotatef(180, 0, 0, 1); GL11.glTranslatef(0, -1.5F, 0); - float rot = -(MathHelper.cos(f * 0.6662F * 2.0F + 0.0F) * 0.4F) * f1 * 57.3F; - - int blockid = entity.getDataWatcher().getWatchableObjectInt(12); - int meta = entity.getDataWatcher().getWatchableObjectInt(13); - Block block = Block.getBlockById(blockid); - - if(block == null) { - GL11.glPopMatrix(); - return; - } - GL11.glPushMatrix(); GL11.glTranslated(0, rot * 0.005, 0); GL11.glRotatef(rot, 0, 1, 0); @@ -54,16 +50,15 @@ public class ModelBlockSpider extends ModelBase { ResourceManager.spider.renderPart("Leg6"); ResourceManager.spider.renderPart("Leg8"); GL11.glPopMatrix(); - + GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); GL11.glTranslated(0, 0.75, 0); - this.field_147920_a.renderBlockAsItem(block, meta, entity.getBrightness(f5)); + RenderBlocks.getInstance().renderBlockAsItem(block, meta, entity.getBrightness(scaleFactor)); GL11.glPopMatrix(); //this.field_147920_a.setRenderBoundsFromBlock(block); //this.field_147920_a.renderBlockSandFalling(block, entity.worldObj, (int)Math.floor(entity.posX), (int)Math.floor(entity.posY), (int)Math.floor(entity.posZ), blockid); - + GL11.glPopMatrix(); } - } diff --git a/src/main/java/com/hbm/render/model/ModelBroadcaster.java b/src/main/java/com/hbm/render/model/ModelBroadcaster.java index ef8ed5e46..975659f98 100644 --- a/src/main/java/com/hbm/render/model/ModelBroadcaster.java +++ b/src/main/java/com/hbm/render/model/ModelBroadcaster.java @@ -11,66 +11,60 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelBroadcaster extends ModelBase { - // fields + ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; ModelRenderer Shape4; public ModelBroadcaster() { - textureWidth = 64; - textureHeight = 32; + this.textureWidth = 64; + this.textureHeight = 32; - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 14, 10, 8); - Shape1.setRotationPoint(-7F, 14F, -4F); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 4, 21); - Shape2.addBox(0F, 0F, 0F, 2, 3, 2); - Shape2.setRotationPoint(-5F, 11F, -1F); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 0, 18); - Shape3.addBox(0F, 0F, 0F, 1, 11, 1); - Shape3.setRotationPoint(-4.5F, 0F, -0.5F); - Shape3.setTextureSize(64, 32); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 4, 18); - Shape4.addBox(0F, 0F, 0F, 3, 2, 1); - Shape4.setRotationPoint(2F, 12F, -0.5F); - Shape4.setTextureSize(64, 32); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 14, 10, 8); + this.Shape1.setRotationPoint(-7F, 14F, -4F); + this.Shape1.setTextureSize(64, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + this.Shape2 = new ModelRenderer(this, 4, 21); + this.Shape2.addBox(0F, 0F, 0F, 2, 3, 2); + this.Shape2.setRotationPoint(-5F, 11F, -1F); + this.Shape2.setTextureSize(64, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + this.Shape3 = new ModelRenderer(this, 0, 18); + this.Shape3.addBox(0F, 0F, 0F, 1, 11, 1); + this.Shape3.setRotationPoint(-4.5F, 0F, -0.5F); + this.Shape3.setTextureSize(64, 32); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0F, 0F, 0F); + this.Shape4 = new ModelRenderer(this, 4, 18); + this.Shape4.addBox(0F, 0F, 0F, 3, 2, 1); + this.Shape4.setRotationPoint(2F, 12F, -0.5F); + this.Shape4.setTextureSize(64, 32); + this.Shape4.mirror = true; + setRotation(this.Shape4, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderModel(scaleFactor); } - public void renderModel(float f) { - Shape1.render(f); - Shape2.render(f); - Shape3.render(f); - Shape4.render(f); + public void renderModel(float scaleFactor) { + + this.Shape1.render(scaleFactor); + this.Shape2.render(scaleFactor); + this.Shape3.render(scaleFactor); + this.Shape4.render(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - } diff --git a/src/main/java/com/hbm/render/model/ModelBuckshot.java b/src/main/java/com/hbm/render/model/ModelBuckshot.java index 2ddadaf54..1beb6e60b 100644 --- a/src/main/java/com/hbm/render/model/ModelBuckshot.java +++ b/src/main/java/com/hbm/render/model/ModelBuckshot.java @@ -9,37 +9,32 @@ public class ModelBuckshot extends ModelBase { ModelRenderer bullet; public ModelBuckshot() { - textureWidth = 4; - textureHeight = 4; + this.textureWidth = 4; + this.textureHeight = 4; - bullet = new ModelRenderer(this, 0, 0); - bullet.addBox(0F, 0F, 0F, 1, 1, 1); - bullet.setRotationPoint(1F, -0.5F, -0.5F); - bullet.setTextureSize(4, 4); - bullet.mirror = true; - setRotation(bullet, 0F, 0F, 0F); + this.bullet = new ModelRenderer(this, 0, 0); + this.bullet.addBox(0F, 0F, 0F, 1, 1, 1); + this.bullet.setRotationPoint(1F, -0.5F, -0.5F); + this.bullet.setTextureSize(4, 4); + this.bullet.mirror = true; + setRotation(this.bullet, 0F, 0F, 0F); } @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - bullet.render(f5); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderAll(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + public void renderAll(float scaleFactor) { + + this.bullet.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - - public void renderAll(float f5) { - bullet.render(f5); - } - -} \ No newline at end of file +} diff --git a/src/main/java/com/hbm/render/model/ModelBullet.java b/src/main/java/com/hbm/render/model/ModelBullet.java index ad9a60a1a..8b2ef2a43 100644 --- a/src/main/java/com/hbm/render/model/ModelBullet.java +++ b/src/main/java/com/hbm/render/model/ModelBullet.java @@ -9,37 +9,32 @@ public class ModelBullet extends ModelBase { ModelRenderer bullet; public ModelBullet() { - textureWidth = 8; - textureHeight = 4; + this.textureWidth = 8; + this.textureHeight = 4; - bullet = new ModelRenderer(this, 0, 0); - bullet.addBox(0F, 0F, 0F, 2, 1, 1); - bullet.setRotationPoint(1F, -0.5F, -0.5F); - bullet.setTextureSize(8, 4); - bullet.mirror = true; - setRotation(bullet, 0F, 0F, 0F); + this.bullet = new ModelRenderer(this, 0, 0); + this.bullet.addBox(0F, 0F, 0F, 2, 1, 1); + this.bullet.setRotationPoint(1F, -0.5F, -0.5F); + this.bullet.setTextureSize(8, 4); + this.bullet.mirror = true; + setRotation(this.bullet, 0F, 0F, 0F); } @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - bullet.render(f5); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderAll(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + public void renderAll(float scaleFactor) { + + this.bullet.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - - public void renderAll(float f5) { - bullet.render(f5); - } - -} \ No newline at end of file +} diff --git a/src/main/java/com/hbm/render/model/ModelChopperMine.java b/src/main/java/com/hbm/render/model/ModelChopperMine.java index dc9127c8e..774c04356 100644 --- a/src/main/java/com/hbm/render/model/ModelChopperMine.java +++ b/src/main/java/com/hbm/render/model/ModelChopperMine.java @@ -9,37 +9,32 @@ public class ModelChopperMine extends ModelBase { ModelRenderer bullet; public ModelChopperMine() { - textureWidth = 32; - textureHeight = 16; + this.textureWidth = 32; + this.textureHeight = 16; - bullet = new ModelRenderer(this, 0, 0); - bullet.addBox(0F, 0F, 0F, 8, 8, 8); - bullet.setRotationPoint(-4F, -4F, -4F); - bullet.setTextureSize(32, 16); - bullet.mirror = true; - setRotation(bullet, 0F, 0F, 0F); + this.bullet = new ModelRenderer(this, 0, 0); + this.bullet.addBox(0F, 0F, 0F, 8, 8, 8); + this.bullet.setRotationPoint(-4F, -4F, -4F); + this.bullet.setTextureSize(32, 16); + this.bullet.mirror = true; + setRotation(this.bullet, 0F, 0F, 0F); } @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - bullet.render(f5); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderAll(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + public void renderAll(float scaleFactor) { + + this.bullet.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - - public void renderAll(float f5) { - bullet.render(f5); - } - -} \ No newline at end of file +} diff --git a/src/main/java/com/hbm/render/model/ModelCloak.java b/src/main/java/com/hbm/render/model/ModelCloak.java index 2a86abbc4..1cd647d66 100644 --- a/src/main/java/com/hbm/render/model/ModelCloak.java +++ b/src/main/java/com/hbm/render/model/ModelCloak.java @@ -9,33 +9,32 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.MathHelper; public class ModelCloak extends ModelBiped { + public ModelCloak() { - textureWidth = 64; - textureHeight = 32; + this.textureWidth = 64; + this.textureHeight = 32; } @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { + EntityPlayer player = (EntityPlayer) entity; - if(player.isSneaking()) { - this.isSneak = true; - } else { - this.isSneak = false; - } - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + this.isSneak = player.isSneaking(); + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - if(par1Entity instanceof AbstractClientPlayer) { - AbstractClientPlayer player = (AbstractClientPlayer) par1Entity; + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + if(entity instanceof AbstractClientPlayer) { + AbstractClientPlayer player = (AbstractClientPlayer) entity; GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 0.0F, 0.125F); - double d3 = player.field_71091_bM + (player.field_71094_bP - player.field_71091_bM) * par7 - (player.prevPosX + (player.posX - player.prevPosX) * par7); - double d4 = player.field_71096_bN + (player.field_71095_bQ - player.field_71096_bN) * par7 - (player.prevPosY + (player.posY - player.prevPosY) * par7); - double d0 = player.field_71097_bO + (player.field_71085_bR - player.field_71097_bO) * par7 - (player.prevPosZ + (player.posZ - player.prevPosZ) * par7); - float f4 = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * par7; + double d3 = player.field_71091_bM + (player.field_71094_bP - player.field_71091_bM) * scaleFactor - (player.prevPosX + (player.posX - player.prevPosX) * scaleFactor); + double d4 = player.field_71096_bN + (player.field_71095_bQ - player.field_71096_bN) * scaleFactor - (player.prevPosY + (player.posY - player.prevPosY) * scaleFactor); + double d0 = player.field_71097_bO + (player.field_71085_bR - player.field_71097_bO) * scaleFactor - (player.prevPosZ + (player.posZ - player.prevPosZ) * scaleFactor); + float f4 = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * scaleFactor; double d1 = MathHelper.sin(f4 * (float) Math.PI / 180.0F); double d2 = (-MathHelper.cos(f4 * (float) Math.PI / 180.0F)); float f5 = (float) d4 * 10.0F; @@ -55,8 +54,8 @@ public class ModelCloak extends ModelBiped { f6 = 0.0F; } - float f8 = player.prevCameraYaw + (player.cameraYaw - player.prevCameraYaw) * par7; - f5 += MathHelper.sin((player.prevDistanceWalkedModified + (player.distanceWalkedModified - player.prevDistanceWalkedModified) * par7) * 6.0F) * 32.0F * f8; + float f8 = player.prevCameraYaw + (player.cameraYaw - player.prevCameraYaw) * scaleFactor; + f5 += MathHelper.sin((player.prevDistanceWalkedModified + (player.distanceWalkedModified - player.prevDistanceWalkedModified) * scaleFactor) * 6.0F) * 32.0F * f8; if(player.isSneaking()) { f5 += 25.0F; @@ -66,7 +65,7 @@ public class ModelCloak extends ModelBiped { GL11.glRotatef(f7 / 2.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(-f7 / 2.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); - this.bipedCloak.render(par7); + this.bipedCloak.render(scaleFactor); GL11.glPopMatrix(); } } diff --git a/src/main/java/com/hbm/render/model/ModelCrab.java b/src/main/java/com/hbm/render/model/ModelCrab.java index dd460d7ab..52c4be226 100755 --- a/src/main/java/com/hbm/render/model/ModelCrab.java +++ b/src/main/java/com/hbm/render/model/ModelCrab.java @@ -17,152 +17,133 @@ import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class ModelCrab extends ModelBase { - int textureX = 64; - int textureY = 32; - public ModelRenderer modelcrabModel[]; + public ModelRenderer[] crabModel; public ModelCrab() { - this.textureWidth = this.textureX; - this.textureHeight = this.textureY; - modelcrabModel = new ModelRenderer[20]; - modelcrabModel[0] = new ModelRenderer(this, 1, 1); // Box 1 - modelcrabModel[1] = new ModelRenderer(this, 17, 1); // Box 2 - modelcrabModel[2] = new ModelRenderer(this, 33, 1); // Box 3 - modelcrabModel[3] = new ModelRenderer(this, 49, 1); // Box 4 - modelcrabModel[4] = new ModelRenderer(this, 1, 9); // Box 5 - modelcrabModel[5] = new ModelRenderer(this, 25, 9); // Box 6 - modelcrabModel[6] = new ModelRenderer(this, 41, 9); // Box 7 - modelcrabModel[7] = new ModelRenderer(this, 1, 17); // Box 8 - modelcrabModel[8] = new ModelRenderer(this, 17, 17); // Box 9 - modelcrabModel[9] = new ModelRenderer(this, 57, 9); // Box 10 - modelcrabModel[10] = new ModelRenderer(this, 33, 17); // Box 11 - modelcrabModel[11] = new ModelRenderer(this, 41, 17); // Box 12 - modelcrabModel[12] = new ModelRenderer(this, 49, 17); // Box 13 - modelcrabModel[13] = new ModelRenderer(this, 17, 1); // Box 14 - modelcrabModel[14] = new ModelRenderer(this, 33, 9); // Box 15 - modelcrabModel[15] = new ModelRenderer(this, 49, 9); // Box 16 - modelcrabModel[16] = new ModelRenderer(this, 9, 17); // Box 17 - modelcrabModel[17] = new ModelRenderer(this, 1, 25); // Box 18 - modelcrabModel[18] = new ModelRenderer(this, 17, 25); // Box 19 - modelcrabModel[19] = new ModelRenderer(this, 33, 25); // Box 20 + this.textureWidth = 64; + this.textureHeight = 32; - modelcrabModel[0].addBox(0F, 0F, 0F, 4, 1, 4, 0F); // Box 1 - modelcrabModel[0].setRotationPoint(-2F, -3F, -2F); + this.crabModel = new ModelRenderer[20]; + this.crabModel[0] = new ModelRenderer(this, 1, 1); // Box 1 + this.crabModel[1] = new ModelRenderer(this, 17, 1); // Box 2 + this.crabModel[2] = new ModelRenderer(this, 33, 1); // Box 3 + this.crabModel[3] = new ModelRenderer(this, 49, 1); // Box 4 + this.crabModel[4] = new ModelRenderer(this, 1, 9); // Box 5 + this.crabModel[5] = new ModelRenderer(this, 25, 9); // Box 6 + this.crabModel[6] = new ModelRenderer(this, 41, 9); // Box 7 + this.crabModel[7] = new ModelRenderer(this, 1, 17); // Box 8 + this.crabModel[8] = new ModelRenderer(this, 17, 17); // Box 9 + this.crabModel[9] = new ModelRenderer(this, 57, 9); // Box 10 + this.crabModel[10] = new ModelRenderer(this, 33, 17); // Box 11 + this.crabModel[11] = new ModelRenderer(this, 41, 17); // Box 12 + this.crabModel[12] = new ModelRenderer(this, 49, 17); // Box 13 + this.crabModel[13] = new ModelRenderer(this, 17, 1); // Box 14 + this.crabModel[14] = new ModelRenderer(this, 33, 9); // Box 15 + this.crabModel[15] = new ModelRenderer(this, 49, 9); // Box 16 + this.crabModel[16] = new ModelRenderer(this, 9, 17); // Box 17 + this.crabModel[17] = new ModelRenderer(this, 1, 25); // Box 18 + this.crabModel[18] = new ModelRenderer(this, 17, 25); // Box 19 + this.crabModel[19] = new ModelRenderer(this, 33, 25); // Box 20 - modelcrabModel[1].addBox(0F, 0F, 0F, 4, 1, 6, 0F); // Box 2 - modelcrabModel[1].setRotationPoint(-2F, -4F, -3F); + this.crabModel[0].addBox(0F, 0F, 0F, 4, 1, 4, 0F); // Box 1 + this.crabModel[0].setRotationPoint(-2F, -3F, -2F); - modelcrabModel[2].addBox(0F, 0F, 0F, 3, 1, 3, 0F); // Box 3 - modelcrabModel[2].setRotationPoint(-1.5F, -5F, -1.5F); + this.crabModel[1].addBox(0F, 0F, 0F, 4, 1, 6, 0F); // Box 2 + this.crabModel[1].setRotationPoint(-2F, -4F, -3F); - modelcrabModel[3].addBox(0F, 0F, 0F, 4, 1, 2, 0F); // Box 4 - modelcrabModel[3].setRotationPoint(-2F, -4.5F, -1F); + this.crabModel[2].addBox(0F, 0F, 0F, 3, 1, 3, 0F); // Box 3 + this.crabModel[2].setRotationPoint(-1.5F, -5F, -1.5F); - modelcrabModel[4].addBox(0F, 0F, 0F, 6, 1, 4, 0F); // Box 5 - modelcrabModel[4].setRotationPoint(-3F, -4F, -2F); + this.crabModel[3].addBox(0F, 0F, 0F, 4, 1, 2, 0F); // Box 4 + this.crabModel[3].setRotationPoint(-2F, -4.5F, -1F); - modelcrabModel[5].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 6 - modelcrabModel[5].setRotationPoint(0F, -3F, 0F); - modelcrabModel[5].rotateAngleX = -0.17453293F; - modelcrabModel[5].rotateAngleY = 0.78539816F; - modelcrabModel[10].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 11 - modelcrabModel[10].setRotationPoint(0F, -3F, 0F); - modelcrabModel[10].rotateAngleX = 0.17453293F; - modelcrabModel[10].rotateAngleY = 0.78539816F; + this.crabModel[4].addBox(0F, 0F, 0F, 6, 1, 4, 0F); // Box 5 + this.crabModel[4].setRotationPoint(-3F, -4F, -2F); - modelcrabModel[6].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 7 - modelcrabModel[6].setRotationPoint(0F, -3F, 0F); - modelcrabModel[6].rotateAngleX = -0.17453293F; - modelcrabModel[6].rotateAngleY = -0.78539816F; - modelcrabModel[9].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 10 - modelcrabModel[9].setRotationPoint(0F, -3F, 0F); - modelcrabModel[9].rotateAngleX = 0.17453293F; - modelcrabModel[9].rotateAngleY = -0.78539816F; + this.crabModel[5].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 6 + this.crabModel[5].setRotationPoint(0F, -3F, 0F); + this.crabModel[5].rotateAngleX = -0.17453293F; + this.crabModel[5].rotateAngleY = 0.78539816F; + this.crabModel[10].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 11 + this.crabModel[10].setRotationPoint(0F, -3F, 0F); + this.crabModel[10].rotateAngleX = 0.17453293F; + this.crabModel[10].rotateAngleY = 0.78539816F; - modelcrabModel[7].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 8 - modelcrabModel[7].setRotationPoint(0F, -3F, 0F); - modelcrabModel[7].rotateAngleX = -0.17453293F; - modelcrabModel[7].rotateAngleY = -2.35619449F; - modelcrabModel[11].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 12 - modelcrabModel[11].setRotationPoint(0F, -3F, 0F); - modelcrabModel[11].rotateAngleX = 0.17453293F; - modelcrabModel[11].rotateAngleY = -2.35619449F; + this.crabModel[6].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 7 + this.crabModel[6].setRotationPoint(0F, -3F, 0F); + this.crabModel[6].rotateAngleX = -0.17453293F; + this.crabModel[6].rotateAngleY = -0.78539816F; + this.crabModel[9].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 10 + this.crabModel[9].setRotationPoint(0F, -3F, 0F); + this.crabModel[9].rotateAngleX = 0.17453293F; + this.crabModel[9].rotateAngleY = -0.78539816F; - modelcrabModel[8].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 9 - modelcrabModel[8].setRotationPoint(0F, -3F, 0F); - modelcrabModel[8].rotateAngleX = -0.17453293F; - modelcrabModel[8].rotateAngleY = 2.35619449F; - modelcrabModel[12].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 13 - modelcrabModel[12].setRotationPoint(0F, -3F, 0F); - modelcrabModel[12].rotateAngleX = 0.17453293F; - modelcrabModel[12].rotateAngleY = 2.35619449F; + this.crabModel[7].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 8 + this.crabModel[7].setRotationPoint(0F, -3F, 0F); + this.crabModel[7].rotateAngleX = -0.17453293F; + this.crabModel[7].rotateAngleY = -2.35619449F; + this.crabModel[11].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 12 + this.crabModel[11].setRotationPoint(0F, -3F, 0F); + this.crabModel[11].rotateAngleX = 0.17453293F; + this.crabModel[11].rotateAngleY = -2.35619449F; - modelcrabModel[13].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 14 - modelcrabModel[13].setRotationPoint(0F, -3F, 0F); - modelcrabModel[13].rotateAngleX = -0.43633231F; - modelcrabModel[13].rotateAngleY = -0.6981317F; + this.crabModel[8].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 9 + this.crabModel[8].setRotationPoint(0F, -3F, 0F); + this.crabModel[8].rotateAngleX = -0.17453293F; + this.crabModel[8].rotateAngleY = 2.35619449F; + this.crabModel[12].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 13 + this.crabModel[12].setRotationPoint(0F, -3F, 0F); + this.crabModel[12].rotateAngleX = 0.17453293F; + this.crabModel[12].rotateAngleY = 2.35619449F; - modelcrabModel[14].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 15 - modelcrabModel[14].setRotationPoint(0F, -3F, 0F); - modelcrabModel[14].rotateAngleX = -0.43633231F; - modelcrabModel[14].rotateAngleY = 0.87266463F; + this.crabModel[13].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 14 + this.crabModel[13].setRotationPoint(0F, -3F, 0F); + this.crabModel[13].rotateAngleX = -0.43633231F; + this.crabModel[13].rotateAngleY = -0.6981317F; - modelcrabModel[15].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 16 - modelcrabModel[15].setRotationPoint(0F, -3F, 0F); - modelcrabModel[15].rotateAngleX = -0.43633231F; - modelcrabModel[15].rotateAngleY = -2.26892803F; + this.crabModel[14].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 15 + this.crabModel[14].setRotationPoint(0F, -3F, 0F); + this.crabModel[14].rotateAngleX = -0.43633231F; + this.crabModel[14].rotateAngleY = 0.87266463F; - modelcrabModel[16].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 17 - modelcrabModel[16].setRotationPoint(0F, -3F, 0F); - modelcrabModel[16].rotateAngleX = -0.43633231F; - modelcrabModel[16].rotateAngleY = 2.44346095F; + this.crabModel[15].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 16 + this.crabModel[15].setRotationPoint(0F, -3F, 0F); + this.crabModel[15].rotateAngleX = -0.43633231F; + this.crabModel[15].rotateAngleY = -2.26892803F; - modelcrabModel[17].addBox(0F, 0F, 0F, 2, 1, 4, 0F); // Box 18 - modelcrabModel[17].setRotationPoint(-1F, -4.5F, -2F); + this.crabModel[16].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 17 + this.crabModel[16].setRotationPoint(0F, -3F, 0F); + this.crabModel[16].rotateAngleX = -0.43633231F; + this.crabModel[16].rotateAngleY = 2.44346095F; - modelcrabModel[18].addBox(0F, 0F, 0F, 5, 1, 3, 0F); // Box 19 - modelcrabModel[18].setRotationPoint(-2.5F, -3.5F, -1.5F); + this.crabModel[17].addBox(0F, 0F, 0F, 2, 1, 4, 0F); // Box 18 + this.crabModel[17].setRotationPoint(-1F, -4.5F, -2F); - modelcrabModel[19].addBox(0F, 0F, 0F, 3, 1, 5, 0F); // Box 20 - modelcrabModel[19].setRotationPoint(-1.5F, -3.5F, -2.5F); + this.crabModel[18].addBox(0F, 0F, 0F, 5, 1, 3, 0F); // Box 19 + this.crabModel[18].setRotationPoint(-2.5F, -3.5F, -1.5F); + + this.crabModel[19].addBox(0F, 0F, 0F, 3, 1, 5, 0F); // Box 20 + this.crabModel[19].setRotationPoint(-1.5F, -3.5F, -2.5F); for (int i = 0; i < 20; i++) { - modelcrabModel[i].setTextureSize(textureX, textureY); - modelcrabModel[i].mirror = true; + this.crabModel[i].setTextureSize(this.textureWidth, this.textureHeight); + this.crabModel[i].mirror = true; } - } @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - renderAll(f5); - } + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { - public void renderAll(float f5) { - GL11.glPushMatrix(); - GL11.glTranslatef(0, 1.5F, 0); - GL11.glRotatef(-90, 0, 1, 0); - for (int i = 0; i < 20; i++) { - modelcrabModel[i].render(f5); - } - GL11.glPopMatrix(); - } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - - modelcrabModel[10].rotateAngleY = 0.78539816F; - modelcrabModel[9].rotateAngleY = -0.78539816F; - modelcrabModel[11].rotateAngleY = -2.35619449F; - modelcrabModel[12].rotateAngleY = 2.35619449F; - modelcrabModel[5].rotateAngleY = modelcrabModel[10].rotateAngleY; - modelcrabModel[6].rotateAngleY = modelcrabModel[9].rotateAngleY; - modelcrabModel[7].rotateAngleY = modelcrabModel[11].rotateAngleY; - modelcrabModel[8].rotateAngleY = modelcrabModel[12].rotateAngleY; - float f9 = -(MathHelper.cos(f * 0.6662F * 2.0F + 0.0F) * 0.4F) * f1; + this.crabModel[10].rotateAngleY = 0.78539816F; + this.crabModel[9].rotateAngleY = -0.78539816F; + this.crabModel[11].rotateAngleY = -2.35619449F; + this.crabModel[12].rotateAngleY = 2.35619449F; + this.crabModel[5].rotateAngleY = this.crabModel[10].rotateAngleY; + this.crabModel[6].rotateAngleY = this.crabModel[9].rotateAngleY; + this.crabModel[7].rotateAngleY = this.crabModel[11].rotateAngleY; + this.crabModel[8].rotateAngleY = this.crabModel[12].rotateAngleY; + float f9 = (-(MathHelper.cos(limbSwing * 0.6662F * 2.0F + 0.0F) * 0.4F) * limbSwingAmount) * 1.5F; //float f10 = -(MathHelper.cos(f * 0.6662F * 2.0F + (float) Math.PI) * 0.4F) * f1; //float f11 = -(MathHelper.cos(f * 0.6662F * 2.0F + ((float) Math.PI / 2F)) * 0.4F) * f1; //float f12 = -(MathHelper.cos(f * 0.6662F * 2.0F + ((float) Math.PI * 3F / 2F)) * 0.4F) * f1; @@ -170,14 +151,30 @@ public class ModelCrab extends ModelBase { //float f14 = Math.abs(MathHelper.sin(f * 0.6662F + (float) Math.PI) * 0.4F) * f1; //float f15 = Math.abs(MathHelper.sin(f * 0.6662F + ((float) Math.PI / 2F)) * 0.4F) * f1; //float f16 = Math.abs(MathHelper.sin(f * 0.6662F + ((float) Math.PI * 3F / 2F)) * 0.4F) * f1; - f9 *= 1.5; - modelcrabModel[10].rotateAngleY += f9; - modelcrabModel[9].rotateAngleY -= f9; - modelcrabModel[11].rotateAngleY -= f9; - modelcrabModel[12].rotateAngleY += f9; - modelcrabModel[5].rotateAngleY = modelcrabModel[10].rotateAngleY; - modelcrabModel[6].rotateAngleY = modelcrabModel[9].rotateAngleY; - modelcrabModel[7].rotateAngleY = modelcrabModel[11].rotateAngleY; - modelcrabModel[8].rotateAngleY = modelcrabModel[12].rotateAngleY; + this.crabModel[10].rotateAngleY += f9; + this.crabModel[9].rotateAngleY -= f9; + this.crabModel[11].rotateAngleY -= f9; + this.crabModel[12].rotateAngleY += f9; + this.crabModel[5].rotateAngleY = this.crabModel[10].rotateAngleY; + this.crabModel[6].rotateAngleY = this.crabModel[9].rotateAngleY; + this.crabModel[7].rotateAngleY = this.crabModel[11].rotateAngleY; + this.crabModel[8].rotateAngleY = this.crabModel[12].rotateAngleY; } -} \ No newline at end of file + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderAll(scaleFactor); + } + + public void renderAll(float scaleFactor) { + + GL11.glPushMatrix(); + GL11.glTranslatef(0, 1.5F, 0); + GL11.glRotatef(-90, 0, 1, 0); + for (int i = 0; i < 20; i++) { + this.crabModel[i].render(scaleFactor); + } + GL11.glPopMatrix(); + } +} diff --git a/src/main/java/com/hbm/render/model/ModelFBI.java b/src/main/java/com/hbm/render/model/ModelFBI.java index e4283ad4d..3b1a7d97f 100644 --- a/src/main/java/com/hbm/render/model/ModelFBI.java +++ b/src/main/java/com/hbm/render/model/ModelFBI.java @@ -5,8 +5,9 @@ import net.minecraft.entity.Entity; public class ModelFBI extends ModelBiped { - public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) { - - super.render(p_78088_1_, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_); + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor); } } diff --git a/src/main/java/com/hbm/render/model/ModelGasMask.java b/src/main/java/com/hbm/render/model/ModelGasMask.java index a32833c9b..aa0bec288 100644 --- a/src/main/java/com/hbm/render/model/ModelGasMask.java +++ b/src/main/java/com/hbm/render/model/ModelGasMask.java @@ -14,7 +14,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; public class ModelGasMask extends ModelBiped { - // fields + ModelRenderer mask; ModelRenderer Shape1; ModelRenderer Shape2; @@ -24,73 +24,64 @@ public class ModelGasMask extends ModelBiped { ModelRenderer Shape6; public ModelGasMask() { - textureWidth = 64; - textureHeight = 32; + this.textureWidth = 64; + this.textureHeight = 32; - mask = new ModelRenderer(this, 0, 0); - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 8, 8, 3); - Shape1.setRotationPoint(0F - 4, 0F - 8 + 0.075F / 2, 0F - 4); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - convertToChild(mask, Shape1); - Shape2 = new ModelRenderer(this, 22, 0); - Shape2.addBox(0F, 0F, 0F, 2, 2, 1); - Shape2.setRotationPoint(1F - 4, 3F - 8 + 0.075F / 2, -0.5333334F - 4); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - convertToChild(mask, Shape2); - Shape3 = new ModelRenderer(this, 22, 0); - Shape3.addBox(0F, 0F, 0F, 2, 2, 1); - Shape3.setRotationPoint(5F - 4, 3F - 8 + 0.075F / 2, -0.5F - 4); - Shape3.setTextureSize(64, 32); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - convertToChild(mask, Shape3); - Shape4 = new ModelRenderer(this, 0, 11); - Shape4.addBox(0F, 0F, 0F, 2, 2, 2); - Shape4.setRotationPoint(3F - 4, 5F - 8 + 0.075F / 2, 0F - 4); - Shape4.setTextureSize(64, 32); - Shape4.mirror = true; - setRotation(Shape4, -0.7853982F, 0F, 0F); - convertToChild(mask, Shape4); - Shape5 = new ModelRenderer(this, 0, 15); - Shape5.addBox(0F, 2F, -0.5F, 3, 4, 3); - Shape5.setRotationPoint(2.5F - 4, 5F - 8 + 0.075F / 2, 0F - 4); - Shape5.setTextureSize(64, 32); - Shape5.mirror = true; - setRotation(Shape5, -0.7853982F, 0F, 0F); - convertToChild(mask, Shape5); - Shape6 = new ModelRenderer(this, 0, 22); - Shape6.addBox(0F, 0F, 0F, 8, 1, 5); - Shape6.setRotationPoint(0F - 4, 3F - 8 + 0.075F / 2, 3F - 4); - Shape6.setTextureSize(64, 32); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - convertToChild(mask, Shape6); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; + this.mask = new ModelRenderer(this, 0, 0); + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 8, 8, 3); + this.Shape1.setRotationPoint(0F - 4, 0F - 8 + 0.075F / 2, 0F - 4); + this.Shape1.setTextureSize(64, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + convertToChild(this.mask, this.Shape1); + this.Shape2 = new ModelRenderer(this, 22, 0); + this.Shape2.addBox(0F, 0F, 0F, 2, 2, 1); + this.Shape2.setRotationPoint(1F - 4, 3F - 8 + 0.075F / 2, -0.5333334F - 4); + this.Shape2.setTextureSize(64, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + convertToChild(this.mask, this.Shape2); + this.Shape3 = new ModelRenderer(this, 22, 0); + this.Shape3.addBox(0F, 0F, 0F, 2, 2, 1); + this.Shape3.setRotationPoint(5F - 4, 3F - 8 + 0.075F / 2, -0.5F - 4); + this.Shape3.setTextureSize(64, 32); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0F, 0F, 0F); + convertToChild(this.mask, this.Shape3); + this.Shape4 = new ModelRenderer(this, 0, 11); + this.Shape4.addBox(0F, 0F, 0F, 2, 2, 2); + this.Shape4.setRotationPoint(3F - 4, 5F - 8 + 0.075F / 2, 0F - 4); + this.Shape4.setTextureSize(64, 32); + this.Shape4.mirror = true; + setRotation(this.Shape4, -0.7853982F, 0F, 0F); + convertToChild(this.mask, this.Shape4); + this.Shape5 = new ModelRenderer(this, 0, 15); + this.Shape5.addBox(0F, 2F, -0.5F, 3, 4, 3); + this.Shape5.setRotationPoint(2.5F - 4, 5F - 8 + 0.075F / 2, 0F - 4); + this.Shape5.setTextureSize(64, 32); + this.Shape5.mirror = true; + setRotation(this.Shape5, -0.7853982F, 0F, 0F); + convertToChild(this.mask, this.Shape5); + this.Shape6 = new ModelRenderer(this, 0, 22); + this.Shape6.addBox(0F, 0F, 0F, 8, 1, 5); + this.Shape6.setRotationPoint(0F - 4, 3F - 8 + 0.075F / 2, 3F - 4); + this.Shape6.setTextureSize(64, 32); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0F, 0F, 0F); + convertToChild(this.mask, this.Shape6); } @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { - if (entity instanceof EntityPlayer) { + if(entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; - if (player.isSneaking()) { - this.isSneak = true; - } else { - this.isSneak = false; - } + this.isSneak = player.isSneaking(); } - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.mask.rotationPointX = this.bipedHead.rotationPointX; this.mask.rotationPointY = this.bipedHead.rotationPointY; this.mask.rotateAngleY = this.bipedHead.rotateAngleY; @@ -98,35 +89,41 @@ public class ModelGasMask extends ModelBiped { } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + if(this.isChild) { float f6 = 2.0F; GL11.glPushMatrix(); GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6); - GL11.glTranslatef(0.0F, 16.0F * par7, 0.0F); - this.mask.render(par7); - GL11.glPopMatrix(); + GL11.glTranslatef(0.0F, 16.0F * scaleFactor, 0.0F); } else { GL11.glPushMatrix(); GL11.glScalef(1.15F, 1.15F, 1.15F); - this.mask.render(par7); - GL11.glPopMatrix(); } + this.mask.render(scaleFactor); + GL11.glPopMatrix(); } - protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) { + protected static void convertToChild(ModelRenderer parent, ModelRenderer child) { + // move child rotation point to be relative to parent - parChild.rotationPointX -= parParent.rotationPointX; - parChild.rotationPointY -= parParent.rotationPointY; - parChild.rotationPointZ -= parParent.rotationPointZ; + child.rotationPointX -= parent.rotationPointX; + child.rotationPointY -= parent.rotationPointY; + child.rotationPointZ -= parent.rotationPointZ; // make rotations relative to parent - parChild.rotateAngleX -= parParent.rotateAngleX; - parChild.rotateAngleY -= parParent.rotateAngleY; - parChild.rotateAngleZ -= parParent.rotateAngleZ; + child.rotateAngleX -= parent.rotateAngleX; + child.rotateAngleY -= parent.rotateAngleY; + child.rotateAngleZ -= parent.rotateAngleZ; // create relationship - parParent.addChild(parChild); + parent.addChild(child); } + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelGeiger.java b/src/main/java/com/hbm/render/model/ModelGeiger.java index ea50dbaef..435ed30f9 100644 --- a/src/main/java/com/hbm/render/model/ModelGeiger.java +++ b/src/main/java/com/hbm/render/model/ModelGeiger.java @@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelGeiger extends ModelBase { - // fields + ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; @@ -22,91 +22,81 @@ public class ModelGeiger extends ModelBase { ModelRenderer Shape8; public ModelGeiger() { - textureWidth = 64; - textureHeight = 32; + this.textureWidth = 64; + this.textureHeight = 32; - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 12, 7, 5); - Shape1.setRotationPoint(-5F, 17F, 1F); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 0, 30); - Shape2.addBox(0F, 0F, 0F, 7, 1, 1); - Shape2.setRotationPoint(-2.5F, 15F, 3F); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 10, 18); - Shape3.addBox(0F, 0F, 0F, 1, 2, 1); - Shape3.setRotationPoint(-3F, 15.5F, 3F); - Shape3.setTextureSize(64, 32); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 14, 18); - Shape4.addBox(0F, 0F, 0F, 1, 2, 1); - Shape4.setRotationPoint(4F, 15.5F, 3F); - Shape4.setTextureSize(64, 32); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); - Shape5 = new ModelRenderer(this, 0, 12); - Shape5.addBox(0F, 0F, 0F, 7, 3, 3); - Shape5.setRotationPoint(-4F, 21F, -6F); - Shape5.setTextureSize(64, 32); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - Shape6 = new ModelRenderer(this, 20, 12); - Shape6.addBox(0F, 0F, 0F, 2, 6, 2); - Shape6.setRotationPoint(-7F, 18F, 2.5F); - Shape6.setTextureSize(64, 32); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - Shape7 = new ModelRenderer(this, 0, 18); - Shape7.addBox(0F, 0F, 0F, 3, 2, 2); - Shape7.setRotationPoint(-7F, 22F, -5.5F); - Shape7.setTextureSize(64, 32); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0F); - Shape8 = new ModelRenderer(this, 0, 22); - Shape8.addBox(0F, 0F, 0F, 2, 2, 6); - Shape8.setRotationPoint(-7F, 22F, -3.5F); - Shape8.setTextureSize(64, 32); - Shape8.mirror = true; - setRotation(Shape8, 0F, 0F, 0F); + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 12, 7, 5); + this.Shape1.setRotationPoint(-5F, 17F, 1F); + this.Shape1.setTextureSize(64, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + this.Shape2 = new ModelRenderer(this, 0, 30); + this.Shape2.addBox(0F, 0F, 0F, 7, 1, 1); + this.Shape2.setRotationPoint(-2.5F, 15F, 3F); + this.Shape2.setTextureSize(64, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + this.Shape3 = new ModelRenderer(this, 10, 18); + this.Shape3.addBox(0F, 0F, 0F, 1, 2, 1); + this.Shape3.setRotationPoint(-3F, 15.5F, 3F); + this.Shape3.setTextureSize(64, 32); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0F, 0F, 0F); + this.Shape4 = new ModelRenderer(this, 14, 18); + this.Shape4.addBox(0F, 0F, 0F, 1, 2, 1); + this.Shape4.setRotationPoint(4F, 15.5F, 3F); + this.Shape4.setTextureSize(64, 32); + this.Shape4.mirror = true; + setRotation(this.Shape4, 0F, 0F, 0F); + this.Shape5 = new ModelRenderer(this, 0, 12); + this.Shape5.addBox(0F, 0F, 0F, 7, 3, 3); + this.Shape5.setRotationPoint(-4F, 21F, -6F); + this.Shape5.setTextureSize(64, 32); + this.Shape5.mirror = true; + setRotation(this.Shape5, 0F, 0F, 0F); + this.Shape6 = new ModelRenderer(this, 20, 12); + this.Shape6.addBox(0F, 0F, 0F, 2, 6, 2); + this.Shape6.setRotationPoint(-7F, 18F, 2.5F); + this.Shape6.setTextureSize(64, 32); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0F, 0F, 0F); + this.Shape7 = new ModelRenderer(this, 0, 18); + this.Shape7.addBox(0F, 0F, 0F, 3, 2, 2); + this.Shape7.setRotationPoint(-7F, 22F, -5.5F); + this.Shape7.setTextureSize(64, 32); + this.Shape7.mirror = true; + setRotation(this.Shape7, 0F, 0F, 0F); + this.Shape8 = new ModelRenderer(this, 0, 22); + this.Shape8.addBox(0F, 0F, 0F, 2, 2, 6); + this.Shape8.setRotationPoint(-7F, 22F, -3.5F); + this.Shape8.setTextureSize(64, 32); + this.Shape8.mirror = true; + setRotation(this.Shape8, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - Shape7.render(f5); - Shape8.render(f5); + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderModel(scaleFactor); } - public void renderModel(float f) { - Shape1.render(f); - Shape2.render(f); - Shape3.render(f); - Shape4.render(f); - Shape5.render(f); - Shape6.render(f); - Shape7.render(f); - Shape8.render(f); + public void renderModel(float scaleFactor) { + + this.Shape1.render(scaleFactor); + this.Shape2.render(scaleFactor); + this.Shape3.render(scaleFactor); + this.Shape4.render(scaleFactor); + this.Shape5.render(scaleFactor); + this.Shape6.render(scaleFactor); + this.Shape7.render(scaleFactor); + this.Shape8.render(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - } diff --git a/src/main/java/com/hbm/render/model/ModelGlasses.java b/src/main/java/com/hbm/render/model/ModelGlasses.java index 9c57954fd..92e72660d 100644 --- a/src/main/java/com/hbm/render/model/ModelGlasses.java +++ b/src/main/java/com/hbm/render/model/ModelGlasses.java @@ -5,36 +5,35 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; public class ModelGlasses extends ModelArmorBase { - + public ModelGlasses(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_goggles); - body = new ModelRendererObj(ResourceManager.armor_bj, "Body"); - leftArm = new ModelRendererObj(ResourceManager.armor_bj, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.armor_bj, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.armor_bj, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.armor_bj, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(ResourceManager.armor_bj, "LeftFoot").setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(ResourceManager.armor_bj, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_goggles); + this.body = new ModelRendererObj(ResourceManager.armor_bj, "Body"); + this.leftArm = new ModelRendererObj(ResourceManager.armor_bj, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.armor_bj, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.armor_bj, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.armor_bj, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(ResourceManager.armor_bj, "LeftFoot").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(ResourceManager.armor_bj, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); - - if(type == 0) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.goggles); - head.render(par7); + + if(this.type == 0) { + bindTexture(ResourceManager.goggles); + this.head.render(scaleFactor); } - + GL11.glPopMatrix(); } } diff --git a/src/main/java/com/hbm/render/model/ModelGoggles.java b/src/main/java/com/hbm/render/model/ModelGoggles.java index a4706646e..38900812a 100644 --- a/src/main/java/com/hbm/render/model/ModelGoggles.java +++ b/src/main/java/com/hbm/render/model/ModelGoggles.java @@ -14,7 +14,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; public class ModelGoggles extends ModelBiped { - // fields + ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape5; @@ -23,74 +23,56 @@ public class ModelGoggles extends ModelBiped { ModelRenderer google; public ModelGoggles() { - textureWidth = 64; - textureHeight = 32; + this.textureWidth = 64; + this.textureHeight = 32; - google = new ModelRenderer(this, 0, 0); - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 9, 3, 1); - Shape1.setRotationPoint(-4.5F, -3F - 2, -4.5F); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - convertToChild(google, Shape1); - Shape2 = new ModelRenderer(this, 0, 4); - Shape2.addBox(0F, 0F, 0F, 9, 2, 5); - Shape2.setRotationPoint(-4.5F, -3F - 2, -3.5F); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - convertToChild(google, Shape2); - Shape5 = new ModelRenderer(this, 26, 0); - Shape5.addBox(0F, 0F, 0F, 2, 2, 1); - Shape5.setRotationPoint(1F, -2.5F - 2, -5F); - Shape5.setTextureSize(64, 32); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - convertToChild(google, Shape5); - Shape6 = new ModelRenderer(this, 20, 0); - Shape6.addBox(0F, 0F, 0F, 2, 2, 1); - Shape6.setRotationPoint(-3F, -2.5F - 2, -5F); - Shape6.setTextureSize(64, 32); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - convertToChild(google, Shape6); - Shape7 = new ModelRenderer(this, 0, 11); - Shape7.addBox(0F, 0F, 0F, 9, 1, 4); - Shape7.setRotationPoint(-4.5F, -3F - 2, 0.5F); - Shape7.setTextureSize(64, 32); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0F); - convertToChild(google, Shape7); - } - - /* - * public void render(Entity entity, float f, float f1, float f2, float f3, - * float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); - * setRotationAngles(f, f1, f2, f3, f4, f5, entity); Shape1.render(f5); - * Shape2.render(f5); Shape5.render(f5); Shape6.render(f5); - * Shape7.render(f5); } - */ - - private void setRotation(ModelRenderer model, float x, float y, float z) { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; + this.google = new ModelRenderer(this, 0, 0); + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 9, 3, 1); + this.Shape1.setRotationPoint(-4.5F, -3F - 2, -4.5F); + this.Shape1.setTextureSize(64, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + convertToChild(this.google, this.Shape1); + this.Shape2 = new ModelRenderer(this, 0, 4); + this.Shape2.addBox(0F, 0F, 0F, 9, 2, 5); + this.Shape2.setRotationPoint(-4.5F, -3F - 2, -3.5F); + this.Shape2.setTextureSize(64, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + convertToChild(this.google, this.Shape2); + this.Shape5 = new ModelRenderer(this, 26, 0); + this.Shape5.addBox(0F, 0F, 0F, 2, 2, 1); + this.Shape5.setRotationPoint(1F, -2.5F - 2, -5F); + this.Shape5.setTextureSize(64, 32); + this.Shape5.mirror = true; + setRotation(this.Shape5, 0F, 0F, 0F); + convertToChild(this.google, this.Shape5); + this.Shape6 = new ModelRenderer(this, 20, 0); + this.Shape6.addBox(0F, 0F, 0F, 2, 2, 1); + this.Shape6.setRotationPoint(-3F, -2.5F - 2, -5F); + this.Shape6.setTextureSize(64, 32); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0F, 0F, 0F); + convertToChild(this.google, this.Shape6); + this.Shape7 = new ModelRenderer(this, 0, 11); + this.Shape7.addBox(0F, 0F, 0F, 9, 1, 4); + this.Shape7.setRotationPoint(-4.5F, -3F - 2, 0.5F); + this.Shape7.setTextureSize(64, 32); + this.Shape7.mirror = true; + setRotation(this.Shape7, 0F, 0F, 0F); + convertToChild(this.google, this.Shape7); } @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { - if (entity instanceof EntityPlayer) { + if(entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; - if (player.isSneaking()) { - this.isSneak = true; - } else { - this.isSneak = false; - } + this.isSneak = player.isSneaking(); } - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); this.google.rotationPointX = this.bipedHead.rotationPointX; this.google.rotationPointY = this.bipedHead.rotationPointY; this.google.rotateAngleY = this.bipedHead.rotateAngleY; @@ -98,24 +80,32 @@ public class ModelGoggles extends ModelBiped { } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); GL11.glPushMatrix(); - this.google.render(par7); + this.google.render(scaleFactor); GL11.glPopMatrix(); } - protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) { + protected static void convertToChild(ModelRenderer parent, ModelRenderer child) { + // move child rotation point to be relative to parent - parChild.rotationPointX -= parParent.rotationPointX; - parChild.rotationPointY -= parParent.rotationPointY; - parChild.rotationPointZ -= parParent.rotationPointZ; + child.rotationPointX -= parent.rotationPointX; + child.rotationPointY -= parent.rotationPointY; + child.rotationPointZ -= parent.rotationPointZ; // make rotations relative to parent - parChild.rotateAngleX -= parParent.rotateAngleX; - parChild.rotateAngleY -= parParent.rotateAngleY; - parChild.rotateAngleZ -= parParent.rotateAngleZ; + child.rotateAngleX -= parent.rotateAngleX; + child.rotateAngleY -= parent.rotateAngleY; + child.rotateAngleZ -= parent.rotateAngleZ; // create relationship - parParent.addChild(parChild); + parent.addChild(child); } -} \ No newline at end of file + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } +} diff --git a/src/main/java/com/hbm/render/model/ModelGun.java b/src/main/java/com/hbm/render/model/ModelGun.java index 2fcd6f690..ffc3adbe7 100644 --- a/src/main/java/com/hbm/render/model/ModelGun.java +++ b/src/main/java/com/hbm/render/model/ModelGun.java @@ -4,195 +4,165 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX - - - - - package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelGun extends ModelBase -{ - //fields - ModelRenderer Shape1; - ModelRenderer Shape2; - ModelRenderer Shape3; - ModelRenderer Shape4; - ModelRenderer Shape5; - ModelRenderer Shape6; - ModelRenderer Shape7; - ModelRenderer Shape8; - ModelRenderer Shape9; - ModelRenderer Shape10; - ModelRenderer Shape11; - ModelRenderer Shape12; - ModelRenderer Shape13; - ModelRenderer Shape14; - ModelRenderer Shape15; - ModelRenderer Shape16; - - public ModelGun() - { - textureWidth = 64; - textureHeight = 64; - - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 6, 12, 4); - Shape1.setRotationPoint(0F, -4F, -1F); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 52, 0); - Shape2.addBox(0F, 0F, 0F, 3, 3, 3); - Shape2.setRotationPoint(4F, -7F, -0.5F); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 28, 58); - Shape3.addBox(0F, 0F, 0F, 15, 3, 3); - Shape3.setRotationPoint(-15F, -7F, -0.5F); - Shape3.setTextureSize(64, 32); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 0, 61); - Shape4.addBox(0F, 0F, 0F, 1, 2, 1); - Shape4.setRotationPoint(2F, -3F, 0.5F); - Shape4.setTextureSize(64, 32); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0.715585F); - Shape5 = new ModelRenderer(this, 0, 57); - Shape5.addBox(0F, 0F, 0F, 2, 2, 1); - Shape5.setRotationPoint(-13.5F, -8F, 0.5F); - Shape5.setTextureSize(64, 32); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0.6108652F); - Shape6 = new ModelRenderer(this, 52, 7); - Shape6.addBox(0F, 0F, 0F, 4, 3, 2); - Shape6.setRotationPoint(0F, -6.5F, 0F); - Shape6.setTextureSize(64, 64); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - Shape7 = new ModelRenderer(this, 46, 49); - Shape7.addBox(0F, 0F, 0F, 6, 5, 3); - Shape7.setRotationPoint(-15F, -3F, -0.5F); - Shape7.setTextureSize(64, 64); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0F); - Shape8 = new ModelRenderer(this, 22, 0); - Shape8.addBox(0F, 0F, 0F, 12, 1, 2); - Shape8.setRotationPoint(-15F, -4F, 0F); - Shape8.setTextureSize(64, 64); - Shape8.mirror = true; - setRotation(Shape8, 0F, 0F, 0F); - Shape9 = new ModelRenderer(this, 52, 13); - Shape9.addBox(0F, 0F, 0F, 3, 3, 3); - Shape9.setRotationPoint(-3F, -4F, -0.5F); - Shape9.setTextureSize(64, 64); - Shape9.mirror = true; - setRotation(Shape9, 0F, 0F, 0F); - Shape10 = new ModelRenderer(this, 11, 60); - Shape10.addBox(0F, 0F, 0F, 6, 2, 2); - Shape10.setRotationPoint(-9F, -3F, 0F); - Shape10.setTextureSize(64, 64); - Shape10.mirror = true; - setRotation(Shape10, 0F, 0F, 0F); - Shape11 = new ModelRenderer(this, 35, 50); - Shape11.addBox(0F, 0F, 0F, 2, 4, 3); - Shape11.setRotationPoint(-9F, -1F, -0.5F); - Shape11.setTextureSize(64, 64); - Shape11.mirror = true; - setRotation(Shape11, 0F, 0F, 0F); - Shape12 = new ModelRenderer(this, 12, 57); - Shape12.addBox(0F, 0F, 0F, 7, 1, 1); - Shape12.setRotationPoint(-7F, 2F, 0.5F); - Shape12.setTextureSize(64, 64); - Shape12.mirror = true; - setRotation(Shape12, 0F, 0F, 0F); - Shape13 = new ModelRenderer(this, 0, 51); - Shape13.addBox(0F, 0F, 0F, 4, 1, 4); - Shape13.setRotationPoint(0F, -5F, -1F); - Shape13.setTextureSize(64, 64); - Shape13.mirror = true; - setRotation(Shape13, 0F, 0F, 0F); - Shape14 = new ModelRenderer(this, 0, 43); - Shape14.addBox(0F, 0F, 0F, 3, 5, 2); - Shape14.setRotationPoint(7F, -7F, 0F); - Shape14.setTextureSize(64, 64); - Shape14.mirror = true; - setRotation(Shape14, 0F, 0F, 0.7853982F); - //Shape15.mirror = true; - Shape15 = new ModelRenderer(this, 0, 38); - Shape15.addBox(0F, 0F, 0F, 3, 1, 3); - Shape15.setRotationPoint(-9F, 3F, -0.5F); - Shape15.setTextureSize(64, 64); - Shape15.mirror = true; - setRotation(Shape15, 0F, 0F, -2.792527F); - Shape15.mirror = false; - Shape16 = new ModelRenderer(this, 0, 17); - Shape16.addBox(0F, 0F, 0F, 2, 3, 1); - Shape16.setRotationPoint(-1F, -2F, 0.5F); - Shape16.setTextureSize(64, 64); - Shape16.mirror = true; - setRotation(Shape16, 0F, 0F, 0.2617994F); - } - - @Override -public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - Shape7.render(f5); - Shape8.render(f5); - Shape9.render(f5); - Shape10.render(f5); - Shape11.render(f5); - Shape12.render(f5); - Shape13.render(f5); - Shape14.render(f5); - Shape15.render(f5); - Shape16.render(f5); - } - - public void renderModel(float f) { - Shape1.render(f); - Shape2.render(f); - Shape3.render(f); - Shape4.render(f); - Shape5.render(f); - Shape6.render(f); - Shape7.render(f); - Shape8.render(f); - Shape9.render(f); - Shape10.render(f); - Shape11.render(f); - Shape12.render(f); - Shape13.render(f); - Shape14.render(f); - Shape15.render(f); - Shape16.render(f); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override -public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } +public class ModelGun extends ModelBase { + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape5; + ModelRenderer Shape6; + ModelRenderer Shape7; + ModelRenderer Shape8; + ModelRenderer Shape9; + ModelRenderer Shape10; + ModelRenderer Shape11; + ModelRenderer Shape12; + ModelRenderer Shape13; + ModelRenderer Shape14; + ModelRenderer Shape15; + ModelRenderer Shape16; + + public ModelGun() { + this.textureWidth = 64; + this.textureHeight = 64; + + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 6, 12, 4); + this.Shape1.setRotationPoint(0F, -4F, -1F); + this.Shape1.setTextureSize(64, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + this.Shape2 = new ModelRenderer(this, 52, 0); + this.Shape2.addBox(0F, 0F, 0F, 3, 3, 3); + this.Shape2.setRotationPoint(4F, -7F, -0.5F); + this.Shape2.setTextureSize(64, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + this.Shape3 = new ModelRenderer(this, 28, 58); + this.Shape3.addBox(0F, 0F, 0F, 15, 3, 3); + this.Shape3.setRotationPoint(-15F, -7F, -0.5F); + this.Shape3.setTextureSize(64, 32); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0F, 0F, 0F); + this.Shape4 = new ModelRenderer(this, 0, 61); + this.Shape4.addBox(0F, 0F, 0F, 1, 2, 1); + this.Shape4.setRotationPoint(2F, -3F, 0.5F); + this.Shape4.setTextureSize(64, 32); + this.Shape4.mirror = true; + setRotation(this.Shape4, 0F, 0F, 0.715585F); + this.Shape5 = new ModelRenderer(this, 0, 57); + this.Shape5.addBox(0F, 0F, 0F, 2, 2, 1); + this.Shape5.setRotationPoint(-13.5F, -8F, 0.5F); + this.Shape5.setTextureSize(64, 32); + this.Shape5.mirror = true; + setRotation(this.Shape5, 0F, 0F, 0.6108652F); + this.Shape6 = new ModelRenderer(this, 52, 7); + this.Shape6.addBox(0F, 0F, 0F, 4, 3, 2); + this.Shape6.setRotationPoint(0F, -6.5F, 0F); + this.Shape6.setTextureSize(64, 64); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0F, 0F, 0F); + this.Shape7 = new ModelRenderer(this, 46, 49); + this.Shape7.addBox(0F, 0F, 0F, 6, 5, 3); + this.Shape7.setRotationPoint(-15F, -3F, -0.5F); + this.Shape7.setTextureSize(64, 64); + this.Shape7.mirror = true; + setRotation(this.Shape7, 0F, 0F, 0F); + this.Shape8 = new ModelRenderer(this, 22, 0); + this.Shape8.addBox(0F, 0F, 0F, 12, 1, 2); + this.Shape8.setRotationPoint(-15F, -4F, 0F); + this.Shape8.setTextureSize(64, 64); + this.Shape8.mirror = true; + setRotation(this.Shape8, 0F, 0F, 0F); + this.Shape9 = new ModelRenderer(this, 52, 13); + this.Shape9.addBox(0F, 0F, 0F, 3, 3, 3); + this.Shape9.setRotationPoint(-3F, -4F, -0.5F); + this.Shape9.setTextureSize(64, 64); + this.Shape9.mirror = true; + setRotation(this.Shape9, 0F, 0F, 0F); + this.Shape10 = new ModelRenderer(this, 11, 60); + this.Shape10.addBox(0F, 0F, 0F, 6, 2, 2); + this.Shape10.setRotationPoint(-9F, -3F, 0F); + this.Shape10.setTextureSize(64, 64); + this.Shape10.mirror = true; + setRotation(this.Shape10, 0F, 0F, 0F); + this.Shape11 = new ModelRenderer(this, 35, 50); + this.Shape11.addBox(0F, 0F, 0F, 2, 4, 3); + this.Shape11.setRotationPoint(-9F, -1F, -0.5F); + this.Shape11.setTextureSize(64, 64); + this.Shape11.mirror = true; + setRotation(this.Shape11, 0F, 0F, 0F); + this.Shape12 = new ModelRenderer(this, 12, 57); + this.Shape12.addBox(0F, 0F, 0F, 7, 1, 1); + this.Shape12.setRotationPoint(-7F, 2F, 0.5F); + this.Shape12.setTextureSize(64, 64); + this.Shape12.mirror = true; + setRotation(this.Shape12, 0F, 0F, 0F); + this.Shape13 = new ModelRenderer(this, 0, 51); + this.Shape13.addBox(0F, 0F, 0F, 4, 1, 4); + this.Shape13.setRotationPoint(0F, -5F, -1F); + this.Shape13.setTextureSize(64, 64); + this.Shape13.mirror = true; + setRotation(this.Shape13, 0F, 0F, 0F); + this.Shape14 = new ModelRenderer(this, 0, 43); + this.Shape14.addBox(0F, 0F, 0F, 3, 5, 2); + this.Shape14.setRotationPoint(7F, -7F, 0F); + this.Shape14.setTextureSize(64, 64); + this.Shape14.mirror = true; + setRotation(this.Shape14, 0F, 0F, 0.7853982F); + //Shape15.mirror = true; + this.Shape15 = new ModelRenderer(this, 0, 38); + this.Shape15.addBox(0F, 0F, 0F, 3, 1, 3); + this.Shape15.setRotationPoint(-9F, 3F, -0.5F); + this.Shape15.setTextureSize(64, 64); + this.Shape15.mirror = true; + setRotation(this.Shape15, 0F, 0F, -2.792527F); + this.Shape15.mirror = false; + this.Shape16 = new ModelRenderer(this, 0, 17); + this.Shape16.addBox(0F, 0F, 0F, 2, 3, 1); + this.Shape16.setRotationPoint(-1F, -2F, 0.5F); + this.Shape16.setTextureSize(64, 64); + this.Shape16.mirror = true; + setRotation(this.Shape16, 0F, 0F, 0.2617994F); + } + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderModel(scaleFactor); + } + + public void renderModel(float scaleFactor) { + + this.Shape1.render(scaleFactor); + this.Shape2.render(scaleFactor); + this.Shape3.render(scaleFactor); + this.Shape4.render(scaleFactor); + this.Shape5.render(scaleFactor); + this.Shape6.render(scaleFactor); + this.Shape7.render(scaleFactor); + this.Shape8.render(scaleFactor); + this.Shape9.render(scaleFactor); + this.Shape10.render(scaleFactor); + this.Shape11.render(scaleFactor); + this.Shape12.render(scaleFactor); + this.Shape13.render(scaleFactor); + this.Shape14.render(scaleFactor); + this.Shape15.render(scaleFactor); + this.Shape16.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelHat.java b/src/main/java/com/hbm/render/model/ModelHat.java index 673ac6db6..a3ee16974 100644 --- a/src/main/java/com/hbm/render/model/ModelHat.java +++ b/src/main/java/com/hbm/render/model/ModelHat.java @@ -5,36 +5,35 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; public class ModelHat extends ModelArmorBase { - + public ModelHat(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_hat); - body = new ModelRendererObj(null); - leftArm = new ModelRendererObj(null).setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(null).setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_hat); + this.body = new ModelRendererObj(null); + this.leftArm = new ModelRendererObj(null).setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(null).setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); - - if(type == 0) { - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hat); - head.render(par7); + + if(this.type == 0) { + bindTexture(ResourceManager.hat); + this.head.render(scaleFactor); } - + GL11.glPopMatrix(); } } diff --git a/src/main/java/com/hbm/render/model/ModelHunterChopper.java b/src/main/java/com/hbm/render/model/ModelHunterChopper.java index 92b83cd86..e18c5eeb3 100644 --- a/src/main/java/com/hbm/render/model/ModelHunterChopper.java +++ b/src/main/java/com/hbm/render/model/ModelHunterChopper.java @@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelHunterChopper extends ModelBase { - // fields + ModelRenderer RotorPivotStem; ModelRenderer RotorPivotTop; ModelRenderer RotorPivotPlate; @@ -65,433 +65,380 @@ public class ModelHunterChopper extends ModelBase { float f = 0.1F; public ModelHunterChopper() { - textureWidth = 256; - textureHeight = 128; - - RotorPivotStem = new ModelRenderer(this, 40, 22); - RotorPivotStem.addBox(0F, 0F, 0F, 1, 4, 1); - RotorPivotStem.setRotationPoint(-0.5F, 0F, -0.5F); - RotorPivotStem.setTextureSize(256, 128); - RotorPivotStem.mirror = true; - setRotation(RotorPivotStem, 0F, 0F, 0F); - RotorPivotTop = new ModelRenderer(this, 40, 27); - RotorPivotTop.addBox(0F, 0F, 0F, 3, 1, 3); - RotorPivotTop.setRotationPoint(-1.5F, -1F, -1.5F); - RotorPivotTop.setTextureSize(256, 128); - RotorPivotTop.mirror = true; - setRotation(RotorPivotTop, 0F, 0F, 0F); - RotorPivotPlate = new ModelRenderer(this, 40, 31); - RotorPivotPlate.addBox(0F, 0F, 0F, 6, 1, 6); - RotorPivotPlate.setRotationPoint(-3F, 1.5F, -3F); - RotorPivotPlate.setTextureSize(256, 128); - RotorPivotPlate.mirror = true; - setRotation(RotorPivotPlate, 0F, 0F, 0F); - TorsoBaseCenter = new ModelRenderer(this, 70, 0); - TorsoBaseCenter.addBox(0F, 0F, 0F, 14, 4, 2); - TorsoBaseCenter.setRotationPoint(-8F, 4F, -1F); - TorsoBaseCenter.setTextureSize(256, 128); - TorsoBaseCenter.mirror = true; - setRotation(TorsoBaseCenter, 0F, 0F, 0F); - TorsoPlateLeft = new ModelRenderer(this, 70, 6); - TorsoPlateLeft.addBox(0F, -4F, 0F, 14, 4, 1); - TorsoPlateLeft.setRotationPoint(-8F, 8F, -2F); - TorsoPlateLeft.setTextureSize(256, 128); - TorsoPlateLeft.mirror = true; - setRotation(TorsoPlateLeft, -0.2268928F, 0F, 0F); - TorsoBaseBottom = new ModelRenderer(this, 70, 11); - TorsoBaseBottom.addBox(0F, 0F, 0F, 7, 2, 4); - TorsoBaseBottom.setRotationPoint(-4F, 8F, -2F); - TorsoBaseBottom.setTextureSize(256, 128); - TorsoBaseBottom.mirror = true; - setRotation(TorsoBaseBottom, 0F, 0F, 0F); - TorsoPlateRight = new ModelRenderer(this, 70, 17); - TorsoPlateRight.addBox(0F, -4F, -1F, 14, 4, 1); - TorsoPlateRight.setRotationPoint(-8F, 8F, 2F); - TorsoPlateRight.setTextureSize(256, 128); - TorsoPlateRight.mirror = true; - setRotation(TorsoPlateRight, 0.2268928F, 0F, 0F); - TorsoPlateBottom = new ModelRenderer(this, 70, 22); - TorsoPlateBottom.addBox(-5F, -2F, 0F, 5, 2, 4); - TorsoPlateBottom.setRotationPoint(-4F, 10F, -2F); - TorsoPlateBottom.setTextureSize(256, 128); - TorsoPlateBottom.mirror = true; - setRotation(TorsoPlateBottom, 0F, 0F, 0.2094395F); - WingLeftPlate = new ModelRenderer(this, 110, 0); - WingLeftPlate.addBox(0F, -3F, 0F, 9, 3, 1); - WingLeftPlate.setRotationPoint(-8F, 9F, -3F); - WingLeftPlate.setTextureSize(256, 128); - WingLeftPlate.mirror = true; - setRotation(WingLeftPlate, -0.2268928F, 0F, 0F); - WingRightPlate = new ModelRenderer(this, 130, 0); - WingRightPlate.addBox(0F, -3F, 0F, 9, 3, 1); - WingRightPlate.setRotationPoint(-8F, 9F, 2F); - WingRightPlate.setTextureSize(256, 128); - WingRightPlate.mirror = true; - setRotation(WingRightPlate, 0.2268928F, 0F, 0F); - WingLeft = new ModelRenderer(this, 110, 4); - WingLeft.addBox(0F, 0F, 0F, 3, 1, 6); - WingLeft.setRotationPoint(-3F, 10F, -8F); - WingLeft.setTextureSize(256, 128); - WingLeft.mirror = true; - setRotation(WingLeft, 0.3490659F, 0F, 0F); - WingLeftFront = new ModelRenderer(this, 110, 11); - WingLeftFront.addBox(0F, 0F, 0F, 2, 1, 7); - WingLeftFront.setRotationPoint(-3F, 10F, -8F); - WingLeftFront.setTextureSize(256, 128); - WingLeftFront.mirror = true; - setRotation(WingLeftFront, 0.3490659F, -0.3490659F, -0.1745329F); - WingLeftTip = new ModelRenderer(this, 110, 19); - WingLeftTip.addBox(0F, 0F, 0F, 5, 2, 1); - WingLeftTip.setRotationPoint(-4F, 9F, -8F); - WingLeftTip.setTextureSize(256, 128); - WingLeftTip.mirror = true; - setRotation(WingLeftTip, 0F, 0F, 0F); - WingRight = new ModelRenderer(this, 130, 4); - WingRight.addBox(0F, 0F, -6F, 3, 1, 6); - WingRight.setRotationPoint(-3F, 10F, 8F); - WingRight.setTextureSize(256, 128); - WingRight.mirror = true; - setRotation(WingRight, -0.3490659F, 0F, 0F); - WingRightFront = new ModelRenderer(this, 130, 11); - WingRightFront.addBox(0F, 0F, -7F, 2, 1, 7); - WingRightFront.setRotationPoint(-3F, 10F, 8F); - WingRightFront.setTextureSize(256, 128); - WingRightFront.mirror = true; - setRotation(WingRightFront, -0.3490659F, 0.3490659F, -0.1745329F); - WingRightTip = new ModelRenderer(this, 130, 19); - WingRightTip.addBox(0F, 0F, 0F, 5, 2, 1); - WingRightTip.setRotationPoint(-4F, 9F, 7F); - WingRightTip.setTextureSize(256, 128); - WingRightTip.mirror = true; - setRotation(WingRightTip, 0F, 0F, 0F); - TorsoBaseBack = new ModelRenderer(this, 70, 28); - TorsoBaseBack.addBox(0F, 0F, 0F, 3, 2, 3); - TorsoBaseBack.setRotationPoint(3F, 7.5F, -1.5F); - TorsoBaseBack.setTextureSize(256, 128); - TorsoBaseBack.mirror = true; - setRotation(TorsoBaseBack, 0F, 0F, 0F); - TorsoBoxBottom = new ModelRenderer(this, 70, 33); - TorsoBoxBottom.addBox(0F, -2F, 0F, 7, 2, 2); - TorsoBoxBottom.setRotationPoint(-3F, 10F, -1F); - TorsoBoxBottom.setTextureSize(256, 128); - TorsoBoxBottom.mirror = true; - setRotation(TorsoBoxBottom, 0F, 0F, 0.1570796F); - TorsoPlateBack = new ModelRenderer(this, 70, 37); - TorsoPlateBack.addBox(0F, 0F, 0F, 3, 1, 2); - TorsoPlateBack.setRotationPoint(6F, 4F, -1F); - TorsoPlateBack.setTextureSize(256, 128); - TorsoPlateBack.mirror = true; - setRotation(TorsoPlateBack, 0F, 0F, 0.2268928F); - TorsoBoxBack = new ModelRenderer(this, 70, 40); - TorsoBoxBack.addBox(0F, 0F, 0F, 2, 4, 2); - TorsoBoxBack.setRotationPoint(6F, 5F, -1F); - TorsoBoxBack.setTextureSize(256, 128); - TorsoBoxBack.mirror = true; - setRotation(TorsoBoxBack, 0F, 0F, 0F); - TorsoPlateLeftBack = new ModelRenderer(this, 70, 46); - TorsoPlateLeftBack.addBox(0F, -4F, -1F, 3, 4, 1); - TorsoPlateLeftBack.setRotationPoint(6F, 8.5F, -1F); - TorsoPlateLeftBack.setTextureSize(256, 128); - TorsoPlateLeftBack.mirror = true; - setRotation(TorsoPlateLeftBack, -0.2268928F, 0F, 0F); - TorsoPlateRightBack = new ModelRenderer(this, 70, 51); - TorsoPlateRightBack.addBox(0F, -4F, 0F, 3, 4, 1); - TorsoPlateRightBack.setRotationPoint(6F, 8.5F, 1F); - TorsoPlateRightBack.setTextureSize(256, 128); - TorsoPlateRightBack.mirror = true; - setRotation(TorsoPlateRightBack, 0.2268928F, 0F, 0F); - TailFrontBase = new ModelRenderer(this, 24, 54); - TailFrontBase.addBox(0F, 0F, 0F, 5, 2, 2); - TailFrontBase.setRotationPoint(8F, 6F, -1F); - TailFrontBase.setTextureSize(256, 128); - TailFrontBase.mirror = true; - setRotation(TailFrontBase, 0F, 0F, 0F); - TailFrontPlate = new ModelRenderer(this, 24, 58); - TailFrontPlate.addBox(-5F, 0F, 0F, 5, 1, 2); - TailFrontPlate.setRotationPoint(13F, 6F, -1F); - TailFrontPlate.setTextureSize(256, 128); - TailFrontPlate.mirror = true; - setRotation(TailFrontPlate, 0F, 0F, 0.2268928F); - TailBackBase = new ModelRenderer(this, 24, 61); - TailBackBase.addBox(0F, 0F, 0F, 4, 2, 1); - TailBackBase.setRotationPoint(13F, 6F, -0.5F); - TailBackBase.setTextureSize(256, 128); - TailBackBase.mirror = true; - setRotation(TailBackBase, 0F, 0F, 0F); - TailRotorFront = new ModelRenderer(this, 24, 64); - TailRotorFront.addBox(0F, 0F, 0F, 1, 3, 1); - TailRotorFront.setRotationPoint(15.5F, 8F, -0.5F); - TailRotorFront.setTextureSize(256, 128); - TailRotorFront.mirror = true; - setRotation(TailRotorFront, 0F, 0F, -0.2268928F); - TailRotorTop = new ModelRenderer(this, 24, 68); - TailRotorTop.addBox(0F, 0F, 0F, 3, 1, 1); - TailRotorTop.setRotationPoint(17F, 6F, -0.5F); - TailRotorTop.setTextureSize(256, 128); - TailRotorTop.mirror = true; - setRotation(TailRotorTop, 0F, 0F, 0F); - TailRotorBack = new ModelRenderer(this, 24, 70); - TailRotorBack.addBox(0F, 0F, 0F, 1, 4, 1); - TailRotorBack.setRotationPoint(20F, 6F, -0.5F); - TailRotorBack.setTextureSize(256, 128); - TailRotorBack.mirror = true; - setRotation(TailRotorBack, 0F, 0F, 0F); - TailRotorBottom = new ModelRenderer(this, 24, 75); - TailRotorBottom.addBox(0F, 0F, 0F, 3, 1, 1); - TailRotorBottom.setRotationPoint(18F, 10F, -0.5F); - TailRotorBottom.setTextureSize(256, 128); - TailRotorBottom.mirror = true; + this.textureWidth = 256; + this.textureHeight = 128; + + this.RotorPivotStem = new ModelRenderer(this, 40, 22); + this.RotorPivotStem.addBox(0F, 0F, 0F, 1, 4, 1); + this.RotorPivotStem.setRotationPoint(-0.5F, 0F, -0.5F); + this.RotorPivotStem.setTextureSize(256, 128); + this.RotorPivotStem.mirror = true; + setRotation(this.RotorPivotStem, 0F, 0F, 0F); + this.RotorPivotTop = new ModelRenderer(this, 40, 27); + this.RotorPivotTop.addBox(0F, 0F, 0F, 3, 1, 3); + this.RotorPivotTop.setRotationPoint(-1.5F, -1F, -1.5F); + this.RotorPivotTop.setTextureSize(256, 128); + this.RotorPivotTop.mirror = true; + setRotation(this.RotorPivotTop, 0F, 0F, 0F); + this.RotorPivotPlate = new ModelRenderer(this, 40, 31); + this.RotorPivotPlate.addBox(0F, 0F, 0F, 6, 1, 6); + this.RotorPivotPlate.setRotationPoint(-3F, 1.5F, -3F); + this.RotorPivotPlate.setTextureSize(256, 128); + this.RotorPivotPlate.mirror = true; + setRotation(this.RotorPivotPlate, 0F, 0F, 0F); + this.TorsoBaseCenter = new ModelRenderer(this, 70, 0); + this.TorsoBaseCenter.addBox(0F, 0F, 0F, 14, 4, 2); + this.TorsoBaseCenter.setRotationPoint(-8F, 4F, -1F); + this.TorsoBaseCenter.setTextureSize(256, 128); + this.TorsoBaseCenter.mirror = true; + setRotation(this.TorsoBaseCenter, 0F, 0F, 0F); + this.TorsoPlateLeft = new ModelRenderer(this, 70, 6); + this.TorsoPlateLeft.addBox(0F, -4F, 0F, 14, 4, 1); + this.TorsoPlateLeft.setRotationPoint(-8F, 8F, -2F); + this.TorsoPlateLeft.setTextureSize(256, 128); + this.TorsoPlateLeft.mirror = true; + setRotation(this.TorsoPlateLeft, -0.2268928F, 0F, 0F); + this.TorsoBaseBottom = new ModelRenderer(this, 70, 11); + this.TorsoBaseBottom.addBox(0F, 0F, 0F, 7, 2, 4); + this.TorsoBaseBottom.setRotationPoint(-4F, 8F, -2F); + this.TorsoBaseBottom.setTextureSize(256, 128); + this.TorsoBaseBottom.mirror = true; + setRotation(this.TorsoBaseBottom, 0F, 0F, 0F); + this.TorsoPlateRight = new ModelRenderer(this, 70, 17); + this.TorsoPlateRight.addBox(0F, -4F, -1F, 14, 4, 1); + this.TorsoPlateRight.setRotationPoint(-8F, 8F, 2F); + this.TorsoPlateRight.setTextureSize(256, 128); + this.TorsoPlateRight.mirror = true; + setRotation(this.TorsoPlateRight, 0.2268928F, 0F, 0F); + this.TorsoPlateBottom = new ModelRenderer(this, 70, 22); + this.TorsoPlateBottom.addBox(-5F, -2F, 0F, 5, 2, 4); + this.TorsoPlateBottom.setRotationPoint(-4F, 10F, -2F); + this.TorsoPlateBottom.setTextureSize(256, 128); + this.TorsoPlateBottom.mirror = true; + setRotation(this.TorsoPlateBottom, 0F, 0F, 0.2094395F); + this.WingLeftPlate = new ModelRenderer(this, 110, 0); + this.WingLeftPlate.addBox(0F, -3F, 0F, 9, 3, 1); + this.WingLeftPlate.setRotationPoint(-8F, 9F, -3F); + this.WingLeftPlate.setTextureSize(256, 128); + this.WingLeftPlate.mirror = true; + setRotation(this.WingLeftPlate, -0.2268928F, 0F, 0F); + this.WingRightPlate = new ModelRenderer(this, 130, 0); + this.WingRightPlate.addBox(0F, -3F, 0F, 9, 3, 1); + this.WingRightPlate.setRotationPoint(-8F, 9F, 2F); + this.WingRightPlate.setTextureSize(256, 128); + this.WingRightPlate.mirror = true; + setRotation(this.WingRightPlate, 0.2268928F, 0F, 0F); + this.WingLeft = new ModelRenderer(this, 110, 4); + this.WingLeft.addBox(0F, 0F, 0F, 3, 1, 6); + this.WingLeft.setRotationPoint(-3F, 10F, -8F); + this.WingLeft.setTextureSize(256, 128); + this.WingLeft.mirror = true; + setRotation(this.WingLeft, 0.3490659F, 0F, 0F); + this.WingLeftFront = new ModelRenderer(this, 110, 11); + this.WingLeftFront.addBox(0F, 0F, 0F, 2, 1, 7); + this.WingLeftFront.setRotationPoint(-3F, 10F, -8F); + this.WingLeftFront.setTextureSize(256, 128); + this.WingLeftFront.mirror = true; + setRotation(this.WingLeftFront, 0.3490659F, -0.3490659F, -0.1745329F); + this.WingLeftTip = new ModelRenderer(this, 110, 19); + this.WingLeftTip.addBox(0F, 0F, 0F, 5, 2, 1); + this.WingLeftTip.setRotationPoint(-4F, 9F, -8F); + this.WingLeftTip.setTextureSize(256, 128); + this.WingLeftTip.mirror = true; + setRotation(this.WingLeftTip, 0F, 0F, 0F); + this.WingRight = new ModelRenderer(this, 130, 4); + this.WingRight.addBox(0F, 0F, -6F, 3, 1, 6); + this.WingRight.setRotationPoint(-3F, 10F, 8F); + this.WingRight.setTextureSize(256, 128); + this.WingRight.mirror = true; + setRotation(this.WingRight, -0.3490659F, 0F, 0F); + this.WingRightFront = new ModelRenderer(this, 130, 11); + this.WingRightFront.addBox(0F, 0F, -7F, 2, 1, 7); + this.WingRightFront.setRotationPoint(-3F, 10F, 8F); + this.WingRightFront.setTextureSize(256, 128); + this.WingRightFront.mirror = true; + setRotation(this.WingRightFront, -0.3490659F, 0.3490659F, -0.1745329F); + this.WingRightTip = new ModelRenderer(this, 130, 19); + this.WingRightTip.addBox(0F, 0F, 0F, 5, 2, 1); + this.WingRightTip.setRotationPoint(-4F, 9F, 7F); + this.WingRightTip.setTextureSize(256, 128); + this.WingRightTip.mirror = true; + setRotation(this.WingRightTip, 0F, 0F, 0F); + this.TorsoBaseBack = new ModelRenderer(this, 70, 28); + this.TorsoBaseBack.addBox(0F, 0F, 0F, 3, 2, 3); + this.TorsoBaseBack.setRotationPoint(3F, 7.5F, -1.5F); + this.TorsoBaseBack.setTextureSize(256, 128); + this.TorsoBaseBack.mirror = true; + setRotation(this.TorsoBaseBack, 0F, 0F, 0F); + this.TorsoBoxBottom = new ModelRenderer(this, 70, 33); + this.TorsoBoxBottom.addBox(0F, -2F, 0F, 7, 2, 2); + this.TorsoBoxBottom.setRotationPoint(-3F, 10F, -1F); + this.TorsoBoxBottom.setTextureSize(256, 128); + this.TorsoBoxBottom.mirror = true; + setRotation(this.TorsoBoxBottom, 0F, 0F, 0.1570796F); + this.TorsoPlateBack = new ModelRenderer(this, 70, 37); + this.TorsoPlateBack.addBox(0F, 0F, 0F, 3, 1, 2); + this.TorsoPlateBack.setRotationPoint(6F, 4F, -1F); + this.TorsoPlateBack.setTextureSize(256, 128); + this.TorsoPlateBack.mirror = true; + setRotation(this.TorsoPlateBack, 0F, 0F, 0.2268928F); + this.TorsoBoxBack = new ModelRenderer(this, 70, 40); + this.TorsoBoxBack.addBox(0F, 0F, 0F, 2, 4, 2); + this.TorsoBoxBack.setRotationPoint(6F, 5F, -1F); + this.TorsoBoxBack.setTextureSize(256, 128); + this.TorsoBoxBack.mirror = true; + setRotation(this.TorsoBoxBack, 0F, 0F, 0F); + this.TorsoPlateLeftBack = new ModelRenderer(this, 70, 46); + this.TorsoPlateLeftBack.addBox(0F, -4F, -1F, 3, 4, 1); + this.TorsoPlateLeftBack.setRotationPoint(6F, 8.5F, -1F); + this.TorsoPlateLeftBack.setTextureSize(256, 128); + this.TorsoPlateLeftBack.mirror = true; + setRotation(this.TorsoPlateLeftBack, -0.2268928F, 0F, 0F); + this.TorsoPlateRightBack = new ModelRenderer(this, 70, 51); + this.TorsoPlateRightBack.addBox(0F, -4F, 0F, 3, 4, 1); + this.TorsoPlateRightBack.setRotationPoint(6F, 8.5F, 1F); + this.TorsoPlateRightBack.setTextureSize(256, 128); + this.TorsoPlateRightBack.mirror = true; + setRotation(this.TorsoPlateRightBack, 0.2268928F, 0F, 0F); + this.TailFrontBase = new ModelRenderer(this, 24, 54); + this.TailFrontBase.addBox(0F, 0F, 0F, 5, 2, 2); + this.TailFrontBase.setRotationPoint(8F, 6F, -1F); + this.TailFrontBase.setTextureSize(256, 128); + this.TailFrontBase.mirror = true; + setRotation(this.TailFrontBase, 0F, 0F, 0F); + this.TailFrontPlate = new ModelRenderer(this, 24, 58); + this.TailFrontPlate.addBox(-5F, 0F, 0F, 5, 1, 2); + this.TailFrontPlate.setRotationPoint(13F, 6F, -1F); + this.TailFrontPlate.setTextureSize(256, 128); + this.TailFrontPlate.mirror = true; + setRotation(this.TailFrontPlate, 0F, 0F, 0.2268928F); + this.TailBackBase = new ModelRenderer(this, 24, 61); + this.TailBackBase.addBox(0F, 0F, 0F, 4, 2, 1); + this.TailBackBase.setRotationPoint(13F, 6F, -0.5F); + this.TailBackBase.setTextureSize(256, 128); + this.TailBackBase.mirror = true; + setRotation(this.TailBackBase, 0F, 0F, 0F); + this.TailRotorFront = new ModelRenderer(this, 24, 64); + this.TailRotorFront.addBox(0F, 0F, 0F, 1, 3, 1); + this.TailRotorFront.setRotationPoint(15.5F, 8F, -0.5F); + this.TailRotorFront.setTextureSize(256, 128); + this.TailRotorFront.mirror = true; + setRotation(this.TailRotorFront, 0F, 0F, -0.2268928F); + this.TailRotorTop = new ModelRenderer(this, 24, 68); + this.TailRotorTop.addBox(0F, 0F, 0F, 3, 1, 1); + this.TailRotorTop.setRotationPoint(17F, 6F, -0.5F); + this.TailRotorTop.setTextureSize(256, 128); + this.TailRotorTop.mirror = true; + setRotation(this.TailRotorTop, 0F, 0F, 0F); + this.TailRotorBack = new ModelRenderer(this, 24, 70); + this.TailRotorBack.addBox(0F, 0F, 0F, 1, 4, 1); + this.TailRotorBack.setRotationPoint(20F, 6F, -0.5F); + this.TailRotorBack.setTextureSize(256, 128); + this.TailRotorBack.mirror = true; + setRotation(this.TailRotorBack, 0F, 0F, 0F); + this.TailRotorBottom = new ModelRenderer(this, 24, 75); + this.TailRotorBottom.addBox(0F, 0F, 0F, 3, 1, 1); + this.TailRotorBottom.setRotationPoint(18F, 10F, -0.5F); + this.TailRotorBottom.setTextureSize(256, 128); + this.TailRotorBottom.mirror = true; setRotation(TailRotorBottom, 0F, 0F, 0F); - TailRotorBlades = new ModelRenderer(this, 120, 120); - TailRotorBlades.addBox(-1.5F, -1.5F, 0F, 3, 3, 0); - TailRotorBlades.setRotationPoint(17F + 1.5F, 7F + 1.5F, 0F); - TailRotorBlades.setTextureSize(256, 128); - TailRotorBlades.mirror = true; - setRotation(TailRotorBlades, 0F, 0F, 0F); - TailRotorPivot = new ModelRenderer(this, 24, 77); - TailRotorPivot.addBox(0F, 0F, 0F, 1, 2, 1); - TailRotorPivot.setRotationPoint(18F, 8F, -0.5F); - TailRotorPivot.setTextureSize(256, 128); - TailRotorPivot.mirror = true; - setRotation(TailRotorPivot, 0F, 0F, 0F); - HeadNeck = new ModelRenderer(this, 0, 40); - HeadNeck.addBox(-1F, 0F, 0F, 1, 6, 3); - HeadNeck.setRotationPoint(-7F, 4F, -1.5F); - HeadNeck.setTextureSize(256, 128); - HeadNeck.mirror = true; - setRotation(HeadNeck, 0F, 0F, 0.2268928F); - HeadBack = new ModelRenderer(this, 0, 49); - HeadBack.addBox(0F, 0F, 0F, 1, 7, 4); - HeadBack.setRotationPoint(-8.5F, 3.5F, -2F); - HeadBack.setTextureSize(256, 128); - HeadBack.mirror = true; - setRotation(HeadBack, 0F, 0F, 0.2268928F); - HeadBase = new ModelRenderer(this, 0, 60); - HeadBase.addBox(-2F, 1F, 0F, 2, 6, 4); - HeadBase.setRotationPoint(-8.5F, 3.5F, -2F); - HeadBase.setTextureSize(256, 128); - HeadBase.mirror = true; - setRotation(HeadBase, 0F, 0F, 0.2268928F); - HeadTop = new ModelRenderer(this, 0, 70); - HeadTop.addBox(-2F, 0F, 0F, 2, 2, 4); - HeadTop.setRotationPoint(-8.5F, 3.5F, -2F); - HeadTop.setTextureSize(256, 128); - HeadTop.mirror = true; - setRotation(HeadTop, 0F, 0F, -0.2268928F); - HeadFront = new ModelRenderer(this, 0, 76); - HeadFront.addBox(0F, 0F, 0F, 2, 4, 2); - HeadFront.setRotationPoint(-13F, 5F, -1F); - HeadFront.setTextureSize(256, 128); - HeadFront.mirror = true; - setRotation(HeadFront, 0F, 0F, 0F); - HeadLeft = new ModelRenderer(this, 0, 82); - HeadLeft.addBox(-3F, 0F, 0F, 3, 4, 1); - HeadLeft.setRotationPoint(-10F, 5F, -2F); - HeadLeft.setTextureSize(256, 128); - HeadLeft.mirror = true; - setRotation(HeadLeft, 0F, 0.3490659F, 0F); - HeadRight = new ModelRenderer(this, 0, 87); - HeadRight.addBox(-3F, 0F, -1F, 3, 4, 1); - HeadRight.setRotationPoint(-10F, 5F, 2F); - HeadRight.setTextureSize(256, 128); - HeadRight.mirror = true; - setRotation(HeadRight, 0F, -0.3490659F, 0F); - HeadFrontTop = new ModelRenderer(this, 0, 92); - HeadFrontTop.addBox(-3F, 0F, 0F, 3, 1, 2); - HeadFrontTop.setRotationPoint(-10.5F, 4F, -1F); - HeadFrontTop.setTextureSize(256, 128); - HeadFrontTop.mirror = true; - setRotation(HeadFrontTop, 0F, 0F, -0.3490659F); - TorsoRotorBottom = new ModelRenderer(this, 0, 0); - TorsoRotorBottom.addBox(0F, 0F, 0F, 3, 1, 1); - TorsoRotorBottom.setRotationPoint(-7F, 11.5F, -0.5F); - TorsoRotorBottom.setTextureSize(256, 128); - TorsoRotorBottom.mirror = true; - setRotation(TorsoRotorBottom, 0F, 0F, 0F); - TorsoRotorFront = new ModelRenderer(this, 0, 2); - TorsoRotorFront.addBox(0F, 0F, 0F, 1, 3, 1); - TorsoRotorFront.setRotationPoint(-8F, 9F, -0.5F); - TorsoRotorFront.setTextureSize(256, 128); - TorsoRotorFront.mirror = true; - setRotation(TorsoRotorFront, 0F, 0F, 0F); - TorsoRotorBack = new ModelRenderer(this, 0, 6); - TorsoRotorBack.addBox(0F, 0F, 0F, 1, 2, 1); - TorsoRotorBack.setRotationPoint(-4F, 10F, -0.5F); - TorsoRotorBack.setTextureSize(256, 128); - TorsoRotorBack.mirror = true; - setRotation(TorsoRotorBack, 0F, 0F, 0F); - TorsoRotorBlades = new ModelRenderer(this, 112, 120); - TorsoRotorBlades.addBox(-1.5F, -1.5F, 0F, 3, 3, 0); - TorsoRotorBlades.setRotationPoint(-7F + 1.5F, 8.5F + 1.5F, 0F); - TorsoRotorBlades.setTextureSize(256, 128); - TorsoRotorBlades.mirror = true; - setRotation(TorsoRotorBlades, 0F, 0F, 0F); - TorsoRotorPivot = new ModelRenderer(this, 0, 9); - TorsoRotorPivot.addBox(0F, 0F, 0F, 1, 2, 1); - TorsoRotorPivot.setRotationPoint(-6F, 8.5F, -0.5F); - TorsoRotorPivot.setTextureSize(256, 128); - TorsoRotorPivot.mirror = true; - setRotation(TorsoRotorPivot, 0F, 0F, 0F); - RotorBlades = new ModelRenderer(this, 76, 68); - RotorBlades.addBox(-30F, 0F, -30F, 60, 0, 60); - RotorBlades.setRotationPoint(0F, 1.5F, 0F); - RotorBlades.setTextureSize(256, 128); - RotorBlades.mirror = true; - setRotation(RotorBlades, 0F, 0F, 0F); - Antenna1 = new ModelRenderer(this, 0, 95); - Antenna1.addBox(0F, 0F, 0F, 4, 1, 1); - Antenna1.setRotationPoint(-14F, 4F, 0.5F); - Antenna1.setTextureSize(256, 128); - Antenna1.mirror = true; - setRotation(Antenna1, 0F, 0F, 0F); - Antenna2 = new ModelRenderer(this, 0, 97); - Antenna2.addBox(0F, 0F, 0F, 2, 1, 1); - Antenna2.setRotationPoint(-15F, 7F, 0F); - Antenna2.setTextureSize(256, 128); - Antenna2.mirror = true; - setRotation(Antenna2, 0F, 0F, 0F); - GunPivot = new ModelRenderer(this, 0, 106); - GunPivot.addBox(0F, 0F, 0F, 1, 2, 2); - GunPivot.setRotationPoint(-11F, 10F, -1F); - GunPivot.setTextureSize(256, 128); - GunPivot.mirror = true; - setRotation(GunPivot, 0F, 0F, 0F); - GunBarrel = new ModelRenderer(this, 0, 110); - GunBarrel.addBox(-6F, 0F, -0.5F, 6, 1, 1); - GunBarrel.setRotationPoint(-10.5F, 11.5F, 0F); - GunBarrel.setTextureSize(256, 128); - GunBarrel.mirror = true; - setRotation(GunBarrel, 0F, 0, 0F); - GunBack = new ModelRenderer(this, 0, 112); - GunBack.addBox(0F, -1F, -1F, 2, 2, 2); - GunBack.setRotationPoint(-10.5F, 12F, 0F); - GunBack.setTextureSize(256, 128); - GunBack.mirror = true; - setRotation(GunBack, 0F, 0, 0F); + this.TailRotorBlades = new ModelRenderer(this, 120, 120); + this.TailRotorBlades.addBox(-1.5F, -1.5F, 0F, 3, 3, 0); + this.TailRotorBlades.setRotationPoint(17F + 1.5F, 7F + 1.5F, 0F); + this.TailRotorBlades.setTextureSize(256, 128); + this.TailRotorBlades.mirror = true; + setRotation(this.TailRotorBlades, 0F, 0F, 0F); + this.TailRotorPivot = new ModelRenderer(this, 24, 77); + this.TailRotorPivot.addBox(0F, 0F, 0F, 1, 2, 1); + this.TailRotorPivot.setRotationPoint(18F, 8F, -0.5F); + this.TailRotorPivot.setTextureSize(256, 128); + this.TailRotorPivot.mirror = true; + setRotation(this.TailRotorPivot, 0F, 0F, 0F); + this.HeadNeck = new ModelRenderer(this, 0, 40); + this.HeadNeck.addBox(-1F, 0F, 0F, 1, 6, 3); + this.HeadNeck.setRotationPoint(-7F, 4F, -1.5F); + this.HeadNeck.setTextureSize(256, 128); + this.HeadNeck.mirror = true; + setRotation(this.HeadNeck, 0F, 0F, 0.2268928F); + this.HeadBack = new ModelRenderer(this, 0, 49); + this.HeadBack.addBox(0F, 0F, 0F, 1, 7, 4); + this.HeadBack.setRotationPoint(-8.5F, 3.5F, -2F); + this.HeadBack.setTextureSize(256, 128); + this.HeadBack.mirror = true; + setRotation(this.HeadBack, 0F, 0F, 0.2268928F); + this.HeadBase = new ModelRenderer(this, 0, 60); + this.HeadBase.addBox(-2F, 1F, 0F, 2, 6, 4); + this.HeadBase.setRotationPoint(-8.5F, 3.5F, -2F); + this.HeadBase.setTextureSize(256, 128); + this.HeadBase.mirror = true; + setRotation(this.HeadBase, 0F, 0F, 0.2268928F); + this.HeadTop = new ModelRenderer(this, 0, 70); + this.HeadTop.addBox(-2F, 0F, 0F, 2, 2, 4); + this.HeadTop.setRotationPoint(-8.5F, 3.5F, -2F); + this.HeadTop.setTextureSize(256, 128); + this.HeadTop.mirror = true; + setRotation(this.HeadTop, 0F, 0F, -0.2268928F); + this.HeadFront = new ModelRenderer(this, 0, 76); + this.HeadFront.addBox(0F, 0F, 0F, 2, 4, 2); + this.HeadFront.setRotationPoint(-13F, 5F, -1F); + this.HeadFront.setTextureSize(256, 128); + this.HeadFront.mirror = true; + setRotation(this.HeadFront, 0F, 0F, 0F); + this.HeadLeft = new ModelRenderer(this, 0, 82); + this.HeadLeft.addBox(-3F, 0F, 0F, 3, 4, 1); + this.HeadLeft.setRotationPoint(-10F, 5F, -2F); + this.HeadLeft.setTextureSize(256, 128); + this.HeadLeft.mirror = true; + setRotation(this.HeadLeft, 0F, 0.3490659F, 0F); + this.HeadRight = new ModelRenderer(this, 0, 87); + this.HeadRight.addBox(-3F, 0F, -1F, 3, 4, 1); + this.HeadRight.setRotationPoint(-10F, 5F, 2F); + this.HeadRight.setTextureSize(256, 128); + this.HeadRight.mirror = true; + setRotation(this.HeadRight, 0F, -0.3490659F, 0F); + this.HeadFrontTop = new ModelRenderer(this, 0, 92); + this.HeadFrontTop.addBox(-3F, 0F, 0F, 3, 1, 2); + this.HeadFrontTop.setRotationPoint(-10.5F, 4F, -1F); + this.HeadFrontTop.setTextureSize(256, 128); + this.HeadFrontTop.mirror = true; + setRotation(this.HeadFrontTop, 0F, 0F, -0.3490659F); + this.TorsoRotorBottom = new ModelRenderer(this, 0, 0); + this.TorsoRotorBottom.addBox(0F, 0F, 0F, 3, 1, 1); + this.TorsoRotorBottom.setRotationPoint(-7F, 11.5F, -0.5F); + this.TorsoRotorBottom.setTextureSize(256, 128); + this.TorsoRotorBottom.mirror = true; + setRotation(this.TorsoRotorBottom, 0F, 0F, 0F); + this.TorsoRotorFront = new ModelRenderer(this, 0, 2); + this.TorsoRotorFront.addBox(0F, 0F, 0F, 1, 3, 1); + this.TorsoRotorFront.setRotationPoint(-8F, 9F, -0.5F); + this.TorsoRotorFront.setTextureSize(256, 128); + this.TorsoRotorFront.mirror = true; + setRotation(this.TorsoRotorFront, 0F, 0F, 0F); + this.TorsoRotorBack = new ModelRenderer(this, 0, 6); + this.TorsoRotorBack.addBox(0F, 0F, 0F, 1, 2, 1); + this.TorsoRotorBack.setRotationPoint(-4F, 10F, -0.5F); + this.TorsoRotorBack.setTextureSize(256, 128); + this.TorsoRotorBack.mirror = true; + setRotation(this.TorsoRotorBack, 0F, 0F, 0F); + this.TorsoRotorBlades = new ModelRenderer(this, 112, 120); + this.TorsoRotorBlades.addBox(-1.5F, -1.5F, 0F, 3, 3, 0); + this.TorsoRotorBlades.setRotationPoint(-7F + 1.5F, 8.5F + 1.5F, 0F); + this.TorsoRotorBlades.setTextureSize(256, 128); + this.TorsoRotorBlades.mirror = true; + setRotation(this.TorsoRotorBlades, 0F, 0F, 0F); + this.TorsoRotorPivot = new ModelRenderer(this, 0, 9); + this.TorsoRotorPivot.addBox(0F, 0F, 0F, 1, 2, 1); + this.TorsoRotorPivot.setRotationPoint(-6F, 8.5F, -0.5F); + this.TorsoRotorPivot.setTextureSize(256, 128); + this.TorsoRotorPivot.mirror = true; + setRotation(this.TorsoRotorPivot, 0F, 0F, 0F); + this.RotorBlades = new ModelRenderer(this, 76, 68); + this.RotorBlades.addBox(-30F, 0F, -30F, 60, 0, 60); + this.RotorBlades.setRotationPoint(0F, 1.5F, 0F); + this.RotorBlades.setTextureSize(256, 128); + this.RotorBlades.mirror = true; + setRotation(this.RotorBlades, 0F, 0F, 0F); + this.Antenna1 = new ModelRenderer(this, 0, 95); + this.Antenna1.addBox(0F, 0F, 0F, 4, 1, 1); + this.Antenna1.setRotationPoint(-14F, 4F, 0.5F); + this.Antenna1.setTextureSize(256, 128); + this.Antenna1.mirror = true; + setRotation(this.Antenna1, 0F, 0F, 0F); + this.Antenna2 = new ModelRenderer(this, 0, 97); + this.Antenna2.addBox(0F, 0F, 0F, 2, 1, 1); + this.Antenna2.setRotationPoint(-15F, 7F, 0F); + this.Antenna2.setTextureSize(256, 128); + this.Antenna2.mirror = true; + setRotation(this.Antenna2, 0F, 0F, 0F); + this.GunPivot = new ModelRenderer(this, 0, 106); + this.GunPivot.addBox(0F, 0F, 0F, 1, 2, 2); + this.GunPivot.setRotationPoint(-11F, 10F, -1F); + this.GunPivot.setTextureSize(256, 128); + this.GunPivot.mirror = true; + setRotation(this.GunPivot, 0F, 0F, 0F); + this.GunBarrel = new ModelRenderer(this, 0, 110); + this.GunBarrel.addBox(-6F, 0F, -0.5F, 6, 1, 1); + this.GunBarrel.setRotationPoint(-10.5F, 11.5F, 0F); + this.GunBarrel.setTextureSize(256, 128); + this.GunBarrel.mirror = true; + setRotation(this.GunBarrel, 0F, 0, 0F); + this.GunBack = new ModelRenderer(this, 0, 112); + this.GunBack.addBox(0F, -1F, -1F, 2, 2, 2); + this.GunBack.setRotationPoint(-10.5F, 12F, 0F); + this.GunBack.setTextureSize(256, 128); + this.GunBack.mirror = true; + setRotation(this.GunBack, 0F, 0, 0F); } @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - RotorPivotStem.render(f5); - RotorPivotTop.render(f5); - RotorPivotPlate.render(f5); - TorsoBaseCenter.render(f5); - TorsoPlateLeft.render(f5); - TorsoBaseBottom.render(f5); - TorsoPlateRight.render(f5); - TorsoPlateBottom.render(f5); - WingLeftPlate.render(f5); - WingRightPlate.render(f5); - WingLeft.render(f5); - WingLeftFront.render(f5); - WingLeftTip.render(f5); - WingRight.render(f5); - WingRightFront.render(f5); - WingRightTip.render(f5); - TorsoBaseBack.render(f5); - TorsoBoxBottom.render(f5); - TorsoPlateBack.render(f5); - TorsoBoxBack.render(f5); - TorsoPlateLeftBack.render(f5); - TorsoPlateRightBack.render(f5); - TailFrontBase.render(f5); - TailFrontPlate.render(f5); - TailBackBase.render(f5); - TailRotorFront.render(f5); - TailRotorTop.render(f5); - TailRotorBack.render(f5); - TailRotorBottom.render(f5); - TailRotorBlades.render(f5); - TailRotorPivot.render(f5); - HeadNeck.render(f5); - HeadBack.render(f5); - HeadBase.render(f5); - HeadTop.render(f5); - HeadFront.render(f5); - HeadLeft.render(f5); - HeadRight.render(f5); - HeadFrontTop.render(f5); - TorsoRotorBottom.render(f5); - TorsoRotorFront.render(f5); - TorsoRotorBack.render(f5); - TorsoRotorBlades.render(f5); - TorsoRotorPivot.render(f5); - RotorBlades.render(f5); - Antenna1.render(f5); - Antenna2.render(f5); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderAll(scaleFactor); + } + + public void renderAll(float scaleFactor) { + float time = (System.currentTimeMillis() % 360000L) / (1000F / 60F); + + this.RotorBlades.rotateAngleY = time * (f * 5); + this.TorsoRotorBlades.rotateAngleZ = time * (f * 5); + this.TailRotorBlades.rotateAngleZ = time * (f * 5); + + this.RotorPivotStem.render(scaleFactor); + this.RotorPivotTop.render(scaleFactor); + this.RotorPivotPlate.render(scaleFactor); + this.TorsoBaseCenter.render(scaleFactor); + this.TorsoPlateLeft.render(scaleFactor); + this.TorsoBaseBottom.render(scaleFactor); + this.TorsoPlateRight.render(scaleFactor); + this.TorsoPlateBottom.render(scaleFactor); + this.WingLeftPlate.render(scaleFactor); + this.WingRightPlate.render(scaleFactor); + this.WingLeft.render(scaleFactor); + this.WingLeftFront.render(scaleFactor); + this.WingLeftTip.render(scaleFactor); + this.WingRight.render(scaleFactor); + this.WingRightFront.render(scaleFactor); + this.WingRightTip.render(scaleFactor); + this.TorsoBaseBack.render(scaleFactor); + this.TorsoBoxBottom.render(scaleFactor); + this.TorsoPlateBack.render(scaleFactor); + this.TorsoBoxBack.render(scaleFactor); + this.TorsoPlateLeftBack.render(scaleFactor); + this.TorsoPlateRightBack.render(scaleFactor); + this.TailFrontBase.render(scaleFactor); + this.TailFrontPlate.render(scaleFactor); + this.TailBackBase.render(scaleFactor); + this.TailRotorFront.render(scaleFactor); + this.TailRotorTop.render(scaleFactor); + this.TailRotorBack.render(scaleFactor); + this.TailRotorBottom.render(scaleFactor); + this.TailRotorBlades.render(scaleFactor); + this.TailRotorPivot.render(scaleFactor); + this.HeadNeck.render(scaleFactor); + this.HeadBack.render(scaleFactor); + this.HeadBase.render(scaleFactor); + this.HeadTop.render(scaleFactor); + this.HeadFront.render(scaleFactor); + this.HeadLeft.render(scaleFactor); + this.HeadRight.render(scaleFactor); + this.HeadFrontTop.render(scaleFactor); + this.TorsoRotorBottom.render(scaleFactor); + this.TorsoRotorFront.render(scaleFactor); + this.TorsoRotorBack.render(scaleFactor); + this.TorsoRotorBlades.render(scaleFactor); + this.TorsoRotorPivot.render(scaleFactor); + this.RotorBlades.render(scaleFactor); + this.Antenna1.render(scaleFactor); + this.Antenna2.render(scaleFactor); //GunPivot.render(f5); //GunBarrel.render(f5); //GunBack.render(f5); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - - public void renderAll(float f5) { - RotorPivotStem.render(f5); - RotorPivotTop.render(f5); - RotorPivotPlate.render(f5); - TorsoBaseCenter.render(f5); - TorsoPlateLeft.render(f5); - TorsoBaseBottom.render(f5); - TorsoPlateRight.render(f5); - TorsoPlateBottom.render(f5); - WingLeftPlate.render(f5); - WingRightPlate.render(f5); - WingLeft.render(f5); - WingLeftFront.render(f5); - WingLeftTip.render(f5); - WingRight.render(f5); - WingRightFront.render(f5); - WingRightTip.render(f5); - TorsoBaseBack.render(f5); - TorsoBoxBottom.render(f5); - TorsoPlateBack.render(f5); - TorsoBoxBack.render(f5); - TorsoPlateLeftBack.render(f5); - TorsoPlateRightBack.render(f5); - TailFrontBase.render(f5); - TailFrontPlate.render(f5); - TailBackBase.render(f5); - TailRotorFront.render(f5); - TailRotorTop.render(f5); - TailRotorBack.render(f5); - TailRotorBottom.render(f5); - TailRotorBlades.render(f5); - TailRotorPivot.render(f5); - HeadNeck.render(f5); - HeadBack.render(f5); - HeadBase.render(f5); - HeadTop.render(f5); - HeadFront.render(f5); - HeadLeft.render(f5); - HeadRight.render(f5); - HeadFrontTop.render(f5); - TorsoRotorBottom.render(f5); - TorsoRotorFront.render(f5); - TorsoRotorBack.render(f5); - TorsoRotorBlades.render(f5); - TorsoRotorPivot.render(f5); - RotorBlades.render(f5); - Antenna1.render(f5); - Antenna2.render(f5); - //GunPivot.render(f5); - //GunBarrel.render(f5); - //GunBack.render(f5); - - RotorBlades.rotateAngleY += f * 5; - TorsoRotorBlades.rotateAngleZ += f * 5; - TailRotorBlades.rotateAngleZ += f * 5; - } - } diff --git a/src/main/java/com/hbm/render/model/ModelJetPack.java b/src/main/java/com/hbm/render/model/ModelJetPack.java index b15e7a53c..5024c885d 100644 --- a/src/main/java/com/hbm/render/model/ModelJetPack.java +++ b/src/main/java/com/hbm/render/model/ModelJetPack.java @@ -14,7 +14,7 @@ import net.minecraft.item.EnumAction; import net.minecraft.item.ItemStack; public class ModelJetPack extends ModelBiped { - // fields + ModelRenderer Tank1; ModelRenderer Tank2; ModelRenderer Tip1; @@ -27,111 +27,87 @@ public class ModelJetPack extends ModelBiped { ModelRenderer JetPack; public ModelJetPack() { - textureWidth = 32; - textureHeight = 32; + this.textureWidth = 32; + this.textureHeight = 32; float x = 0F; float y = 0F; float z = -2F; - - JetPack = new ModelRenderer(this, 0, 0); - JetPack.setRotationPoint(x, y, z); - - Pack = new ModelRenderer(this, 12, 10); - Pack.addBox(0F, 0F, 0F, 4, 6, 1); - Pack.setRotationPoint(-2F, 3F, 0F); - Pack.setTextureSize(32, 32); - Pack.mirror = true; - convertToChild(JetPack, Pack); - setRotation(Pack, 0F, 0F, 0F); - Tank1 = new ModelRenderer(this, 0, 0); - Tank1.addBox(0F, 0F, 0F, 3, 8, 3); - Tank1.setRotationPoint(0.5F, 2F, 0.5F); - Tank1.setTextureSize(32, 32); - Tank1.mirror = true; - setRotation(Tank1, 0F, 0F, 0F); - convertToChild(JetPack, Tank1); - Tank2 = new ModelRenderer(this, 0, 11); - Tank2.addBox(0F, 0F, 0F, 3, 8, 3); - Tank2.setRotationPoint(-3.5F, 2F, 0.5F); - Tank2.setTextureSize(32, 32); - Tank2.mirror = true; - setRotation(Tank2, 0F, 0F, 0F); - convertToChild(JetPack, Tank2); - Tip1 = new ModelRenderer(this, 0, 22); - Tip1.addBox(0F, 0F, 0F, 2, 1, 2); - Tip1.setRotationPoint(1F, 1F, 1F); - Tip1.setTextureSize(32, 32); - Tip1.mirror = true; - setRotation(Tip1, 0F, 0F, 0F); - convertToChild(JetPack, Tip1); - Tip2 = new ModelRenderer(this, 0, 25); - Tip2.addBox(0F, 0F, 0F, 2, 1, 2); - Tip2.setRotationPoint(-3F, 1F, 1F); - Tip2.setTextureSize(32, 32); - Tip2.mirror = true; - setRotation(Tip2, 0F, 0F, 0F); - convertToChild(JetPack, Tip2); - Duct1 = new ModelRenderer(this, 8, 22); - Duct1.addBox(0F, 0F, 0F, 2, 1, 2); - Duct1.setRotationPoint(1F, 9.5F, 1F); - Duct1.setTextureSize(32, 32); - Duct1.mirror = true; - setRotation(Duct1, 0F, 0F, 0F); - convertToChild(JetPack, Duct1); - Duct2 = new ModelRenderer(this, 8, 25); - Duct2.addBox(0F, 0F, 0F, 2, 1, 2); - Duct2.setRotationPoint(-3F, 9.5F, 1F); - Duct2.setTextureSize(32, 32); - Duct2.mirror = true; - setRotation(Duct2, 0F, 0F, 0F); - convertToChild(JetPack, Duct2); - Thruster1 = new ModelRenderer(this, 12, 0); - Thruster1.addBox(0F, 0F, 0F, 3, 2, 3); - Thruster1.setRotationPoint(0.5F, 10.5F, 0.5F); - Thruster1.setTextureSize(32, 32); - Thruster1.mirror = true; - setRotation(Thruster1, 0F, 0F, 0F); - convertToChild(JetPack, Thruster1); - Thruster2 = new ModelRenderer(this, 12, 5); - Thruster2.addBox(0F, 0F, 0F, 3, 2, 3); - Thruster2.setRotationPoint(-3.5F, 10.5F, 0.5F); - Thruster2.setTextureSize(32, 32); - Thruster2.mirror = true; - setRotation(Thruster2, 0F, 0F, 0F); - convertToChild(JetPack, Thruster2); - } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - //super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - - /*Tank1.render(f5); - Tank2.render(f5); - Tip1.render(f5); - Tip2.render(f5); - Duct1.render(f5); - Duct2.render(f5); - Thruster1.render(f5); - Thruster2.render(f5);*/ - JetPack.render(f5); - } + this.JetPack = new ModelRenderer(this, 0, 0); + this.JetPack.setRotationPoint(x, y, z); - private void setRotation(ModelRenderer model, float x, float y, float z) { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; + this.Pack = new ModelRenderer(this, 12, 10); + this.Pack.addBox(0F, 0F, 0F, 4, 6, 1); + this.Pack.setRotationPoint(-2F, 3F, 0F); + this.Pack.setTextureSize(32, 32); + this.Pack.mirror = true; + convertToChild(this.JetPack, this.Pack); + setRotation(this.Pack, 0F, 0F, 0F); + this.Tank1 = new ModelRenderer(this, 0, 0); + this.Tank1.addBox(0F, 0F, 0F, 3, 8, 3); + this.Tank1.setRotationPoint(0.5F, 2F, 0.5F); + this.Tank1.setTextureSize(32, 32); + this.Tank1.mirror = true; + setRotation(this.Tank1, 0F, 0F, 0F); + convertToChild(this.JetPack, this.Tank1); + this.Tank2 = new ModelRenderer(this, 0, 11); + this.Tank2.addBox(0F, 0F, 0F, 3, 8, 3); + this.Tank2.setRotationPoint(-3.5F, 2F, 0.5F); + this.Tank2.setTextureSize(32, 32); + this.Tank2.mirror = true; + setRotation(this.Tank2, 0F, 0F, 0F); + convertToChild(this.JetPack, this.Tank2); + this.Tip1 = new ModelRenderer(this, 0, 22); + this.Tip1.addBox(0F, 0F, 0F, 2, 1, 2); + this.Tip1.setRotationPoint(1F, 1F, 1F); + this.Tip1.setTextureSize(32, 32); + this.Tip1.mirror = true; + setRotation(this.Tip1, 0F, 0F, 0F); + convertToChild(this.JetPack, this.Tip1); + this.Tip2 = new ModelRenderer(this, 0, 25); + this.Tip2.addBox(0F, 0F, 0F, 2, 1, 2); + this.Tip2.setRotationPoint(-3F, 1F, 1F); + this.Tip2.setTextureSize(32, 32); + this.Tip2.mirror = true; + setRotation(this.Tip2, 0F, 0F, 0F); + convertToChild(this.JetPack, this.Tip2); + this.Duct1 = new ModelRenderer(this, 8, 22); + this.Duct1.addBox(0F, 0F, 0F, 2, 1, 2); + this.Duct1.setRotationPoint(1F, 9.5F, 1F); + this.Duct1.setTextureSize(32, 32); + this.Duct1.mirror = true; + setRotation(this.Duct1, 0F, 0F, 0F); + convertToChild(this.JetPack, this.Duct1); + this.Duct2 = new ModelRenderer(this, 8, 25); + this.Duct2.addBox(0F, 0F, 0F, 2, 1, 2); + this.Duct2.setRotationPoint(-3F, 9.5F, 1F); + this.Duct2.setTextureSize(32, 32); + this.Duct2.mirror = true; + setRotation(this.Duct2, 0F, 0F, 0F); + convertToChild(this.JetPack, this.Duct2); + this.Thruster1 = new ModelRenderer(this, 12, 0); + this.Thruster1.addBox(0F, 0F, 0F, 3, 2, 3); + this.Thruster1.setRotationPoint(0.5F, 10.5F, 0.5F); + this.Thruster1.setTextureSize(32, 32); + this.Thruster1.mirror = true; + setRotation(this.Thruster1, 0F, 0F, 0F); + convertToChild(this.JetPack, this.Thruster1); + this.Thruster2 = new ModelRenderer(this, 12, 5); + this.Thruster2.addBox(0F, 0F, 0F, 3, 2, 3); + this.Thruster2.setRotationPoint(-3.5F, 10.5F, 0.5F); + this.Thruster2.setTextureSize(32, 32); + this.Thruster2.mirror = true; + setRotation(this.Thruster2, 0F, 0F, 0F); + convertToChild(this.JetPack, this.Thruster2); } @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { + if (entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; - if (player.isSneaking()) { - this.isSneak = true; - } else { - this.isSneak = false; - } + this.isSneak = player.isSneaking(); ItemStack itemstack = player.inventory.getCurrentItem(); this.heldItemRight = itemstack != null ? 1 : 0; @@ -145,7 +121,9 @@ public class ModelJetPack extends ModelBiped { } } } - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.JetPack.rotationPointX = this.bipedBody.rotationPointX; this.JetPack.rotationPointY = this.bipedBody.rotationPointY; this.JetPack.rotationPointZ = this.bipedBody.rotationPointZ; @@ -154,14 +132,38 @@ public class ModelJetPack extends ModelBiped { this.JetPack.rotateAngleZ = this.bipedBody.rotateAngleZ; } - protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) { - parChild.rotationPointX -= parParent.rotationPointX; - parChild.rotationPointY -= parParent.rotationPointY; - parChild.rotationPointZ -= parParent.rotationPointZ; - parChild.rotateAngleX -= parParent.rotateAngleX; - parChild.rotateAngleY -= parParent.rotateAngleY; - parChild.rotateAngleZ -= parParent.rotateAngleZ; - parParent.addChild(parChild); + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + //super.render(entity, f, f1, f2, f3, f4, f5); + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + + /*Tank1.render(f5); + Tank2.render(f5); + Tip1.render(f5); + Tip2.render(f5); + Duct1.render(f5); + Duct2.render(f5); + Thruster1.render(f5); + Thruster2.render(f5);*/ + this.JetPack.render(scaleFactor); } + protected static void convertToChild(ModelRenderer parent, ModelRenderer child) { + + child.rotationPointX -= parent.rotationPointX; + child.rotationPointY -= parent.rotationPointY; + child.rotationPointZ -= parent.rotationPointZ; + child.rotateAngleX -= parent.rotateAngleX; + child.rotateAngleY -= parent.rotateAngleY; + child.rotateAngleZ -= parent.rotateAngleZ; + parent.addChild(child); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelM65.java b/src/main/java/com/hbm/render/model/ModelM65.java index d61b13d43..109c8ba87 100644 --- a/src/main/java/com/hbm/render/model/ModelM65.java +++ b/src/main/java/com/hbm/render/model/ModelM65.java @@ -17,102 +17,100 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; public class ModelM65 extends ModelBiped { - // fields + public ModelRenderer mask; public ModelRenderer filter; public ModelM65() { - textureWidth = 32; - textureHeight = 32; - + this.textureWidth = 32; + this.textureHeight = 32; + float yOffset = 0.5F; - mask = new ModelRenderer(this, 0, 0); - filter = new ModelRenderer(this, 0, 0); + this.mask = new ModelRenderer(this, 0, 0); + this.filter = new ModelRenderer(this, 0, 0); ModelRenderer maskHead = new ModelRenderer(this, 0, 0); maskHead.addBox(0F, 0F, 0F, 8, 8, 8); maskHead.setRotationPoint(-4F, -8F + yOffset, -4F); maskHead.setTextureSize(32, 32); maskHead.mirror = true; setRotation(maskHead, 0F, 0F, 0F); - convertToChild(mask, maskHead); + convertToChild(this.mask, maskHead); ModelRenderer nose = new ModelRenderer(this, 0, 16); nose.addBox(0F, 0F, 0F, 3, 3, 1); nose.setRotationPoint(-1.5F, -3.5F + yOffset, -5F); nose.setTextureSize(32, 32); nose.mirror = true; setRotation(nose, 0F, 0F, 0F); - convertToChild(mask, nose); + convertToChild(this.mask, nose); ModelRenderer outlet = new ModelRenderer(this, 0, 20); outlet.addBox(0F, -2F, 0F, 2, 2, 1); outlet.setRotationPoint(-1F, -3.5F + yOffset, -5F); outlet.setTextureSize(32, 32); outlet.mirror = true; setRotation(outlet, -0.4799655F, 0F, 0F); - convertToChild(mask, outlet); + convertToChild(this.mask, outlet); ModelRenderer noseSlope = new ModelRenderer(this, 8, 16); noseSlope.addBox(0F, 0F, -2F, 3, 2, 2); noseSlope.setRotationPoint(-1.5F, -2F + yOffset, -4F); noseSlope.setTextureSize(32, 32); noseSlope.mirror = true; setRotation(noseSlope, 0.6108652F, 0F, 0F); - convertToChild(mask, noseSlope); + convertToChild(this.mask, noseSlope); ModelRenderer eye1 = new ModelRenderer(this, 0, 23); eye1.addBox(0F, 0F, 0F, 3, 3, 0); eye1.setRotationPoint(-3.5F, -6F + yOffset, -4.2F); eye1.setTextureSize(32, 32); eye1.mirror = true; setRotation(eye1, 0F, 0F, 0F); - convertToChild(mask, eye1); + convertToChild(this.mask, eye1); ModelRenderer eye2 = new ModelRenderer(this, 0, 26); eye2.addBox(0F, 0F, 0F, 3, 3, 0); eye2.setRotationPoint(0.5F, -6F + yOffset, -4.2F); eye2.setTextureSize(32, 32); eye2.mirror = true; setRotation(eye2, 0F, 0F, 0F); - convertToChild(mask, eye2); + convertToChild(this.mask, eye2); ModelRenderer iForgot = new ModelRenderer(this, 6, 20); iForgot.addBox(0F, 0F, 0F, 2, 2, 1); iForgot.setRotationPoint(-1F, -3.2F + yOffset, -6F); iForgot.setTextureSize(32, 32); iForgot.mirror = true; setRotation(iForgot, 0F, 0F, 0F); - convertToChild(mask, iForgot); + convertToChild(this.mask, iForgot); ModelRenderer filterConnector = new ModelRenderer(this, 6, 23); filterConnector.addBox(0F, 0F, -3F, 2, 2, 1); filterConnector.setRotationPoint(-1F, -2F + yOffset, -4F); filterConnector.setTextureSize(32, 32); filterConnector.mirror = true; setRotation(filterConnector, 0.6108652F, 0F, 0F); - convertToChild(filter, filterConnector); + convertToChild(this.filter, filterConnector); ModelRenderer filter1 = new ModelRenderer(this, 18, 21); filter1.addBox(0F, -1F, -5F, 3, 4, 2); filter1.setRotationPoint(-1.5F, -2F + yOffset, -4F); filter1.setTextureSize(32, 32); filter1.mirror = true; setRotation(filter1, 0.6108652F, 0F, 0F); - convertToChild(filter, filter1); + convertToChild(this.filter, filter1); ModelRenderer filter2 = new ModelRenderer(this, 18, 16); filter2.addBox(0F, -0.5F, -5F, 4, 3, 2); filter2.setRotationPoint(-2F, -2F + yOffset, -4F); filter2.setTextureSize(32, 32); filter2.mirror = true; setRotation(filter2, 0.6108652F, 0F, 0F); - convertToChild(filter, filter2); + convertToChild(this.filter, filter2); } @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { + if(entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; - if (player.isSneaking()) { - this.isSneak = true; - } else { - this.isSneak = false; - } + this.isSneak = player.isSneaking(); } - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.mask.rotationPointX = this.bipedHead.rotationPointX; this.mask.rotationPointY = this.bipedHead.rotationPointY; this.mask.rotateAngleY = this.bipedHead.rotateAngleY; @@ -124,54 +122,48 @@ public class ModelM65 extends ModelBiped { } @Override - public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, entity); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + + GL11.glPushMatrix(); if(this.isChild) { float f6 = 2.0F; - GL11.glPushMatrix(); GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6); - GL11.glTranslatef(0.0F, 16.0F * par7, 0.0F); + GL11.glTranslatef(0.0F, 16.0F * scaleFactor, 0.0F); double d = 1D / 16D * 18D; GL11.glScaled(d, d, d); - GL11.glScaled(1.01D, 1.01D, 1.01D); - this.mask.render(par7); - - if(!(entity instanceof EntityLivingBase) || ArmorUtil.getGasMaskFilterRecursively(((EntityLivingBase)entity).getEquipmentInSlot(4), (EntityLivingBase)entity) != null) - this.filter.render(par7); - - GL11.glPopMatrix(); + } else { - GL11.glPushMatrix(); double d = 1D / 16D * 18D; GL11.glScaled(d, d, d); - GL11.glScaled(1.01D, 1.01D, 1.01D); - this.mask.render(par7); - - if(!(entity instanceof EntityLivingBase) || ArmorUtil.getGasMaskFilterRecursively(((EntityLivingBase)entity).getEquipmentInSlot(4), (EntityLivingBase)entity) != null) - this.filter.render(par7); - - GL11.glPopMatrix(); } + + GL11.glScaled(1.01D, 1.01D, 1.01D); + this.mask.render(scaleFactor); + if(!(entity instanceof EntityLivingBase) || ArmorUtil.getGasMaskFilterRecursively(((EntityLivingBase)entity).getEquipmentInSlot(4), (EntityLivingBase)entity) != null) + this.filter.render(scaleFactor); + GL11.glPopMatrix(); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + protected static void convertToChild(ModelRenderer parent, ModelRenderer child) { + + // move child rotation point to be relative to parent + child.rotationPointX -= parent.rotationPointX; + child.rotationPointY -= parent.rotationPointY; + child.rotationPointZ -= parent.rotationPointZ; + // make rotations relative to parent + child.rotateAngleX -= parent.rotateAngleX; + child.rotateAngleY -= parent.rotateAngleY; + child.rotateAngleZ -= parent.rotateAngleZ; + // create relationship + parent.addChild(child); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) { - // move child rotation point to be relative to parent - parChild.rotationPointX -= parParent.rotationPointX; - parChild.rotationPointY -= parParent.rotationPointY; - parChild.rotationPointZ -= parParent.rotationPointZ; - // make rotations relative to parent - parChild.rotateAngleX -= parParent.rotateAngleX; - parChild.rotateAngleY -= parParent.rotateAngleY; - parChild.rotateAngleZ -= parParent.rotateAngleZ; - // create relationship - parParent.addChild(parChild); - } - } diff --git a/src/main/java/com/hbm/render/model/ModelM65Blaze.java b/src/main/java/com/hbm/render/model/ModelM65Blaze.java index b7ff21058..fdc99eafc 100644 --- a/src/main/java/com/hbm/render/model/ModelM65Blaze.java +++ b/src/main/java/com/hbm/render/model/ModelM65Blaze.java @@ -14,7 +14,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; public class ModelM65Blaze extends ModelBiped { - // fields + public ModelRenderer mask; public ModelRenderer Shape1; public ModelRenderer Shape2; @@ -28,96 +28,94 @@ public class ModelM65Blaze extends ModelBiped { public ModelRenderer Shape10; public ModelM65Blaze() { - textureWidth = 32; - textureHeight = 32; - + this.textureWidth = 32; + this.textureHeight = 32; + float yOffset = 4F; - mask = new ModelRenderer(this, 0, 0); - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 8, 8, 8); - Shape1.setRotationPoint(-4F, -8F + yOffset, -4F); - Shape1.setTextureSize(32, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - convertToChild(mask, Shape1); - Shape2 = new ModelRenderer(this, 0, 16); - Shape2.addBox(0F, 0F, 0F, 3, 3, 1); - Shape2.setRotationPoint(-1.5F, -3.5F + yOffset, -5F); - Shape2.setTextureSize(32, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - convertToChild(mask, Shape2); - Shape3 = new ModelRenderer(this, 0, 20); - Shape3.addBox(0F, -2F, 0F, 2, 2, 1); - Shape3.setRotationPoint(-1F, -3.5F + yOffset, -5F); - Shape3.setTextureSize(32, 32); - Shape3.mirror = true; - setRotation(Shape3, -0.4799655F, 0F, 0F); - convertToChild(mask, Shape3); - Shape4 = new ModelRenderer(this, 8, 16); - Shape4.addBox(0F, 0F, -2F, 3, 2, 2); - Shape4.setRotationPoint(-1.5F, -2F + yOffset, -4F); - Shape4.setTextureSize(32, 32); - Shape4.mirror = true; - setRotation(Shape4, 0.6108652F, 0F, 0F); - convertToChild(mask, Shape4); - Shape5 = new ModelRenderer(this, 0, 23); - Shape5.addBox(0F, 0F, 0F, 3, 3, 0); - Shape5.setRotationPoint(-3.5F, -6F + yOffset, -4.2F); - Shape5.setTextureSize(32, 32); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - convertToChild(mask, Shape5); - Shape6 = new ModelRenderer(this, 0, 26); - Shape6.addBox(0F, 0F, 0F, 3, 3, 0); - Shape6.setRotationPoint(0.5F, -6F + yOffset, -4.2F); - Shape6.setTextureSize(32, 32); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - convertToChild(mask, Shape6); - Shape7 = new ModelRenderer(this, 6, 20); - Shape7.addBox(0F, 0F, 0F, 2, 2, 1); - Shape7.setRotationPoint(-1F, -3.2F + yOffset, -6F); - Shape7.setTextureSize(32, 32); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0F); - convertToChild(mask, Shape7); - Shape8 = new ModelRenderer(this, 6, 23); - Shape8.addBox(0F, 0F, -3F, 2, 2, 1); - Shape8.setRotationPoint(-1F, -2F + yOffset, -4F); - Shape8.setTextureSize(32, 32); - Shape8.mirror = true; - setRotation(Shape8, 0.6108652F, 0F, 0F); - convertToChild(mask, Shape8); - Shape9 = new ModelRenderer(this, 18, 21); - Shape9.addBox(0F, -1F, -5F, 3, 4, 2); - Shape9.setRotationPoint(-1.5F, -2F + yOffset, -4F); - Shape9.setTextureSize(32, 32); - Shape9.mirror = true; - setRotation(Shape9, 0.6108652F, 0F, 0F); - convertToChild(mask, Shape9); - Shape10 = new ModelRenderer(this, 18, 16); - Shape10.addBox(0F, -0.5F, -5F, 4, 3, 2); - Shape10.setRotationPoint(-2F, -2F + yOffset, -4F); - Shape10.setTextureSize(32, 32); - Shape10.mirror = true; - setRotation(Shape10, 0.6108652F, 0F, 0F); - convertToChild(mask, Shape10); + this.mask = new ModelRenderer(this, 0, 0); + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 8, 8, 8); + this.Shape1.setRotationPoint(-4F, -8F + yOffset, -4F); + this.Shape1.setTextureSize(32, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + convertToChild(this.mask, this.Shape1); + this.Shape2 = new ModelRenderer(this, 0, 16); + this.Shape2.addBox(0F, 0F, 0F, 3, 3, 1); + this.Shape2.setRotationPoint(-1.5F, -3.5F + yOffset, -5F); + this.Shape2.setTextureSize(32, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + convertToChild(this.mask, this.Shape2); + this.Shape3 = new ModelRenderer(this, 0, 20); + this.Shape3.addBox(0F, -2F, 0F, 2, 2, 1); + this.Shape3.setRotationPoint(-1F, -3.5F + yOffset, -5F); + this.Shape3.setTextureSize(32, 32); + this.Shape3.mirror = true; + setRotation(this.Shape3, -0.4799655F, 0F, 0F); + convertToChild(this.mask, this.Shape3); + this.Shape4 = new ModelRenderer(this, 8, 16); + this.Shape4.addBox(0F, 0F, -2F, 3, 2, 2); + this.Shape4.setRotationPoint(-1.5F, -2F + yOffset, -4F); + this.Shape4.setTextureSize(32, 32); + this.Shape4.mirror = true; + setRotation(this.Shape4, 0.6108652F, 0F, 0F); + convertToChild(this.mask, this.Shape4); + this.Shape5 = new ModelRenderer(this, 0, 23); + this.Shape5.addBox(0F, 0F, 0F, 3, 3, 0); + this.Shape5.setRotationPoint(-3.5F, -6F + yOffset, -4.2F); + this.Shape5.setTextureSize(32, 32); + this.Shape5.mirror = true; + setRotation(this.Shape5, 0F, 0F, 0F); + convertToChild(this.mask, this.Shape5); + this.Shape6 = new ModelRenderer(this, 0, 26); + this.Shape6.addBox(0F, 0F, 0F, 3, 3, 0); + this.Shape6.setRotationPoint(0.5F, -6F + yOffset, -4.2F); + this.Shape6.setTextureSize(32, 32); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0F, 0F, 0F); + convertToChild(this.mask, this.Shape6); + this.Shape7 = new ModelRenderer(this, 6, 20); + this.Shape7.addBox(0F, 0F, 0F, 2, 2, 1); + this.Shape7.setRotationPoint(-1F, -3.2F + yOffset, -6F); + this.Shape7.setTextureSize(32, 32); + this.Shape7.mirror = true; + setRotation(this.Shape7, 0F, 0F, 0F); + convertToChild(this.mask, this.Shape7); + this.Shape8 = new ModelRenderer(this, 6, 23); + this.Shape8.addBox(0F, 0F, -3F, 2, 2, 1); + this.Shape8.setRotationPoint(-1F, -2F + yOffset, -4F); + this.Shape8.setTextureSize(32, 32); + this.Shape8.mirror = true; + setRotation(this.Shape8, 0.6108652F, 0F, 0F); + convertToChild(this.mask, this.Shape8); + this.Shape9 = new ModelRenderer(this, 18, 21); + this.Shape9.addBox(0F, -1F, -5F, 3, 4, 2); + this.Shape9.setRotationPoint(-1.5F, -2F + yOffset, -4F); + this.Shape9.setTextureSize(32, 32); + this.Shape9.mirror = true; + setRotation(this.Shape9, 0.6108652F, 0F, 0F); + convertToChild(this.mask, this.Shape9); + this.Shape10 = new ModelRenderer(this, 18, 16); + this.Shape10.addBox(0F, -0.5F, -5F, 4, 3, 2); + this.Shape10.setRotationPoint(-2F, -2F + yOffset, -4F); + this.Shape10.setTextureSize(32, 32); + this.Shape10.mirror = true; + setRotation(this.Shape10, 0.6108652F, 0F, 0F); + convertToChild(this.mask, this.Shape10); } @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { + if(entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; - if (player.isSneaking()) { - this.isSneak = true; - } else { - this.isSneak = false; - } + this.isSneak = player.isSneaking(); } - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.mask.rotationPointX = this.bipedHead.rotationPointX; this.mask.rotationPointY = this.bipedHead.rotationPointY; this.mask.rotateAngleY = this.bipedHead.rotateAngleY; @@ -125,34 +123,36 @@ public class ModelM65Blaze extends ModelBiped { } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); GL11.glPushMatrix(); double d = 1D / 16D * 18D; //GL11.glTranslated(0, 1/16D, 0); GL11.glScaled(d, d, d); GL11.glScaled(1.01D, 1.01D, 1.01D); - this.mask.render(par7); + this.mask.render(scaleFactor); GL11.glPopMatrix(); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + protected static void convertToChild(ModelRenderer parent, ModelRenderer child) { + + // move child rotation point to be relative to parent + child.rotationPointX -= parent.rotationPointX; + child.rotationPointY -= parent.rotationPointY; + child.rotationPointZ -= parent.rotationPointZ; + // make rotations relative to parent + child.rotateAngleX -= parent.rotateAngleX; + child.rotateAngleY -= parent.rotateAngleY; + child.rotateAngleZ -= parent.rotateAngleZ; + // create relationship + parent.addChild(child); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) { - // move child rotation point to be relative to parent - parChild.rotationPointX -= parParent.rotationPointX; - parChild.rotationPointY -= parParent.rotationPointY; - parChild.rotationPointZ -= parParent.rotationPointZ; - // make rotations relative to parent - parChild.rotateAngleX -= parParent.rotateAngleX; - parChild.rotateAngleY -= parParent.rotateAngleY; - parChild.rotateAngleZ -= parParent.rotateAngleZ; - // create relationship - parParent.addChild(parChild); - } - } diff --git a/src/main/java/com/hbm/render/model/ModelMan.java b/src/main/java/com/hbm/render/model/ModelMan.java index 51b9826bf..0e0468cc5 100644 --- a/src/main/java/com/hbm/render/model/ModelMan.java +++ b/src/main/java/com/hbm/render/model/ModelMan.java @@ -13,50 +13,51 @@ public class ModelMan extends ModelArmorBase { public ModelMan() { super(0); - head = new ModelRendererObj(ResourceManager.player_manly_af, "Head"); - body = new ModelRendererObj(ResourceManager.player_manly_af, "Body"); - leftArm = new ModelRendererObj(ResourceManager.player_manly_af, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(ResourceManager.player_manly_af, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(ResourceManager.player_manly_af, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(ResourceManager.player_manly_af, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.player_manly_af, "Head"); + this.body = new ModelRendererObj(ResourceManager.player_manly_af, "Body"); + this.leftArm = new ModelRendererObj(ResourceManager.player_manly_af, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(ResourceManager.player_manly_af, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(ResourceManager.player_manly_af, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(ResourceManager.player_manly_af, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); GL11.glPushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); bindTexture(ResourceManager.player_manly_tex); - head.render(0.0625F); - body.render(0.0625F); - leftArm.render(0.0625F); - rightArm.render(0.0625F); - leftLeg.render(0.0625F); - rightLeg.render(0.0625F); + this.head.render(scaleFactor); + this.body.render(scaleFactor); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); GL11.glPopMatrix(); } - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7, RenderPlayer render) { - this.isSneak = par1Entity.isSneaking(); - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); + public void render(Entity par1Entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, RenderPlayer render) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, par1Entity); + + this.head.copyRotationFrom(render.modelBipedMain.bipedHead); + this.body.copyRotationFrom(render.modelBipedMain.bipedBody); + this.leftArm.copyRotationFrom(render.modelBipedMain.bipedLeftArm); + this.rightArm.copyRotationFrom(render.modelBipedMain.bipedRightArm); + this.leftLeg.copyRotationFrom(render.modelBipedMain.bipedLeftLeg); + this.rightLeg.copyRotationFrom(render.modelBipedMain.bipedRightLeg); - head.copyRotationFrom(render.modelBipedMain.bipedHead); - body.copyRotationFrom(render.modelBipedMain.bipedBody); - leftArm.copyRotationFrom(render.modelBipedMain.bipedLeftArm); - rightArm.copyRotationFrom(render.modelBipedMain.bipedRightArm); - leftLeg.copyRotationFrom(render.modelBipedMain.bipedLeftLeg); - rightLeg.copyRotationFrom(render.modelBipedMain.bipedRightLeg); - GL11.glPushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); bindTexture(ResourceManager.player_manly_tex); - head.render(0.0625F); - body.render(0.0625F); - leftArm.render(0.0625F); - rightArm.render(0.0625F); - leftLeg.render(0.0625F); - rightLeg.render(0.0625F); + this.head.render(scaleFactor); + this.body.render(scaleFactor); + this.leftArm.render(scaleFactor); + this.rightArm.render(scaleFactor); + this.leftLeg.render(scaleFactor); + this.rightLeg.render(scaleFactor); GL11.glPopMatrix(); } } diff --git a/src/main/java/com/hbm/render/model/ModelMaskMan.java b/src/main/java/com/hbm/render/model/ModelMaskMan.java index 17a19220a..436deb23c 100644 --- a/src/main/java/com/hbm/render/model/ModelMaskMan.java +++ b/src/main/java/com/hbm/render/model/ModelMaskMan.java @@ -13,60 +13,59 @@ import net.minecraft.util.MathHelper; public class ModelMaskMan extends ModelBase { @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + GL11.glPushMatrix(); - + GL11.glRotatef(180, 1, 0, 0); GL11.glTranslatef(0, -1.5F, 0); GL11.glRotatef(-90, 0, 1, 0); - - EntityMaskMan man = (EntityMaskMan)entity; - + + EntityMaskMan maskManEntity = (EntityMaskMan)entity; + //boolean target = entity.worldObj.getEntityByID(man.getDataWatcher().getWatchableObjectInt(man.dwTargetPlayer)) != null; - + //if(target) // GL11.glRotated(-f3, 0, 1, 0); - - float f7 = man.limbSwing - man.limbSwingAmount * (1.0F - f5); - float f6 = (man.prevLimbSwingAmount + (man.limbSwingAmount - man.prevLimbSwingAmount) * f5) * 0.5F; - + + float f7 = maskManEntity.limbSwing - maskManEntity.limbSwingAmount * (1.0F - scaleFactor); + float f6 = (maskManEntity.prevLimbSwingAmount + (maskManEntity.limbSwingAmount - maskManEntity.prevLimbSwingAmount) * scaleFactor) * 0.5F; + double swing = Math.toDegrees(MathHelper.cos(f7 / 2F + (float)Math.PI) * 1.4F * f6); - + GL11.glRotated(swing * -0.1, 1, 0, 0); - + ResourceManager.maskman.renderPart("Torso"); - + GL11.glPushMatrix(); GL11.glTranslatef(-0.5F, 1.75F, -0.5F); GL11.glRotated(swing, 0, 0, 1); ResourceManager.maskman.renderPart("LLeg"); GL11.glPopMatrix(); - + GL11.glPushMatrix(); GL11.glTranslatef(-0.5F, 1.75F, 0.5F); GL11.glRotated(swing * -1, 0, 0, 1); ResourceManager.maskman.renderPart("RLeg"); GL11.glPopMatrix(); - + GL11.glPushMatrix(); GL11.glTranslatef(-0.5F, 3.75F, -1.5F); GL11.glRotated(swing * 0.25, 0, 0, 1); ResourceManager.maskman.renderPart("LArm"); GL11.glPopMatrix(); - + GL11.glPushMatrix(); GL11.glTranslatef(-0.5F, 3.75F, 1.5F); GL11.glRotated(swing * -0.25, 0, 0, 1); ResourceManager.maskman.renderPart("RArm"); GL11.glPopMatrix(); - + GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 4F, 0); - GL11.glRotated(-f3, 0, 1, 0); - - if(man.getHealth() >= man.getMaxHealth() / 2) { + GL11.glRotated(-netHeadYaw, 0, 1, 0); + + if(maskManEntity.getHealth() >= maskManEntity.getMaxHealth() / 2) { ResourceManager.maskman.renderPart("Head"); } else { ResourceManager.maskman.renderPart("Skull"); @@ -74,7 +73,7 @@ public class ModelMaskMan extends ModelBase { ResourceManager.maskman.renderPart("IOU"); } GL11.glPopMatrix(); - + GL11.glPopMatrix(); } } diff --git a/src/main/java/com/hbm/render/model/ModelMultitoolClaw.java b/src/main/java/com/hbm/render/model/ModelMultitoolClaw.java index 3f3aaef01..fc8dc729c 100644 --- a/src/main/java/com/hbm/render/model/ModelMultitoolClaw.java +++ b/src/main/java/com/hbm/render/model/ModelMultitoolClaw.java @@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelMultitoolClaw extends ModelBase { - // fields + ModelRenderer Base; ModelRenderer BTop; ModelRenderer BBottom; @@ -45,243 +45,237 @@ public class ModelMultitoolClaw extends ModelBase { ModelRenderer WireB; public ModelMultitoolClaw() { - textureWidth = 64; - textureHeight = 64; + this.textureWidth = 64; + this.textureHeight = 64; - Base = new ModelRenderer(this, 0, 0); - Base.addBox(0F, 0F, 0F, 3, 8, 8); - Base.setRotationPoint(-3F, -4F, -4F); - Base.setTextureSize(64, 64); - Base.mirror = true; - setRotation(Base, 0F, 0F, 0F); - BTop = new ModelRenderer(this, 0, 16); - BTop.addBox(0F, 0F, 0F, 4, 2, 8); - BTop.setRotationPoint(-3F, -4F, -4F); - BTop.setTextureSize(64, 64); - BTop.mirror = true; - setRotation(BTop, 0F, 0F, -0.2617994F); - BBottom = new ModelRenderer(this, 0, 26); - BBottom.addBox(0F, -2F, 0F, 4, 2, 8); - BBottom.setRotationPoint(-3F, 4F, -4F); - BBottom.setTextureSize(64, 64); - BBottom.mirror = true; - setRotation(BBottom, 0F, 0F, 0.2617994F); - BLeft = new ModelRenderer(this, 0, 36); - BLeft.addBox(0F, 0F, 0F, 4, 8, 2); - BLeft.setRotationPoint(-3F, -4F, -4F); - BLeft.setTextureSize(64, 64); - BLeft.mirror = true; - setRotation(BLeft, 0F, 0.2617994F, 0F); - BRight = new ModelRenderer(this, 12, 36); - BRight.addBox(0F, 0F, -2F, 4, 8, 2); - BRight.setRotationPoint(-3F, -4F, 4F); - BRight.setTextureSize(64, 64); - BRight.mirror = true; - setRotation(BRight, 0F, -0.2617994F, 0F); - RTop = new ModelRenderer(this, 24, 0); - RTop.addBox(0F, 0F, 0F, 3, 2, 10); - RTop.setRotationPoint(4F, -6F, -6F); - RTop.setTextureSize(64, 64); - RTop.mirror = true; - setRotation(RTop, 0F, 0F, 0F); - RBottom = new ModelRenderer(this, 24, 12); - RBottom.addBox(0F, 0F, 0F, 3, 2, 10); - RBottom.setRotationPoint(4F, 4F, -4F); - RBottom.setTextureSize(64, 64); - RBottom.mirror = true; - setRotation(RBottom, 0F, 0F, 0F); - RLeft = new ModelRenderer(this, 0, 46); - RLeft.addBox(0F, 0F, 0F, 3, 10, 2); - RLeft.setRotationPoint(4F, -4F, -6F); - RLeft.setTextureSize(64, 64); - RLeft.mirror = true; - setRotation(RLeft, 0F, 0F, 0F); - RRight = new ModelRenderer(this, 10, 46); - RRight.addBox(0F, 0F, 0F, 3, 10, 2); - RRight.setRotationPoint(4F, -6F, 4F); - RRight.setTextureSize(64, 64); - RRight.mirror = true; - setRotation(RRight, 0F, 0F, 0F); - GPivot = new ModelRenderer(this, 24, 24); - GPivot.addBox(0F, 0F, 0F, 3, 4, 4); - GPivot.setRotationPoint(-6F, -2F, -2F); - GPivot.setTextureSize(64, 64); - GPivot.mirror = true; - setRotation(GPivot, 0F, 0F, 0F); - GBase = new ModelRenderer(this, 24, 32); - GBase.addBox(-2F, -3F, -4F, 4, 3, 8); - GBase.setRotationPoint(-6F, 0F, 1F); - GBase.setTextureSize(64, 64); - GBase.mirror = true; - setRotation(GBase, 0F, 0F, 1.047198F); - F31 = new ModelRenderer(this, 20, 52); - F31.addBox(-3F, -1F, 0F, 3, 2, 2); - F31.setRotationPoint(-5.5F, -2F, -1F); - F31.setTextureSize(64, 64); - F31.mirror = true; - setRotation(F31, 0F, 0F, 0.6981317F); - F21 = new ModelRenderer(this, 30, 52); - F21.addBox(-3F, -1F, -2F, 3, 2, 2); - F21.setRotationPoint(-5.5F, -2F, -1.2F); - F21.setTextureSize(64, 64); - F21.mirror = true; - setRotation(F21, 0F, 0F, 0.6981317F); - F41 = new ModelRenderer(this, 40, 52); - F41.addBox(-3F, -1F, 0F, 3, 2, 2); - F41.setRotationPoint(-5.5F, -2F, 1.2F); - F41.setTextureSize(64, 64); - F41.mirror = true; - setRotation(F41, 0F, 0F, 0.6981317F); - F51 = new ModelRenderer(this, 50, 52); - F51.addBox(-3F, -1F, 0F, 3, 2, 2); - F51.setRotationPoint(-5.5F, -2F, 3.4F); - F51.setTextureSize(64, 64); - F51.mirror = true; - setRotation(F51, 0F, 0F, 0.6981317F); - F11 = new ModelRenderer(this, 48, 38); - F11.addBox(0F, -1F, -3F, 2, 2, 3); - F11.setRotationPoint(-5.5F, -2F, -3F); - F11.setTextureSize(64, 64); - F11.mirror = true; - setRotation(F11, 0F, 0F, 1.047198F); - F22 = new ModelRenderer(this, 20, 56); - F22.addBox(-3F, -1F, -1F, 3, 2, 2); - F22.setRotationPoint(-7.6F, -3.7F, -2.2F); - F22.setTextureSize(64, 64); - F22.mirror = true; - setRotation(F22, 0F, 0F, 0.3490659F); - F32 = new ModelRenderer(this, 30, 56); - F32.addBox(-3F, -1F, -1F, 3, 2, 2); - F32.setRotationPoint(-7.6F, -3.7F, 0F); - F32.setTextureSize(64, 64); - F32.mirror = true; - setRotation(F32, 0F, 0F, 0.3490659F); - F42 = new ModelRenderer(this, 40, 56); - F42.addBox(-3F, -1F, -1F, 3, 2, 2); - F42.setRotationPoint(-7.6F, -3.7F, 2.2F); - F42.setTextureSize(64, 64); - F42.mirror = true; - setRotation(F42, 0F, 0F, 0.3490659F); - F52 = new ModelRenderer(this, 50, 56); - F52.addBox(-3F, -1F, -1F, 3, 2, 2); - F52.setRotationPoint(-7.6F, -3.7F, 4.4F); - F52.setTextureSize(64, 64); - F52.mirror = true; - setRotation(F52, 0F, 0F, 0.3490659F); - F12 = new ModelRenderer(this, 48, 34); - F12.addBox(-1F, -1F, -2F, 2, 2, 2); - F12.setRotationPoint(-5F, -1F, -5.8F); - F12.setTextureSize(64, 64); - F12.mirror = true; - setRotation(F12, 0F, 0.7853982F, 1.047198F); - F23 = new ModelRenderer(this, 20, 60); - F23.addBox(-3F, -1F, -1F, 3, 2, 2); - F23.setRotationPoint(-10F, -4.6F, -2.2F); - F23.setTextureSize(64, 64); - F23.mirror = true; - setRotation(F23, 0F, 0F, -0.1745329F); - F33 = new ModelRenderer(this, 30, 60); - F33.addBox(-3F, -1F, -1F, 3, 2, 2); - F33.setRotationPoint(-10F, -4.6F, 0F); - F33.setTextureSize(64, 64); - F33.mirror = true; - setRotation(F33, 0F, 0F, -0.1745329F); - F43 = new ModelRenderer(this, 40, 60); - F43.addBox(-3F, -1F, -1F, 3, 2, 2); - F43.setRotationPoint(-10F, -4.6F, 2.2F); - F43.setTextureSize(64, 64); - F43.mirror = true; - setRotation(F43, 0F, 0F, -0.1745329F); - F53 = new ModelRenderer(this, 50, 60); - F53.addBox(-3F, -1F, -1F, 3, 2, 2); - F53.setRotationPoint(-10F, -4.6F, 4.4F); - F53.setTextureSize(64, 64); - F53.mirror = true; - setRotation(F53, 0F, 0F, -0.1745329F); - F13 = new ModelRenderer(this, 48, 30); - F13.addBox(-1F, -1F, -2F, 2, 2, 2); - F13.setRotationPoint(-5.5F, -1F, -7.2F); - F13.setTextureSize(64, 64); - F13.mirror = true; - setRotation(F13, 0.6981317F, 1.047198F, 1.047198F); - WireL = new ModelRenderer(this, 38, 30); - WireL.addBox(0F, 0F, 0F, 4, 1, 1); - WireL.setRotationPoint(0F, -5.5F, 0F); - WireL.setTextureSize(64, 64); - WireL.mirror = true; - setRotation(WireL, 0F, 0F, 0F); - WireR = new ModelRenderer(this, 38, 28); - WireR.addBox(0F, 0F, 0F, 4, 1, 1); - WireR.setRotationPoint(0F, -5.5F, 2F); - WireR.setTextureSize(64, 64); - WireR.mirror = true; - setRotation(WireR, 0F, 0F, 0F); - Gauge1 = new ModelRenderer(this, 20, 47); - Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4); - Gauge1.setRotationPoint(-1F, -4F, 4F); - Gauge1.setTextureSize(64, 64); - Gauge1.mirror = true; - setRotation(Gauge1, -0.7853982F, 0F, 0F); - Gauge2 = new ModelRenderer(this, 34, 48); - Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3); - Gauge2.setRotationPoint(-1F, -4F, 4F); - Gauge2.setTextureSize(64, 64); - Gauge2.mirror = true; - setRotation(Gauge2, -0.7853982F, 0F, 0F); - WireB = new ModelRenderer(this, 48, 49); - WireB.addBox(0F, 0F, 0F, 4, 2, 1); - WireB.setRotationPoint(0F, -1F, -5.5F); - WireB.setTextureSize(64, 64); - WireB.mirror = true; - setRotation(WireB, 0F, 0F, 0F); + this.Base = new ModelRenderer(this, 0, 0); + this.Base.addBox(0F, 0F, 0F, 3, 8, 8); + this.Base.setRotationPoint(-3F, -4F, -4F); + this.Base.setTextureSize(64, 64); + this.Base.mirror = true; + setRotation(this.Base, 0F, 0F, 0F); + this.BTop = new ModelRenderer(this, 0, 16); + this.BTop.addBox(0F, 0F, 0F, 4, 2, 8); + this.BTop.setRotationPoint(-3F, -4F, -4F); + this.BTop.setTextureSize(64, 64); + this.BTop.mirror = true; + setRotation(this.BTop, 0F, 0F, -0.2617994F); + this.BBottom = new ModelRenderer(this, 0, 26); + this.BBottom.addBox(0F, -2F, 0F, 4, 2, 8); + this.BBottom.setRotationPoint(-3F, 4F, -4F); + this.BBottom.setTextureSize(64, 64); + this.BBottom.mirror = true; + setRotation(this.BBottom, 0F, 0F, 0.2617994F); + this.BLeft = new ModelRenderer(this, 0, 36); + this.BLeft.addBox(0F, 0F, 0F, 4, 8, 2); + this.BLeft.setRotationPoint(-3F, -4F, -4F); + this.BLeft.setTextureSize(64, 64); + this.BLeft.mirror = true; + setRotation(this.BLeft, 0F, 0.2617994F, 0F); + this.BRight = new ModelRenderer(this, 12, 36); + this.BRight.addBox(0F, 0F, -2F, 4, 8, 2); + this.BRight.setRotationPoint(-3F, -4F, 4F); + this.BRight.setTextureSize(64, 64); + this.BRight.mirror = true; + setRotation(this.BRight, 0F, -0.2617994F, 0F); + this.RTop = new ModelRenderer(this, 24, 0); + this.RTop.addBox(0F, 0F, 0F, 3, 2, 10); + this.RTop.setRotationPoint(4F, -6F, -6F); + this.RTop.setTextureSize(64, 64); + this.RTop.mirror = true; + setRotation(this.RTop, 0F, 0F, 0F); + this.RBottom = new ModelRenderer(this, 24, 12); + this.RBottom.addBox(0F, 0F, 0F, 3, 2, 10); + this.RBottom.setRotationPoint(4F, 4F, -4F); + this.RBottom.setTextureSize(64, 64); + this.RBottom.mirror = true; + setRotation(this.RBottom, 0F, 0F, 0F); + this.RLeft = new ModelRenderer(this, 0, 46); + this.RLeft.addBox(0F, 0F, 0F, 3, 10, 2); + this.RLeft.setRotationPoint(4F, -4F, -6F); + this.RLeft.setTextureSize(64, 64); + this.RLeft.mirror = true; + setRotation(this.RLeft, 0F, 0F, 0F); + this.RRight = new ModelRenderer(this, 10, 46); + this.RRight.addBox(0F, 0F, 0F, 3, 10, 2); + this.RRight.setRotationPoint(4F, -6F, 4F); + this.RRight.setTextureSize(64, 64); + this.RRight.mirror = true; + setRotation(this.RRight, 0F, 0F, 0F); + this.GPivot = new ModelRenderer(this, 24, 24); + this.GPivot.addBox(0F, 0F, 0F, 3, 4, 4); + this.GPivot.setRotationPoint(-6F, -2F, -2F); + this.GPivot.setTextureSize(64, 64); + this.GPivot.mirror = true; + setRotation(this.GPivot, 0F, 0F, 0F); + this.GBase = new ModelRenderer(this, 24, 32); + this.GBase.addBox(-2F, -3F, -4F, 4, 3, 8); + this.GBase.setRotationPoint(-6F, 0F, 1F); + this.GBase.setTextureSize(64, 64); + this.GBase.mirror = true; + setRotation(this.GBase, 0F, 0F, 1.047198F); + this.F31 = new ModelRenderer(this, 20, 52); + this.F31.addBox(-3F, -1F, 0F, 3, 2, 2); + this.F31.setRotationPoint(-5.5F, -2F, -1F); + this.F31.setTextureSize(64, 64); + this.F31.mirror = true; + setRotation(this.F31, 0F, 0F, 0.6981317F); + this.F21 = new ModelRenderer(this, 30, 52); + this.F21.addBox(-3F, -1F, -2F, 3, 2, 2); + this.F21.setRotationPoint(-5.5F, -2F, -1.2F); + this.F21.setTextureSize(64, 64); + this.F21.mirror = true; + setRotation(this.F21, 0F, 0F, 0.6981317F); + this.F41 = new ModelRenderer(this, 40, 52); + this.F41.addBox(-3F, -1F, 0F, 3, 2, 2); + this.F41.setRotationPoint(-5.5F, -2F, 1.2F); + this.F41.setTextureSize(64, 64); + this.F41.mirror = true; + setRotation(this.F41, 0F, 0F, 0.6981317F); + this.F51 = new ModelRenderer(this, 50, 52); + this.F51.addBox(-3F, -1F, 0F, 3, 2, 2); + this.F51.setRotationPoint(-5.5F, -2F, 3.4F); + this.F51.setTextureSize(64, 64); + this.F51.mirror = true; + setRotation(this.F51, 0F, 0F, 0.6981317F); + this.F11 = new ModelRenderer(this, 48, 38); + this.F11.addBox(0F, -1F, -3F, 2, 2, 3); + this.F11.setRotationPoint(-5.5F, -2F, -3F); + this.F11.setTextureSize(64, 64); + this.F11.mirror = true; + setRotation(this.F11, 0F, 0F, 1.047198F); + this.F22 = new ModelRenderer(this, 20, 56); + this.F22.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F22.setRotationPoint(-7.6F, -3.7F, -2.2F); + this.F22.setTextureSize(64, 64); + this.F22.mirror = true; + setRotation(this.F22, 0F, 0F, 0.3490659F); + this.F32 = new ModelRenderer(this, 30, 56); + this.F32.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F32.setRotationPoint(-7.6F, -3.7F, 0F); + this.F32.setTextureSize(64, 64); + this.F32.mirror = true; + setRotation(this.F32, 0F, 0F, 0.3490659F); + this.F42 = new ModelRenderer(this, 40, 56); + this.F42.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F42.setRotationPoint(-7.6F, -3.7F, 2.2F); + this.F42.setTextureSize(64, 64); + this.F42.mirror = true; + setRotation(this.F42, 0F, 0F, 0.3490659F); + this.F52 = new ModelRenderer(this, 50, 56); + this.F52.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F52.setRotationPoint(-7.6F, -3.7F, 4.4F); + this.F52.setTextureSize(64, 64); + this.F52.mirror = true; + setRotation(this.F52, 0F, 0F, 0.3490659F); + this.F12 = new ModelRenderer(this, 48, 34); + this.F12.addBox(-1F, -1F, -2F, 2, 2, 2); + this.F12.setRotationPoint(-5F, -1F, -5.8F); + this.F12.setTextureSize(64, 64); + this.F12.mirror = true; + setRotation(this.F12, 0F, 0.7853982F, 1.047198F); + this.F23 = new ModelRenderer(this, 20, 60); + this.F23.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F23.setRotationPoint(-10F, -4.6F, -2.2F); + this.F23.setTextureSize(64, 64); + this.F23.mirror = true; + setRotation(this.F23, 0F, 0F, -0.1745329F); + this.F33 = new ModelRenderer(this, 30, 60); + this.F33.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F33.setRotationPoint(-10F, -4.6F, 0F); + this.F33.setTextureSize(64, 64); + this.F33.mirror = true; + setRotation(this.F33, 0F, 0F, -0.1745329F); + this.F43 = new ModelRenderer(this, 40, 60); + this.F43.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F43.setRotationPoint(-10F, -4.6F, 2.2F); + this.F43.setTextureSize(64, 64); + this.F43.mirror = true; + setRotation(this.F43, 0F, 0F, -0.1745329F); + this.F53 = new ModelRenderer(this, 50, 60); + this.F53.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F53.setRotationPoint(-10F, -4.6F, 4.4F); + this.F53.setTextureSize(64, 64); + this.F53.mirror = true; + setRotation(this.F53, 0F, 0F, -0.1745329F); + this.F13 = new ModelRenderer(this, 48, 30); + this.F13.addBox(-1F, -1F, -2F, 2, 2, 2); + this.F13.setRotationPoint(-5.5F, -1F, -7.2F); + this.F13.setTextureSize(64, 64); + this.F13.mirror = true; + setRotation(this.F13, 0.6981317F, 1.047198F, 1.047198F); + this.WireL = new ModelRenderer(this, 38, 30); + this.WireL.addBox(0F, 0F, 0F, 4, 1, 1); + this.WireL.setRotationPoint(0F, -5.5F, 0F); + this.WireL.setTextureSize(64, 64); + this.WireL.mirror = true; + setRotation(this.WireL, 0F, 0F, 0F); + this.WireR = new ModelRenderer(this, 38, 28); + this.WireR.addBox(0F, 0F, 0F, 4, 1, 1); + this.WireR.setRotationPoint(0F, -5.5F, 2F); + this.WireR.setTextureSize(64, 64); + this.WireR.mirror = true; + setRotation(this.WireR, 0F, 0F, 0F); + this.Gauge1 = new ModelRenderer(this, 20, 47); + this.Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4); + this.Gauge1.setRotationPoint(-1F, -4F, 4F); + this.Gauge1.setTextureSize(64, 64); + this.Gauge1.mirror = true; + setRotation(this.Gauge1, -0.7853982F, 0F, 0F); + this.Gauge2 = new ModelRenderer(this, 34, 48); + this.Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3); + this.Gauge2.setRotationPoint(-1F, -4F, 4F); + this.Gauge2.setTextureSize(64, 64); + this.Gauge2.mirror = true; + setRotation(this.Gauge2, -0.7853982F, 0F, 0F); + this.WireB = new ModelRenderer(this, 48, 49); + this.WireB.addBox(0F, 0F, 0F, 4, 2, 1); + this.WireB.setRotationPoint(0F, -1F, -5.5F); + this.WireB.setTextureSize(64, 64); + this.WireB.mirror = true; + setRotation(this.WireB, 0F, 0F, 0F); } @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Base.render(f5); - BTop.render(f5); - BBottom.render(f5); - BLeft.render(f5); - BRight.render(f5); - RTop.render(f5); - RBottom.render(f5); - RLeft.render(f5); - RRight.render(f5); - GPivot.render(f5); - GBase.render(f5); - F31.render(f5); - F21.render(f5); - F41.render(f5); - F51.render(f5); - F11.render(f5); - F22.render(f5); - F32.render(f5); - F42.render(f5); - F52.render(f5); - F12.render(f5); - F23.render(f5); - F33.render(f5); - F43.render(f5); - F53.render(f5); - F13.render(f5); - WireL.render(f5); - WireR.render(f5); - Gauge1.render(f5); - Gauge2.render(f5); - WireB.render(f5); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.Base.render(scaleFactor); + this.BTop.render(scaleFactor); + this.BBottom.render(scaleFactor); + this.BLeft.render(scaleFactor); + this.BRight.render(scaleFactor); + this.RTop.render(scaleFactor); + this.RBottom.render(scaleFactor); + this.RLeft.render(scaleFactor); + this.RRight.render(scaleFactor); + this.GPivot.render(scaleFactor); + this.GBase.render(scaleFactor); + this.F31.render(scaleFactor); + this.F21.render(scaleFactor); + this.F41.render(scaleFactor); + this.F51.render(scaleFactor); + this.F11.render(scaleFactor); + this.F22.render(scaleFactor); + this.F32.render(scaleFactor); + this.F42.render(scaleFactor); + this.F52.render(scaleFactor); + this.F12.render(scaleFactor); + this.F23.render(scaleFactor); + this.F33.render(scaleFactor); + this.F43.render(scaleFactor); + this.F53.render(scaleFactor); + this.F13.render(scaleFactor); + this.WireL.render(scaleFactor); + this.WireR.render(scaleFactor); + this.Gauge1.render(scaleFactor); + this.Gauge2.render(scaleFactor); + this.WireB.render(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - } diff --git a/src/main/java/com/hbm/render/model/ModelMultitoolFist.java b/src/main/java/com/hbm/render/model/ModelMultitoolFist.java index 62410e8a3..6905ef126 100644 --- a/src/main/java/com/hbm/render/model/ModelMultitoolFist.java +++ b/src/main/java/com/hbm/render/model/ModelMultitoolFist.java @@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelMultitoolFist extends ModelBase { - // fields + ModelRenderer Base; ModelRenderer BTop; ModelRenderer BBottom; @@ -45,243 +45,236 @@ public class ModelMultitoolFist extends ModelBase { ModelRenderer WireB; public ModelMultitoolFist() { - textureWidth = 64; - textureHeight = 64; + this.textureWidth = 64; + this.textureHeight = 64; - Base = new ModelRenderer(this, 0, 0); - Base.addBox(0F, 0F, 0F, 3, 8, 8); - Base.setRotationPoint(-3F, -4F, -4F); - Base.setTextureSize(64, 64); - Base.mirror = true; - setRotation(Base, 0F, 0F, 0F); - BTop = new ModelRenderer(this, 0, 16); - BTop.addBox(0F, 0F, 0F, 4, 2, 8); - BTop.setRotationPoint(-3F, -4F, -4F); - BTop.setTextureSize(64, 64); - BTop.mirror = true; - setRotation(BTop, 0F, 0F, -0.2617994F); - BBottom = new ModelRenderer(this, 0, 26); - BBottom.addBox(0F, -2F, 0F, 4, 2, 8); - BBottom.setRotationPoint(-3F, 4F, -4F); - BBottom.setTextureSize(64, 64); - BBottom.mirror = true; - setRotation(BBottom, 0F, 0F, 0.2617994F); - BLeft = new ModelRenderer(this, 0, 36); - BLeft.addBox(0F, 0F, 0F, 4, 8, 2); - BLeft.setRotationPoint(-3F, -4F, -4F); - BLeft.setTextureSize(64, 64); - BLeft.mirror = true; - setRotation(BLeft, 0F, 0.2617994F, 0F); - BRight = new ModelRenderer(this, 12, 36); - BRight.addBox(0F, 0F, -2F, 4, 8, 2); - BRight.setRotationPoint(-3F, -4F, 4F); - BRight.setTextureSize(64, 64); - BRight.mirror = true; - setRotation(BRight, 0F, -0.2617994F, 0F); - RTop = new ModelRenderer(this, 24, 0); - RTop.addBox(0F, 0F, 0F, 3, 2, 10); - RTop.setRotationPoint(4F, -6F, -6F); - RTop.setTextureSize(64, 64); - RTop.mirror = true; - setRotation(RTop, 0F, 0F, 0F); - RBottom = new ModelRenderer(this, 24, 12); - RBottom.addBox(0F, 0F, 0F, 3, 2, 10); - RBottom.setRotationPoint(4F, 4F, -4F); - RBottom.setTextureSize(64, 64); - RBottom.mirror = true; - setRotation(RBottom, 0F, 0F, 0F); - RLeft = new ModelRenderer(this, 0, 46); - RLeft.addBox(0F, 0F, 0F, 3, 10, 2); - RLeft.setRotationPoint(4F, -4F, -6F); - RLeft.setTextureSize(64, 64); - RLeft.mirror = true; - setRotation(RLeft, 0F, 0F, 0F); - RRight = new ModelRenderer(this, 10, 46); - RRight.addBox(0F, 0F, 0F, 3, 10, 2); - RRight.setRotationPoint(4F, -6F, 4F); - RRight.setTextureSize(64, 64); - RRight.mirror = true; - setRotation(RRight, 0F, 0F, 0F); - GPivot = new ModelRenderer(this, 24, 24); - GPivot.addBox(0F, 0F, 0F, 3, 4, 4); - GPivot.setRotationPoint(-6F, -2F, -2F); - GPivot.setTextureSize(64, 64); - GPivot.mirror = true; - setRotation(GPivot, 0F, 0F, 0F); - GBase = new ModelRenderer(this, 24, 32); - GBase.addBox(-2F, -3F, -4F, 4, 3, 8); - GBase.setRotationPoint(-6F, 0F, 1F); - GBase.setTextureSize(64, 64); - GBase.mirror = true; - setRotation(GBase, 0F, 0F, 0.6108652F); - F31 = new ModelRenderer(this, 20, 52); - F31.addBox(-3F, -1F, 0F, 3, 2, 2); - F31.setRotationPoint(-6F, -2.8F, -1F); - F31.setTextureSize(64, 64); - F31.mirror = true; - setRotation(F31, 0F, 0F, -0.5235988F); - F21 = new ModelRenderer(this, 30, 52); - F21.addBox(-3F, -1F, -2F, 3, 2, 2); - F21.setRotationPoint(-6F, -2.8F, -1.2F); - F21.setTextureSize(64, 64); - F21.mirror = true; - setRotation(F21, 0F, 0F, -0.5235988F); - F41 = new ModelRenderer(this, 40, 52); - F41.addBox(-3F, -1F, 0F, 3, 2, 2); - F41.setRotationPoint(-6F, -2.8F, 1.2F); - F41.setTextureSize(64, 64); - F41.mirror = true; - setRotation(F41, 0F, 0F, -0.5235988F); - F51 = new ModelRenderer(this, 50, 52); - F51.addBox(-3F, -1F, 0F, 3, 2, 2); - F51.setRotationPoint(-6F, -2.8F, 3.4F); - F51.setTextureSize(64, 64); - F51.mirror = true; - setRotation(F51, 0F, 0F, -0.5235988F); - F11 = new ModelRenderer(this, 48, 38); - F11.addBox(-1F, -1F, -3F, 2, 2, 3); - F11.setRotationPoint(-5F, -1F, -2.5F); - F11.setTextureSize(64, 64); - F11.mirror = true; - setRotation(F11, 1.22173F, 1.745329F, -1.047198F); - F22 = new ModelRenderer(this, 20, 56); - F22.addBox(-3F, -1F, -1F, 3, 2, 2); - F22.setRotationPoint(-8.5F, -2F, -2.2F); - F22.setTextureSize(64, 64); - F22.mirror = true; - setRotation(F22, 0F, 0F, -1.919862F); - F32 = new ModelRenderer(this, 30, 56); - F32.addBox(-3F, -1F, -1F, 3, 2, 2); - F32.setRotationPoint(-8.5F, -2F, 0F); - F32.setTextureSize(64, 64); - F32.mirror = true; - setRotation(F32, 0F, 0F, -1.919862F); - F42 = new ModelRenderer(this, 40, 56); - F42.addBox(-3F, -1F, -1F, 3, 2, 2); - F42.setRotationPoint(-8.5F, -2F, 2.2F); - F42.setTextureSize(64, 64); - F42.mirror = true; - setRotation(F42, 0F, 0F, -1.919862F); - F52 = new ModelRenderer(this, 50, 56); - F52.addBox(-3F, -1F, -1F, 3, 2, 2); - F52.setRotationPoint(-8.5F, -2F, 4.4F); - F52.setTextureSize(64, 64); - F52.mirror = true; - setRotation(F52, 0F, 0F, -1.919862F); - F12 = new ModelRenderer(this, 48, 34); - F12.addBox(-1F, -1F, -2F, 2, 2, 2); - F12.setRotationPoint(-6F, 0.5F, -4.5F); - F12.setTextureSize(64, 64); - F12.mirror = true; - setRotation(F12, 1.22173F, 2.935045F, -1.047198F); - F23 = new ModelRenderer(this, 20, 60); - F23.addBox(-3F, -1F, -1F, 3, 2, 2); - F23.setRotationPoint(-8F, 0.5F, -2.2F); - F23.setTextureSize(64, 64); - F23.mirror = true; - setRotation(F23, 0F, 0F, -2.879793F); - F33 = new ModelRenderer(this, 30, 60); - F33.addBox(-3F, -1F, -1F, 3, 2, 2); - F33.setRotationPoint(-8F, 0.5F, 0F); - F33.setTextureSize(64, 64); - F33.mirror = true; - setRotation(F33, 0F, 0F, -2.879793F); - F43 = new ModelRenderer(this, 40, 60); - F43.addBox(-3F, -1F, -1F, 3, 2, 2); - F43.setRotationPoint(-8F, 0.5F, 2.2F); - F43.setTextureSize(64, 64); - F43.mirror = true; - setRotation(F43, 0F, 0F, -2.879793F); - F53 = new ModelRenderer(this, 50, 60); - F53.addBox(-3F, -1F, -1F, 3, 2, 2); - F53.setRotationPoint(-8F, 0.5F, 4.4F); - F53.setTextureSize(64, 64); - F53.mirror = true; - setRotation(F53, 0F, 0F, -2.879793F); - F13 = new ModelRenderer(this, 48, 30); - F13.addBox(-1F, -1F, -2F, 2, 2, 2); - F13.setRotationPoint(-7F, 1F, -4F); - F13.setTextureSize(64, 64); - F13.mirror = true; - setRotation(F13, 0.5235988F, 2.617994F, -1.047198F); - WireL = new ModelRenderer(this, 38, 30); - WireL.addBox(0F, 0F, 0F, 4, 1, 1); - WireL.setRotationPoint(0F, -5.5F, 0F); - WireL.setTextureSize(64, 64); - WireL.mirror = true; - setRotation(WireL, 0F, 0F, 0F); - WireR = new ModelRenderer(this, 38, 28); - WireR.addBox(0F, 0F, 0F, 4, 1, 1); - WireR.setRotationPoint(0F, -5.5F, 2F); - WireR.setTextureSize(64, 64); - WireR.mirror = true; - setRotation(WireR, 0F, 0F, 0F); - Gauge1 = new ModelRenderer(this, 20, 47); - Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4); - Gauge1.setRotationPoint(-1F, -4F, 4F); - Gauge1.setTextureSize(64, 64); - Gauge1.mirror = true; - setRotation(Gauge1, -0.7853982F, 0F, 0F); - Gauge2 = new ModelRenderer(this, 34, 48); - Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3); - Gauge2.setRotationPoint(-1F, -4F, 4F); - Gauge2.setTextureSize(64, 64); - Gauge2.mirror = true; - setRotation(Gauge2, -0.7853982F, 0F, 0F); - WireB = new ModelRenderer(this, 48, 49); - WireB.addBox(0F, 0F, 0F, 4, 2, 1); - WireB.setRotationPoint(0F, -1F, -5.5F); - WireB.setTextureSize(64, 64); - WireB.mirror = true; - setRotation(WireB, 0F, 0F, 0F); + this.Base = new ModelRenderer(this, 0, 0); + this.Base.addBox(0F, 0F, 0F, 3, 8, 8); + this.Base.setRotationPoint(-3F, -4F, -4F); + this.Base.setTextureSize(64, 64); + this.Base.mirror = true; + setRotation(this.Base, 0F, 0F, 0F); + this.BTop = new ModelRenderer(this, 0, 16); + this.BTop.addBox(0F, 0F, 0F, 4, 2, 8); + this.BTop.setRotationPoint(-3F, -4F, -4F); + this.BTop.setTextureSize(64, 64); + this.BTop.mirror = true; + setRotation(this.BTop, 0F, 0F, -0.2617994F); + this.BBottom = new ModelRenderer(this, 0, 26); + this.BBottom.addBox(0F, -2F, 0F, 4, 2, 8); + this.BBottom.setRotationPoint(-3F, 4F, -4F); + this.BBottom.setTextureSize(64, 64); + this.BBottom.mirror = true; + setRotation(this.BBottom, 0F, 0F, 0.2617994F); + this.BLeft = new ModelRenderer(this, 0, 36); + this.BLeft.addBox(0F, 0F, 0F, 4, 8, 2); + this.BLeft.setRotationPoint(-3F, -4F, -4F); + this.BLeft.setTextureSize(64, 64); + this.BLeft.mirror = true; + setRotation(this.BLeft, 0F, 0.2617994F, 0F); + this.BRight = new ModelRenderer(this, 12, 36); + this.BRight.addBox(0F, 0F, -2F, 4, 8, 2); + this.BRight.setRotationPoint(-3F, -4F, 4F); + this.BRight.setTextureSize(64, 64); + this.BRight.mirror = true; + setRotation(this.BRight, 0F, -0.2617994F, 0F); + this.RTop = new ModelRenderer(this, 24, 0); + this.RTop.addBox(0F, 0F, 0F, 3, 2, 10); + this.RTop.setRotationPoint(4F, -6F, -6F); + this.RTop.setTextureSize(64, 64); + this.RTop.mirror = true; + setRotation(this.RTop, 0F, 0F, 0F); + this.RBottom = new ModelRenderer(this, 24, 12); + this.RBottom.addBox(0F, 0F, 0F, 3, 2, 10); + this.RBottom.setRotationPoint(4F, 4F, -4F); + this.RBottom.setTextureSize(64, 64); + this.RBottom.mirror = true; + setRotation(this.RBottom, 0F, 0F, 0F); + this.RLeft = new ModelRenderer(this, 0, 46); + this.RLeft.addBox(0F, 0F, 0F, 3, 10, 2); + this.RLeft.setRotationPoint(4F, -4F, -6F); + this.RLeft.setTextureSize(64, 64); + this.RLeft.mirror = true; + setRotation(this.RLeft, 0F, 0F, 0F); + this.RRight = new ModelRenderer(this, 10, 46); + this.RRight.addBox(0F, 0F, 0F, 3, 10, 2); + this.RRight.setRotationPoint(4F, -6F, 4F); + this.RRight.setTextureSize(64, 64); + this.RRight.mirror = true; + setRotation(this.RRight, 0F, 0F, 0F); + this.GPivot = new ModelRenderer(this, 24, 24); + this.GPivot.addBox(0F, 0F, 0F, 3, 4, 4); + this.GPivot.setRotationPoint(-6F, -2F, -2F); + this.GPivot.setTextureSize(64, 64); + this.GPivot.mirror = true; + setRotation(this.GPivot, 0F, 0F, 0F); + this.GBase = new ModelRenderer(this, 24, 32); + this.GBase.addBox(-2F, -3F, -4F, 4, 3, 8); + this.GBase.setRotationPoint(-6F, 0F, 1F); + this.GBase.setTextureSize(64, 64); + this.GBase.mirror = true; + setRotation(this.GBase, 0F, 0F, 0.6108652F); + this.F31 = new ModelRenderer(this, 20, 52); + this.F31.addBox(-3F, -1F, 0F, 3, 2, 2); + this.F31.setRotationPoint(-6F, -2.8F, -1F); + this.F31.setTextureSize(64, 64); + this.F31.mirror = true; + setRotation(this.F31, 0F, 0F, -0.5235988F); + this.F21 = new ModelRenderer(this, 30, 52); + this.F21.addBox(-3F, -1F, -2F, 3, 2, 2); + this.F21.setRotationPoint(-6F, -2.8F, -1.2F); + this.F21.setTextureSize(64, 64); + this.F21.mirror = true; + setRotation(this.F21, 0F, 0F, -0.5235988F); + this.F41 = new ModelRenderer(this, 40, 52); + this.F41.addBox(-3F, -1F, 0F, 3, 2, 2); + this.F41.setRotationPoint(-6F, -2.8F, 1.2F); + this.F41.setTextureSize(64, 64); + this.F41.mirror = true; + setRotation(this.F41, 0F, 0F, -0.5235988F); + this.F51 = new ModelRenderer(this, 50, 52); + this.F51.addBox(-3F, -1F, 0F, 3, 2, 2); + this.F51.setRotationPoint(-6F, -2.8F, 3.4F); + this.F51.setTextureSize(64, 64); + this.F51.mirror = true; + setRotation(this.F51, 0F, 0F, -0.5235988F); + this.F11 = new ModelRenderer(this, 48, 38); + this.F11.addBox(-1F, -1F, -3F, 2, 2, 3); + this.F11.setRotationPoint(-5F, -1F, -2.5F); + this.F11.setTextureSize(64, 64); + this.F11.mirror = true; + setRotation(this.F11, 1.22173F, 1.745329F, -1.047198F); + this.F22 = new ModelRenderer(this, 20, 56); + this.F22.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F22.setRotationPoint(-8.5F, -2F, -2.2F); + this.F22.setTextureSize(64, 64); + this.F22.mirror = true; + setRotation(this.F22, 0F, 0F, -1.919862F); + this.F32 = new ModelRenderer(this, 30, 56); + this.F32.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F32.setRotationPoint(-8.5F, -2F, 0F); + this.F32.setTextureSize(64, 64); + this.F32.mirror = true; + setRotation(this.F32, 0F, 0F, -1.919862F); + this.F42 = new ModelRenderer(this, 40, 56); + this.F42.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F42.setRotationPoint(-8.5F, -2F, 2.2F); + this.F42.setTextureSize(64, 64); + this.F42.mirror = true; + setRotation(this.F42, 0F, 0F, -1.919862F); + this.F52 = new ModelRenderer(this, 50, 56); + this.F52.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F52.setRotationPoint(-8.5F, -2F, 4.4F); + this.F52.setTextureSize(64, 64); + this.F52.mirror = true; + setRotation(this.F52, 0F, 0F, -1.919862F); + this.F12 = new ModelRenderer(this, 48, 34); + this.F12.addBox(-1F, -1F, -2F, 2, 2, 2); + this.F12.setRotationPoint(-6F, 0.5F, -4.5F); + this.F12.setTextureSize(64, 64); + this.F12.mirror = true; + setRotation(this.F12, 1.22173F, 2.935045F, -1.047198F); + this.F23 = new ModelRenderer(this, 20, 60); + this.F23.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F23.setRotationPoint(-8F, 0.5F, -2.2F); + this.F23.setTextureSize(64, 64); + this.F23.mirror = true; + setRotation(this.F23, 0F, 0F, -2.879793F); + this.F33 = new ModelRenderer(this, 30, 60); + this.F33.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F33.setRotationPoint(-8F, 0.5F, 0F); + this.F33.setTextureSize(64, 64); + this.F33.mirror = true; + setRotation(this.F33, 0F, 0F, -2.879793F); + this.F43 = new ModelRenderer(this, 40, 60); + this.F43.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F43.setRotationPoint(-8F, 0.5F, 2.2F); + this.F43.setTextureSize(64, 64); + this.F43.mirror = true; + setRotation(this.F43, 0F, 0F, -2.879793F); + this.F53 = new ModelRenderer(this, 50, 60); + this.F53.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F53.setRotationPoint(-8F, 0.5F, 4.4F); + this.F53.setTextureSize(64, 64); + this.F53.mirror = true; + setRotation(this.F53, 0F, 0F, -2.879793F); + this.F13 = new ModelRenderer(this, 48, 30); + this.F13.addBox(-1F, -1F, -2F, 2, 2, 2); + this.F13.setRotationPoint(-7F, 1F, -4F); + this.F13.setTextureSize(64, 64); + this.F13.mirror = true; + setRotation(this.F13, 0.5235988F, 2.617994F, -1.047198F); + this.WireL = new ModelRenderer(this, 38, 30); + this.WireL.addBox(0F, 0F, 0F, 4, 1, 1); + this.WireL.setRotationPoint(0F, -5.5F, 0F); + this.WireL.setTextureSize(64, 64); + this.WireL.mirror = true; + setRotation(this.WireL, 0F, 0F, 0F); + this.WireR = new ModelRenderer(this, 38, 28); + this.WireR.addBox(0F, 0F, 0F, 4, 1, 1); + this.WireR.setRotationPoint(0F, -5.5F, 2F); + this.WireR.setTextureSize(64, 64); + this.WireR.mirror = true; + setRotation(this.WireR, 0F, 0F, 0F); + this.Gauge1 = new ModelRenderer(this, 20, 47); + this.Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4); + this.Gauge1.setRotationPoint(-1F, -4F, 4F); + this.Gauge1.setTextureSize(64, 64); + this.Gauge1.mirror = true; + setRotation(this.Gauge1, -0.7853982F, 0F, 0F); + this.Gauge2 = new ModelRenderer(this, 34, 48); + this.Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3); + this.Gauge2.setRotationPoint(-1F, -4F, 4F); + this.Gauge2.setTextureSize(64, 64); + this.Gauge2.mirror = true; + setRotation(this.Gauge2, -0.7853982F, 0F, 0F); + this.WireB = new ModelRenderer(this, 48, 49); + this.WireB.addBox(0F, 0F, 0F, 4, 2, 1); + this.WireB.setRotationPoint(0F, -1F, -5.5F); + this.WireB.setTextureSize(64, 64); + this.WireB.mirror = true; + setRotation(this.WireB, 0F, 0F, 0F); } @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Base.render(f5); - BTop.render(f5); - BBottom.render(f5); - BLeft.render(f5); - BRight.render(f5); - RTop.render(f5); - RBottom.render(f5); - RLeft.render(f5); - RRight.render(f5); - GPivot.render(f5); - GBase.render(f5); - F31.render(f5); - F21.render(f5); - F41.render(f5); - F51.render(f5); - F11.render(f5); - F22.render(f5); - F32.render(f5); - F42.render(f5); - F52.render(f5); - F12.render(f5); - F23.render(f5); - F33.render(f5); - F43.render(f5); - F53.render(f5); - F13.render(f5); - WireL.render(f5); - WireR.render(f5); - Gauge1.render(f5); - Gauge2.render(f5); - WireB.render(f5); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.Base.render(scaleFactor); + this.BTop.render(scaleFactor); + this.BBottom.render(scaleFactor); + this.BLeft.render(scaleFactor); + this.BRight.render(scaleFactor); + this.RTop.render(scaleFactor); + this.RBottom.render(scaleFactor); + this.RLeft.render(scaleFactor); + this.RRight.render(scaleFactor); + this.GPivot.render(scaleFactor); + this.GBase.render(scaleFactor); + this.F31.render(scaleFactor); + this.F21.render(scaleFactor); + this.F41.render(scaleFactor); + this.F51.render(scaleFactor); + this.F11.render(scaleFactor); + this.F22.render(scaleFactor); + this.F32.render(scaleFactor); + this.F42.render(scaleFactor); + this.F52.render(scaleFactor); + this.F12.render(scaleFactor); + this.F23.render(scaleFactor); + this.F33.render(scaleFactor); + this.F43.render(scaleFactor); + this.F53.render(scaleFactor); + this.F13.render(scaleFactor); + this.WireL.render(scaleFactor); + this.WireR.render(scaleFactor); + this.Gauge1.render(scaleFactor); + this.Gauge2.render(scaleFactor); + this.WireB.render(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + private static void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - } diff --git a/src/main/java/com/hbm/render/model/ModelMultitoolOpen.java b/src/main/java/com/hbm/render/model/ModelMultitoolOpen.java index a5a61728c..66f50e8c5 100644 --- a/src/main/java/com/hbm/render/model/ModelMultitoolOpen.java +++ b/src/main/java/com/hbm/render/model/ModelMultitoolOpen.java @@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelMultitoolOpen extends ModelBase { - // fields + ModelRenderer Base; ModelRenderer BTop; ModelRenderer BBottom; @@ -45,243 +45,237 @@ public class ModelMultitoolOpen extends ModelBase { ModelRenderer WireB; public ModelMultitoolOpen() { - textureWidth = 64; - textureHeight = 64; + this.textureWidth = 64; + this.textureHeight = 64; - Base = new ModelRenderer(this, 0, 0); - Base.addBox(0F, 0F, 0F, 3, 8, 8); - Base.setRotationPoint(-3F, -4F, -4F); - Base.setTextureSize(64, 64); - Base.mirror = true; - setRotation(Base, 0F, 0F, 0F); - BTop = new ModelRenderer(this, 0, 16); - BTop.addBox(0F, 0F, 0F, 4, 2, 8); - BTop.setRotationPoint(-3F, -4F, -4F); - BTop.setTextureSize(64, 64); - BTop.mirror = true; - setRotation(BTop, 0F, 0F, -0.2617994F); - BBottom = new ModelRenderer(this, 0, 26); - BBottom.addBox(0F, -2F, 0F, 4, 2, 8); - BBottom.setRotationPoint(-3F, 4F, -4F); - BBottom.setTextureSize(64, 64); - BBottom.mirror = true; - setRotation(BBottom, 0F, 0F, 0.2617994F); - BLeft = new ModelRenderer(this, 0, 36); - BLeft.addBox(0F, 0F, 0F, 4, 8, 2); - BLeft.setRotationPoint(-3F, -4F, -4F); - BLeft.setTextureSize(64, 64); - BLeft.mirror = true; - setRotation(BLeft, 0F, 0.2617994F, 0F); - BRight = new ModelRenderer(this, 12, 36); - BRight.addBox(0F, 0F, -2F, 4, 8, 2); - BRight.setRotationPoint(-3F, -4F, 4F); - BRight.setTextureSize(64, 64); - BRight.mirror = true; - setRotation(BRight, 0F, -0.2617994F, 0F); - RTop = new ModelRenderer(this, 24, 0); - RTop.addBox(0F, 0F, 0F, 3, 2, 10); - RTop.setRotationPoint(4F, -6F, -6F); - RTop.setTextureSize(64, 64); - RTop.mirror = true; - setRotation(RTop, 0F, 0F, 0F); - RBottom = new ModelRenderer(this, 24, 12); - RBottom.addBox(0F, 0F, 0F, 3, 2, 10); - RBottom.setRotationPoint(4F, 4F, -4F); - RBottom.setTextureSize(64, 64); - RBottom.mirror = true; - setRotation(RBottom, 0F, 0F, 0F); - RLeft = new ModelRenderer(this, 0, 46); - RLeft.addBox(0F, 0F, 0F, 3, 10, 2); - RLeft.setRotationPoint(4F, -4F, -6F); - RLeft.setTextureSize(64, 64); - RLeft.mirror = true; - setRotation(RLeft, 0F, 0F, 0F); - RRight = new ModelRenderer(this, 10, 46); - RRight.addBox(0F, 0F, 0F, 3, 10, 2); - RRight.setRotationPoint(4F, -6F, 4F); - RRight.setTextureSize(64, 64); - RRight.mirror = true; - setRotation(RRight, 0F, 0F, 0F); - GPivot = new ModelRenderer(this, 24, 24); - GPivot.addBox(0F, 0F, 0F, 3, 4, 4); - GPivot.setRotationPoint(-6F, -2F, -2F); - GPivot.setTextureSize(64, 64); - GPivot.mirror = true; - setRotation(GPivot, 0F, 0F, 0F); - GBase = new ModelRenderer(this, 24, 32); - GBase.addBox(-2F, -3F, -4F, 4, 3, 8); - GBase.setRotationPoint(-6F, 0F, 1F); - GBase.setTextureSize(64, 64); - GBase.mirror = true; - setRotation(GBase, 0F, 0F, 1.047198F); - F31 = new ModelRenderer(this, 20, 52); - F31.addBox(-3F, -1F, 0F, 3, 2, 2); - F31.setRotationPoint(-5.5F, -2F, -1F); - F31.setTextureSize(64, 64); - F31.mirror = true; - setRotation(F31, 0F, 0F, 1.48353F); - F21 = new ModelRenderer(this, 30, 52); - F21.addBox(-3F, -1F, -2F, 3, 2, 2); - F21.setRotationPoint(-5.5F, -2F, -1.2F); - F21.setTextureSize(64, 64); - F21.mirror = true; - setRotation(F21, 0F, 0F, 1.48353F); - F41 = new ModelRenderer(this, 40, 52); - F41.addBox(-3F, -1F, 0F, 3, 2, 2); - F41.setRotationPoint(-5.5F, -2F, 1.2F); - F41.setTextureSize(64, 64); - F41.mirror = true; - setRotation(F41, 0F, 0F, 1.48353F); - F51 = new ModelRenderer(this, 50, 52); - F51.addBox(-3F, -1F, 0F, 3, 2, 2); - F51.setRotationPoint(-5.5F, -2F, 3.4F); - F51.setTextureSize(64, 64); - F51.mirror = true; - setRotation(F51, 0F, 0F, 1.48353F); - F11 = new ModelRenderer(this, 48, 38); - F11.addBox(0F, -1F, -3F, 2, 2, 3); - F11.setRotationPoint(-5.5F, -2F, -3F); - F11.setTextureSize(64, 64); - F11.mirror = true; - setRotation(F11, 0F, 0F, 1.047198F); - F22 = new ModelRenderer(this, 20, 56); - F22.addBox(-3F, -1F, -1F, 3, 2, 2); - F22.setRotationPoint(-5.6F, -4.5F, -2.2F); - F22.setTextureSize(64, 64); - F22.mirror = true; - setRotation(F22, 0F, 0F, 1.134464F); - F32 = new ModelRenderer(this, 30, 56); - F32.addBox(-3F, -1F, -1F, 3, 2, 2); - F32.setRotationPoint(-5.6F, -4.5F, 0F); - F32.setTextureSize(64, 64); - F32.mirror = true; - setRotation(F32, 0F, 0F, 1.134464F); - F42 = new ModelRenderer(this, 40, 56); - F42.addBox(-3F, -1F, -1F, 3, 2, 2); - F42.setRotationPoint(-5.6F, -4.5F, 2.2F); - F42.setTextureSize(64, 64); - F42.mirror = true; - setRotation(F42, 0F, 0F, 1.134464F); - F52 = new ModelRenderer(this, 50, 56); - F52.addBox(-3F, -1F, -1F, 3, 2, 2); - F52.setRotationPoint(-5.6F, -4.5F, 4.4F); - F52.setTextureSize(64, 64); - F52.mirror = true; - setRotation(F52, 0F, 0F, 1.134464F); - F12 = new ModelRenderer(this, 48, 34); - F12.addBox(-1F, -1F, -2F, 2, 2, 2); - F12.setRotationPoint(-5F, -1F, -5.8F); - F12.setTextureSize(64, 64); - F12.mirror = true; - setRotation(F12, 0F, 0.3490659F, 1.047198F); - F23 = new ModelRenderer(this, 20, 60); - F23.addBox(-3F, -1F, -1F, 3, 2, 2); - F23.setRotationPoint(-6.6F, -6.8F, -2.2F); - F23.setTextureSize(64, 64); - F23.mirror = true; - setRotation(F23, 0F, 0F, 0.5235988F); - F33 = new ModelRenderer(this, 30, 60); - F33.addBox(-3F, -1F, -1F, 3, 2, 2); - F33.setRotationPoint(-6.6F, -6.8F, 0F); - F33.setTextureSize(64, 64); - F33.mirror = true; - setRotation(F33, 0F, 0F, 0.5235988F); - F43 = new ModelRenderer(this, 40, 60); - F43.addBox(-3F, -1F, -1F, 3, 2, 2); - F43.setRotationPoint(-6.6F, -6.8F, 2.2F); - F43.setTextureSize(64, 64); - F43.mirror = true; - setRotation(F43, 0F, 0F, 0.5235988F); - F53 = new ModelRenderer(this, 50, 60); - F53.addBox(-3F, -1F, -1F, 3, 2, 2); - F53.setRotationPoint(-6.6F, -6.8F, 4.4F); - F53.setTextureSize(64, 64); - F53.mirror = true; - setRotation(F53, 0F, 0F, 0.5235988F); - F13 = new ModelRenderer(this, 48, 30); - F13.addBox(-1F, -1F, -2F, 2, 2, 2); - F13.setRotationPoint(-5.5F, -1F, -7.2F); - F13.setTextureSize(64, 64); - F13.mirror = true; - setRotation(F13, 0F, 1.047198F, 1.047198F); - WireL = new ModelRenderer(this, 38, 30); - WireL.addBox(0F, 0F, 0F, 4, 1, 1); - WireL.setRotationPoint(0F, -5.5F, 0F); - WireL.setTextureSize(64, 64); - WireL.mirror = true; - setRotation(WireL, 0F, 0F, 0F); - WireR = new ModelRenderer(this, 38, 28); - WireR.addBox(0F, 0F, 0F, 4, 1, 1); - WireR.setRotationPoint(0F, -5.5F, 2F); - WireR.setTextureSize(64, 64); - WireR.mirror = true; - setRotation(WireR, 0F, 0F, 0F); - Gauge1 = new ModelRenderer(this, 20, 47); - Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4); - Gauge1.setRotationPoint(-1F, -4F, 4F); - Gauge1.setTextureSize(64, 64); - Gauge1.mirror = true; - setRotation(Gauge1, -0.7853982F, 0F, 0F); - Gauge2 = new ModelRenderer(this, 34, 48); - Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3); - Gauge2.setRotationPoint(-1F, -4F, 4F); - Gauge2.setTextureSize(64, 64); - Gauge2.mirror = true; - setRotation(Gauge2, -0.7853982F, 0F, 0F); - WireB = new ModelRenderer(this, 48, 49); - WireB.addBox(0F, 0F, 0F, 4, 2, 1); - WireB.setRotationPoint(0F, -1F, -5.5F); - WireB.setTextureSize(64, 64); - WireB.mirror = true; - setRotation(WireB, 0F, 0F, 0F); + this.Base = new ModelRenderer(this, 0, 0); + this.Base.addBox(0F, 0F, 0F, 3, 8, 8); + this.Base.setRotationPoint(-3F, -4F, -4F); + this.Base.setTextureSize(64, 64); + this.Base.mirror = true; + setRotation(this.Base, 0F, 0F, 0F); + this.BTop = new ModelRenderer(this, 0, 16); + this.BTop.addBox(0F, 0F, 0F, 4, 2, 8); + this.BTop.setRotationPoint(-3F, -4F, -4F); + this.BTop.setTextureSize(64, 64); + this.BTop.mirror = true; + setRotation(this.BTop, 0F, 0F, -0.2617994F); + this.BBottom = new ModelRenderer(this, 0, 26); + this.BBottom.addBox(0F, -2F, 0F, 4, 2, 8); + this.BBottom.setRotationPoint(-3F, 4F, -4F); + this.BBottom.setTextureSize(64, 64); + this.BBottom.mirror = true; + setRotation(this.BBottom, 0F, 0F, 0.2617994F); + this.BLeft = new ModelRenderer(this, 0, 36); + this.BLeft.addBox(0F, 0F, 0F, 4, 8, 2); + this.BLeft.setRotationPoint(-3F, -4F, -4F); + this.BLeft.setTextureSize(64, 64); + this.BLeft.mirror = true; + setRotation(this.BLeft, 0F, 0.2617994F, 0F); + this.BRight = new ModelRenderer(this, 12, 36); + this.BRight.addBox(0F, 0F, -2F, 4, 8, 2); + this.BRight.setRotationPoint(-3F, -4F, 4F); + this.BRight.setTextureSize(64, 64); + this.BRight.mirror = true; + setRotation(this.BRight, 0F, -0.2617994F, 0F); + this.RTop = new ModelRenderer(this, 24, 0); + this.RTop.addBox(0F, 0F, 0F, 3, 2, 10); + this.RTop.setRotationPoint(4F, -6F, -6F); + this.RTop.setTextureSize(64, 64); + this.RTop.mirror = true; + setRotation(this.RTop, 0F, 0F, 0F); + this.RBottom = new ModelRenderer(this, 24, 12); + this.RBottom.addBox(0F, 0F, 0F, 3, 2, 10); + this.RBottom.setRotationPoint(4F, 4F, -4F); + this.RBottom.setTextureSize(64, 64); + this.RBottom.mirror = true; + setRotation(this.RBottom, 0F, 0F, 0F); + this.RLeft = new ModelRenderer(this, 0, 46); + this.RLeft.addBox(0F, 0F, 0F, 3, 10, 2); + this.RLeft.setRotationPoint(4F, -4F, -6F); + this.RLeft.setTextureSize(64, 64); + this.RLeft.mirror = true; + setRotation(this.RLeft, 0F, 0F, 0F); + this.RRight = new ModelRenderer(this, 10, 46); + this.RRight.addBox(0F, 0F, 0F, 3, 10, 2); + this.RRight.setRotationPoint(4F, -6F, 4F); + this.RRight.setTextureSize(64, 64); + this.RRight.mirror = true; + setRotation(this.RRight, 0F, 0F, 0F); + this.GPivot = new ModelRenderer(this, 24, 24); + this.GPivot.addBox(0F, 0F, 0F, 3, 4, 4); + this.GPivot.setRotationPoint(-6F, -2F, -2F); + this.GPivot.setTextureSize(64, 64); + this.GPivot.mirror = true; + setRotation(this.GPivot, 0F, 0F, 0F); + this.GBase = new ModelRenderer(this, 24, 32); + this.GBase.addBox(-2F, -3F, -4F, 4, 3, 8); + this.GBase.setRotationPoint(-6F, 0F, 1F); + this.GBase.setTextureSize(64, 64); + this.GBase.mirror = true; + setRotation(this.GBase, 0F, 0F, 1.047198F); + this.F31 = new ModelRenderer(this, 20, 52); + this.F31.addBox(-3F, -1F, 0F, 3, 2, 2); + this.F31.setRotationPoint(-5.5F, -2F, -1F); + this.F31.setTextureSize(64, 64); + this.F31.mirror = true; + setRotation(this.F31, 0F, 0F, 1.48353F); + this.F21 = new ModelRenderer(this, 30, 52); + this.F21.addBox(-3F, -1F, -2F, 3, 2, 2); + this.F21.setRotationPoint(-5.5F, -2F, -1.2F); + this.F21.setTextureSize(64, 64); + this.F21.mirror = true; + setRotation(this.F21, 0F, 0F, 1.48353F); + this.F41 = new ModelRenderer(this, 40, 52); + this.F41.addBox(-3F, -1F, 0F, 3, 2, 2); + this.F41.setRotationPoint(-5.5F, -2F, 1.2F); + this.F41.setTextureSize(64, 64); + this.F41.mirror = true; + setRotation(this.F41, 0F, 0F, 1.48353F); + this.F51 = new ModelRenderer(this, 50, 52); + this.F51.addBox(-3F, -1F, 0F, 3, 2, 2); + this.F51.setRotationPoint(-5.5F, -2F, 3.4F); + this.F51.setTextureSize(64, 64); + this.F51.mirror = true; + setRotation(this.F51, 0F, 0F, 1.48353F); + this.F11 = new ModelRenderer(this, 48, 38); + this.F11.addBox(0F, -1F, -3F, 2, 2, 3); + this.F11.setRotationPoint(-5.5F, -2F, -3F); + this.F11.setTextureSize(64, 64); + this.F11.mirror = true; + setRotation(this.F11, 0F, 0F, 1.047198F); + this.F22 = new ModelRenderer(this, 20, 56); + this.F22.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F22.setRotationPoint(-5.6F, -4.5F, -2.2F); + this.F22.setTextureSize(64, 64); + this.F22.mirror = true; + setRotation(this.F22, 0F, 0F, 1.134464F); + this.F32 = new ModelRenderer(this, 30, 56); + this.F32.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F32.setRotationPoint(-5.6F, -4.5F, 0F); + this.F32.setTextureSize(64, 64); + this.F32.mirror = true; + setRotation(this.F32, 0F, 0F, 1.134464F); + this.F42 = new ModelRenderer(this, 40, 56); + this.F42.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F42.setRotationPoint(-5.6F, -4.5F, 2.2F); + this.F42.setTextureSize(64, 64); + this.F42.mirror = true; + setRotation(this.F42, 0F, 0F, 1.134464F); + this.F52 = new ModelRenderer(this, 50, 56); + this.F52.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F52.setRotationPoint(-5.6F, -4.5F, 4.4F); + this.F52.setTextureSize(64, 64); + this.F52.mirror = true; + setRotation(this.F52, 0F, 0F, 1.134464F); + this.F12 = new ModelRenderer(this, 48, 34); + this.F12.addBox(-1F, -1F, -2F, 2, 2, 2); + this.F12.setRotationPoint(-5F, -1F, -5.8F); + this.F12.setTextureSize(64, 64); + this.F12.mirror = true; + setRotation(this.F12, 0F, 0.3490659F, 1.047198F); + this.F23 = new ModelRenderer(this, 20, 60); + this.F23.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F23.setRotationPoint(-6.6F, -6.8F, -2.2F); + this.F23.setTextureSize(64, 64); + this.F23.mirror = true; + setRotation(this.F23, 0F, 0F, 0.5235988F); + this.F33 = new ModelRenderer(this, 30, 60); + this.F33.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F33.setRotationPoint(-6.6F, -6.8F, 0F); + this.F33.setTextureSize(64, 64); + this.F33.mirror = true; + setRotation(this.F33, 0F, 0F, 0.5235988F); + this.F43 = new ModelRenderer(this, 40, 60); + this.F43.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F43.setRotationPoint(-6.6F, -6.8F, 2.2F); + this.F43.setTextureSize(64, 64); + this.F43.mirror = true; + setRotation(this.F43, 0F, 0F, 0.5235988F); + this.F53 = new ModelRenderer(this, 50, 60); + this.F53.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F53.setRotationPoint(-6.6F, -6.8F, 4.4F); + this.F53.setTextureSize(64, 64); + this.F53.mirror = true; + setRotation(this.F53, 0F, 0F, 0.5235988F); + this.F13 = new ModelRenderer(this, 48, 30); + this.F13.addBox(-1F, -1F, -2F, 2, 2, 2); + this.F13.setRotationPoint(-5.5F, -1F, -7.2F); + this.F13.setTextureSize(64, 64); + this.F13.mirror = true; + setRotation(this.F13, 0F, 1.047198F, 1.047198F); + this.WireL = new ModelRenderer(this, 38, 30); + this.WireL.addBox(0F, 0F, 0F, 4, 1, 1); + this.WireL.setRotationPoint(0F, -5.5F, 0F); + this.WireL.setTextureSize(64, 64); + this.WireL.mirror = true; + setRotation(this.WireL, 0F, 0F, 0F); + this.WireR = new ModelRenderer(this, 38, 28); + this.WireR.addBox(0F, 0F, 0F, 4, 1, 1); + this.WireR.setRotationPoint(0F, -5.5F, 2F); + this.WireR.setTextureSize(64, 64); + this.WireR.mirror = true; + setRotation(this.WireR, 0F, 0F, 0F); + this.Gauge1 = new ModelRenderer(this, 20, 47); + this.Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4); + this.Gauge1.setRotationPoint(-1F, -4F, 4F); + this.Gauge1.setTextureSize(64, 64); + this.Gauge1.mirror = true; + setRotation(this.Gauge1, -0.7853982F, 0F, 0F); + this.Gauge2 = new ModelRenderer(this, 34, 48); + this.Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3); + this.Gauge2.setRotationPoint(-1F, -4F, 4F); + this.Gauge2.setTextureSize(64, 64); + this.Gauge2.mirror = true; + setRotation(this.Gauge2, -0.7853982F, 0F, 0F); + this.WireB = new ModelRenderer(this, 48, 49); + this.WireB.addBox(0F, 0F, 0F, 4, 2, 1); + this.WireB.setRotationPoint(0F, -1F, -5.5F); + this.WireB.setTextureSize(64, 64); + this.WireB.mirror = true; + setRotation(this.WireB, 0F, 0F, 0F); } @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Base.render(f5); - BTop.render(f5); - BBottom.render(f5); - BLeft.render(f5); - BRight.render(f5); - RTop.render(f5); - RBottom.render(f5); - RLeft.render(f5); - RRight.render(f5); - GPivot.render(f5); - GBase.render(f5); - F31.render(f5); - F21.render(f5); - F41.render(f5); - F51.render(f5); - F11.render(f5); - F22.render(f5); - F32.render(f5); - F42.render(f5); - F52.render(f5); - F12.render(f5); - F23.render(f5); - F33.render(f5); - F43.render(f5); - F53.render(f5); - F13.render(f5); - WireL.render(f5); - WireR.render(f5); - Gauge1.render(f5); - Gauge2.render(f5); - WireB.render(f5); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.Base.render(scaleFactor); + this.BTop.render(scaleFactor); + this.BBottom.render(scaleFactor); + this.BLeft.render(scaleFactor); + this.BRight.render(scaleFactor); + this.RTop.render(scaleFactor); + this.RBottom.render(scaleFactor); + this.RLeft.render(scaleFactor); + this.RRight.render(scaleFactor); + this.GPivot.render(scaleFactor); + this.GBase.render(scaleFactor); + this.F31.render(scaleFactor); + this.F21.render(scaleFactor); + this.F41.render(scaleFactor); + this.F51.render(scaleFactor); + this.F11.render(scaleFactor); + this.F22.render(scaleFactor); + this.F32.render(scaleFactor); + this.F42.render(scaleFactor); + this.F52.render(scaleFactor); + this.F12.render(scaleFactor); + this.F23.render(scaleFactor); + this.F33.render(scaleFactor); + this.F43.render(scaleFactor); + this.F53.render(scaleFactor); + this.F13.render(scaleFactor); + this.WireL.render(scaleFactor); + this.WireR.render(scaleFactor); + this.Gauge1.render(scaleFactor); + this.Gauge2.render(scaleFactor); + this.WireB.render(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - } diff --git a/src/main/java/com/hbm/render/model/ModelMultitoolPointer.java b/src/main/java/com/hbm/render/model/ModelMultitoolPointer.java index 309cb9187..6f6bc313a 100644 --- a/src/main/java/com/hbm/render/model/ModelMultitoolPointer.java +++ b/src/main/java/com/hbm/render/model/ModelMultitoolPointer.java @@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelMultitoolPointer extends ModelBase { - // fields + ModelRenderer Base; ModelRenderer BTop; ModelRenderer BBottom; @@ -45,243 +45,237 @@ public class ModelMultitoolPointer extends ModelBase { ModelRenderer WireB; public ModelMultitoolPointer() { - textureWidth = 64; - textureHeight = 64; + this.textureWidth = 64; + this.textureHeight = 64; - Base = new ModelRenderer(this, 0, 0); - Base.addBox(0F, 0F, 0F, 3, 8, 8); - Base.setRotationPoint(-3F, -4F, -4F); - Base.setTextureSize(64, 64); - Base.mirror = true; - setRotation(Base, 0F, 0F, 0F); - BTop = new ModelRenderer(this, 0, 16); - BTop.addBox(0F, 0F, 0F, 4, 2, 8); - BTop.setRotationPoint(-3F, -4F, -4F); - BTop.setTextureSize(64, 64); - BTop.mirror = true; - setRotation(BTop, 0F, 0F, -0.2617994F); - BBottom = new ModelRenderer(this, 0, 26); - BBottom.addBox(0F, -2F, 0F, 4, 2, 8); - BBottom.setRotationPoint(-3F, 4F, -4F); - BBottom.setTextureSize(64, 64); - BBottom.mirror = true; - setRotation(BBottom, 0F, 0F, 0.2617994F); - BLeft = new ModelRenderer(this, 0, 36); - BLeft.addBox(0F, 0F, 0F, 4, 8, 2); - BLeft.setRotationPoint(-3F, -4F, -4F); - BLeft.setTextureSize(64, 64); - BLeft.mirror = true; - setRotation(BLeft, 0F, 0.2617994F, 0F); - BRight = new ModelRenderer(this, 12, 36); - BRight.addBox(0F, 0F, -2F, 4, 8, 2); - BRight.setRotationPoint(-3F, -4F, 4F); - BRight.setTextureSize(64, 64); - BRight.mirror = true; - setRotation(BRight, 0F, -0.2617994F, 0F); - RTop = new ModelRenderer(this, 24, 0); - RTop.addBox(0F, 0F, 0F, 3, 2, 10); - RTop.setRotationPoint(4F, -6F, -6F); - RTop.setTextureSize(64, 64); - RTop.mirror = true; - setRotation(RTop, 0F, 0F, 0F); - RBottom = new ModelRenderer(this, 24, 12); - RBottom.addBox(0F, 0F, 0F, 3, 2, 10); - RBottom.setRotationPoint(4F, 4F, -4F); - RBottom.setTextureSize(64, 64); - RBottom.mirror = true; - setRotation(RBottom, 0F, 0F, 0F); - RLeft = new ModelRenderer(this, 0, 46); - RLeft.addBox(0F, 0F, 0F, 3, 10, 2); - RLeft.setRotationPoint(4F, -4F, -6F); - RLeft.setTextureSize(64, 64); - RLeft.mirror = true; - setRotation(RLeft, 0F, 0F, 0F); - RRight = new ModelRenderer(this, 10, 46); - RRight.addBox(0F, 0F, 0F, 3, 10, 2); - RRight.setRotationPoint(4F, -6F, 4F); - RRight.setTextureSize(64, 64); - RRight.mirror = true; - setRotation(RRight, 0F, 0F, 0F); - GPivot = new ModelRenderer(this, 24, 24); - GPivot.addBox(0F, 0F, 0F, 3, 4, 4); - GPivot.setRotationPoint(-6F, -2F, -2F); - GPivot.setTextureSize(64, 64); - GPivot.mirror = true; - setRotation(GPivot, 0F, 0F, 0F); - GBase = new ModelRenderer(this, 24, 32); - GBase.addBox(-2F, -3F, -4F, 4, 3, 8); - GBase.setRotationPoint(-6F, 0F, 1F); - GBase.setTextureSize(64, 64); - GBase.mirror = true; - setRotation(GBase, 0F, 0F, 0.6108652F); - F31 = new ModelRenderer(this, 20, 52); - F31.addBox(-3F, -1F, 0F, 3, 2, 2); - F31.setRotationPoint(-6F, -2.8F, -1F); - F31.setTextureSize(64, 64); - F31.mirror = true; - setRotation(F31, 0F, 0F, -0.5235988F); - F21 = new ModelRenderer(this, 30, 52); - F21.addBox(-3F, -1F, -2F, 3, 2, 2); - F21.setRotationPoint(-6F, -2.8F, -1.2F); - F21.setTextureSize(64, 64); - F21.mirror = true; - setRotation(F21, 0F, 0F, 0F); - F41 = new ModelRenderer(this, 40, 52); - F41.addBox(-3F, -1F, 0F, 3, 2, 2); - F41.setRotationPoint(-6F, -2.8F, 1.2F); - F41.setTextureSize(64, 64); - F41.mirror = true; - setRotation(F41, 0F, 0F, -0.5235988F); - F51 = new ModelRenderer(this, 50, 52); - F51.addBox(-3F, -1F, 0F, 3, 2, 2); - F51.setRotationPoint(-6F, -2.8F, 3.4F); - F51.setTextureSize(64, 64); - F51.mirror = true; - setRotation(F51, 0F, 0F, -0.5235988F); - F11 = new ModelRenderer(this, 48, 38); - F11.addBox(-1F, -1F, -3F, 2, 2, 3); - F11.setRotationPoint(-5F, -1F, -2.5F); - F11.setTextureSize(64, 64); - F11.mirror = true; - setRotation(F11, 1.22173F, 1.745329F, -1.047198F); - F22 = new ModelRenderer(this, 20, 56); - F22.addBox(-3F, -1F, -1F, 3, 2, 2); - F22.setRotationPoint(-8.5F, -3F, -2.2F); - F22.setTextureSize(64, 64); - F22.mirror = true; - setRotation(F22, 0F, 0F, 0F); - F32 = new ModelRenderer(this, 30, 56); - F32.addBox(-3F, -1F, -1F, 3, 2, 2); - F32.setRotationPoint(-8.5F, -2F, 0F); - F32.setTextureSize(64, 64); - F32.mirror = true; - setRotation(F32, 0F, 0F, -1.919862F); - F42 = new ModelRenderer(this, 40, 56); - F42.addBox(-3F, -1F, -1F, 3, 2, 2); - F42.setRotationPoint(-8.5F, -2F, 2.2F); - F42.setTextureSize(64, 64); - F42.mirror = true; - setRotation(F42, 0F, 0F, -1.919862F); - F52 = new ModelRenderer(this, 50, 56); - F52.addBox(-3F, -1F, -1F, 3, 2, 2); - F52.setRotationPoint(-8.5F, -2F, 4.4F); - F52.setTextureSize(64, 64); - F52.mirror = true; - setRotation(F52, 0F, 0F, -1.919862F); - F12 = new ModelRenderer(this, 48, 34); - F12.addBox(-1F, -1F, -2F, 2, 2, 2); - F12.setRotationPoint(-6F, 0.5F, -4.5F); - F12.setTextureSize(64, 64); - F12.mirror = true; - setRotation(F12, 1.22173F, 2.935045F, -1.047198F); - F23 = new ModelRenderer(this, 20, 60); - F23.addBox(-3F, -1F, -1F, 3, 2, 2); - F23.setRotationPoint(-11F, -2.8F, -2.2F); - F23.setTextureSize(64, 64); - F23.mirror = true; - setRotation(F23, 0F, 0F, 0F); - F33 = new ModelRenderer(this, 30, 60); - F33.addBox(-3F, -1F, -1F, 3, 2, 2); - F33.setRotationPoint(-8F, 0.5F, 0F); - F33.setTextureSize(64, 64); - F33.mirror = true; - setRotation(F33, 0F, 0F, -2.879793F); - F43 = new ModelRenderer(this, 40, 60); - F43.addBox(-3F, -1F, -1F, 3, 2, 2); - F43.setRotationPoint(-8F, 0.5F, 2.2F); - F43.setTextureSize(64, 64); - F43.mirror = true; - setRotation(F43, 0F, 0F, -2.879793F); - F53 = new ModelRenderer(this, 50, 60); - F53.addBox(-3F, -1F, -1F, 3, 2, 2); - F53.setRotationPoint(-8F, 0.5F, 4.4F); - F53.setTextureSize(64, 64); - F53.mirror = true; - setRotation(F53, 0F, 0F, -2.879793F); - F13 = new ModelRenderer(this, 48, 30); - F13.addBox(-1F, -1F, -2F, 2, 2, 2); - F13.setRotationPoint(-7F, 1F, -4F); - F13.setTextureSize(64, 64); - F13.mirror = true; - setRotation(F13, 0.5235988F, 2.617994F, -1.047198F); - WireL = new ModelRenderer(this, 38, 30); - WireL.addBox(0F, 0F, 0F, 4, 1, 1); - WireL.setRotationPoint(0F, -5.5F, 0F); - WireL.setTextureSize(64, 64); - WireL.mirror = true; - setRotation(WireL, 0F, 0F, 0F); - WireR = new ModelRenderer(this, 38, 28); - WireR.addBox(0F, 0F, 0F, 4, 1, 1); - WireR.setRotationPoint(0F, -5.5F, 2F); - WireR.setTextureSize(64, 64); - WireR.mirror = true; - setRotation(WireR, 0F, 0F, 0F); - Gauge1 = new ModelRenderer(this, 20, 47); - Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4); - Gauge1.setRotationPoint(-1F, -4F, 4F); - Gauge1.setTextureSize(64, 64); - Gauge1.mirror = true; - setRotation(Gauge1, -0.7853982F, 0F, 0F); - Gauge2 = new ModelRenderer(this, 34, 48); - Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3); - Gauge2.setRotationPoint(-1F, -4F, 4F); - Gauge2.setTextureSize(64, 64); - Gauge2.mirror = true; - setRotation(Gauge2, -0.7853982F, 0F, 0F); - WireB = new ModelRenderer(this, 48, 49); - WireB.addBox(0F, 0F, 0F, 4, 2, 1); - WireB.setRotationPoint(0F, -1F, -5.5F); - WireB.setTextureSize(64, 64); - WireB.mirror = true; - setRotation(WireB, 0F, 0F, 0F); + this.Base = new ModelRenderer(this, 0, 0); + this.Base.addBox(0F, 0F, 0F, 3, 8, 8); + this.Base.setRotationPoint(-3F, -4F, -4F); + this.Base.setTextureSize(64, 64); + this.Base.mirror = true; + setRotation(this.Base, 0F, 0F, 0F); + this.BTop = new ModelRenderer(this, 0, 16); + this.BTop.addBox(0F, 0F, 0F, 4, 2, 8); + this.BTop.setRotationPoint(-3F, -4F, -4F); + this.BTop.setTextureSize(64, 64); + this.BTop.mirror = true; + setRotation(this.BTop, 0F, 0F, -0.2617994F); + this.BBottom = new ModelRenderer(this, 0, 26); + this.BBottom.addBox(0F, -2F, 0F, 4, 2, 8); + this.BBottom.setRotationPoint(-3F, 4F, -4F); + this.BBottom.setTextureSize(64, 64); + this.BBottom.mirror = true; + setRotation(this.BBottom, 0F, 0F, 0.2617994F); + this.BLeft = new ModelRenderer(this, 0, 36); + this.BLeft.addBox(0F, 0F, 0F, 4, 8, 2); + this.BLeft.setRotationPoint(-3F, -4F, -4F); + this.BLeft.setTextureSize(64, 64); + this.BLeft.mirror = true; + setRotation(this.BLeft, 0F, 0.2617994F, 0F); + this.BRight = new ModelRenderer(this, 12, 36); + this.BRight.addBox(0F, 0F, -2F, 4, 8, 2); + this.BRight.setRotationPoint(-3F, -4F, 4F); + this.BRight.setTextureSize(64, 64); + this.BRight.mirror = true; + setRotation(this.BRight, 0F, -0.2617994F, 0F); + this.RTop = new ModelRenderer(this, 24, 0); + this.RTop.addBox(0F, 0F, 0F, 3, 2, 10); + this.RTop.setRotationPoint(4F, -6F, -6F); + this.RTop.setTextureSize(64, 64); + this.RTop.mirror = true; + setRotation(this.RTop, 0F, 0F, 0F); + this.RBottom = new ModelRenderer(this, 24, 12); + this.RBottom.addBox(0F, 0F, 0F, 3, 2, 10); + this.RBottom.setRotationPoint(4F, 4F, -4F); + this.RBottom.setTextureSize(64, 64); + this.RBottom.mirror = true; + setRotation(this.RBottom, 0F, 0F, 0F); + this.RLeft = new ModelRenderer(this, 0, 46); + this.RLeft.addBox(0F, 0F, 0F, 3, 10, 2); + this.RLeft.setRotationPoint(4F, -4F, -6F); + this.RLeft.setTextureSize(64, 64); + this.RLeft.mirror = true; + setRotation(this.RLeft, 0F, 0F, 0F); + this.RRight = new ModelRenderer(this, 10, 46); + this.RRight.addBox(0F, 0F, 0F, 3, 10, 2); + this.RRight.setRotationPoint(4F, -6F, 4F); + this.RRight.setTextureSize(64, 64); + this.RRight.mirror = true; + setRotation(this.RRight, 0F, 0F, 0F); + this.GPivot = new ModelRenderer(this, 24, 24); + this.GPivot.addBox(0F, 0F, 0F, 3, 4, 4); + this.GPivot.setRotationPoint(-6F, -2F, -2F); + this.GPivot.setTextureSize(64, 64); + this.GPivot.mirror = true; + setRotation(this.GPivot, 0F, 0F, 0F); + this.GBase = new ModelRenderer(this, 24, 32); + this.GBase.addBox(-2F, -3F, -4F, 4, 3, 8); + this.GBase.setRotationPoint(-6F, 0F, 1F); + this.GBase.setTextureSize(64, 64); + this.GBase.mirror = true; + setRotation(this.GBase, 0F, 0F, 0.6108652F); + this.F31 = new ModelRenderer(this, 20, 52); + this.F31.addBox(-3F, -1F, 0F, 3, 2, 2); + this.F31.setRotationPoint(-6F, -2.8F, -1F); + this.F31.setTextureSize(64, 64); + this.F31.mirror = true; + setRotation(this.F31, 0F, 0F, -0.5235988F); + this.F21 = new ModelRenderer(this, 30, 52); + this.F21.addBox(-3F, -1F, -2F, 3, 2, 2); + this.F21.setRotationPoint(-6F, -2.8F, -1.2F); + this.F21.setTextureSize(64, 64); + this.F21.mirror = true; + setRotation(this.F21, 0F, 0F, 0F); + this.F41 = new ModelRenderer(this, 40, 52); + this.F41.addBox(-3F, -1F, 0F, 3, 2, 2); + this.F41.setRotationPoint(-6F, -2.8F, 1.2F); + this.F41.setTextureSize(64, 64); + this.F41.mirror = true; + setRotation(this.F41, 0F, 0F, -0.5235988F); + this.F51 = new ModelRenderer(this, 50, 52); + this.F51.addBox(-3F, -1F, 0F, 3, 2, 2); + this.F51.setRotationPoint(-6F, -2.8F, 3.4F); + this.F51.setTextureSize(64, 64); + this.F51.mirror = true; + setRotation(this.F51, 0F, 0F, -0.5235988F); + this.F11 = new ModelRenderer(this, 48, 38); + this.F11.addBox(-1F, -1F, -3F, 2, 2, 3); + this.F11.setRotationPoint(-5F, -1F, -2.5F); + this.F11.setTextureSize(64, 64); + this.F11.mirror = true; + setRotation(this.F11, 1.22173F, 1.745329F, -1.047198F); + this.F22 = new ModelRenderer(this, 20, 56); + this.F22.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F22.setRotationPoint(-8.5F, -3F, -2.2F); + this.F22.setTextureSize(64, 64); + this.F22.mirror = true; + setRotation(this.F22, 0F, 0F, 0F); + this.F32 = new ModelRenderer(this, 30, 56); + this.F32.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F32.setRotationPoint(-8.5F, -2F, 0F); + this.F32.setTextureSize(64, 64); + this.F32.mirror = true; + setRotation(this.F32, 0F, 0F, -1.919862F); + this.F42 = new ModelRenderer(this, 40, 56); + this.F42.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F42.setRotationPoint(-8.5F, -2F, 2.2F); + this.F42.setTextureSize(64, 64); + this.F42.mirror = true; + setRotation(this.F42, 0F, 0F, -1.919862F); + this.F52 = new ModelRenderer(this, 50, 56); + this.F52.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F52.setRotationPoint(-8.5F, -2F, 4.4F); + this.F52.setTextureSize(64, 64); + this.F52.mirror = true; + setRotation(this.F52, 0F, 0F, -1.919862F); + this.F12 = new ModelRenderer(this, 48, 34); + this.F12.addBox(-1F, -1F, -2F, 2, 2, 2); + this.F12.setRotationPoint(-6F, 0.5F, -4.5F); + this.F12.setTextureSize(64, 64); + this.F12.mirror = true; + setRotation(this.F12, 1.22173F, 2.935045F, -1.047198F); + this.F23 = new ModelRenderer(this, 20, 60); + this.F23.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F23.setRotationPoint(-11F, -2.8F, -2.2F); + this.F23.setTextureSize(64, 64); + this.F23.mirror = true; + setRotation(this.F23, 0F, 0F, 0F); + this.F33 = new ModelRenderer(this, 30, 60); + this.F33.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F33.setRotationPoint(-8F, 0.5F, 0F); + this.F33.setTextureSize(64, 64); + this.F33.mirror = true; + setRotation(this.F33, 0F, 0F, -2.879793F); + this.F43 = new ModelRenderer(this, 40, 60); + this.F43.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F43.setRotationPoint(-8F, 0.5F, 2.2F); + this.F43.setTextureSize(64, 64); + this.F43.mirror = true; + setRotation(this.F43, 0F, 0F, -2.879793F); + this.F53 = new ModelRenderer(this, 50, 60); + this.F53.addBox(-3F, -1F, -1F, 3, 2, 2); + this.F53.setRotationPoint(-8F, 0.5F, 4.4F); + this.F53.setTextureSize(64, 64); + this.F53.mirror = true; + setRotation(this.F53, 0F, 0F, -2.879793F); + this.F13 = new ModelRenderer(this, 48, 30); + this.F13.addBox(-1F, -1F, -2F, 2, 2, 2); + this.F13.setRotationPoint(-7F, 1F, -4F); + this.F13.setTextureSize(64, 64); + this.F13.mirror = true; + setRotation(this.F13, 0.5235988F, 2.617994F, -1.047198F); + this.WireL = new ModelRenderer(this, 38, 30); + this.WireL.addBox(0F, 0F, 0F, 4, 1, 1); + this.WireL.setRotationPoint(0F, -5.5F, 0F); + this.WireL.setTextureSize(64, 64); + this.WireL.mirror = true; + setRotation(this.WireL, 0F, 0F, 0F); + this.WireR = new ModelRenderer(this, 38, 28); + this.WireR.addBox(0F, 0F, 0F, 4, 1, 1); + this.WireR.setRotationPoint(0F, -5.5F, 2F); + this.WireR.setTextureSize(64, 64); + this.WireR.mirror = true; + setRotation(this.WireR, 0F, 0F, 0F); + this.Gauge1 = new ModelRenderer(this, 20, 47); + this.Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4); + this.Gauge1.setRotationPoint(-1F, -4F, 4F); + this.Gauge1.setTextureSize(64, 64); + this.Gauge1.mirror = true; + setRotation(this.Gauge1, -0.7853982F, 0F, 0F); + this.Gauge2 = new ModelRenderer(this, 34, 48); + this.Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3); + this.Gauge2.setRotationPoint(-1F, -4F, 4F); + this.Gauge2.setTextureSize(64, 64); + this.Gauge2.mirror = true; + setRotation(this.Gauge2, -0.7853982F, 0F, 0F); + this.WireB = new ModelRenderer(this, 48, 49); + this.WireB.addBox(0F, 0F, 0F, 4, 2, 1); + this.WireB.setRotationPoint(0F, -1F, -5.5F); + this.WireB.setTextureSize(64, 64); + this.WireB.mirror = true; + setRotation(this.WireB, 0F, 0F, 0F); } @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Base.render(f5); - BTop.render(f5); - BBottom.render(f5); - BLeft.render(f5); - BRight.render(f5); - RTop.render(f5); - RBottom.render(f5); - RLeft.render(f5); - RRight.render(f5); - GPivot.render(f5); - GBase.render(f5); - F31.render(f5); - F21.render(f5); - F41.render(f5); - F51.render(f5); - F11.render(f5); - F22.render(f5); - F32.render(f5); - F42.render(f5); - F52.render(f5); - F12.render(f5); - F23.render(f5); - F33.render(f5); - F43.render(f5); - F53.render(f5); - F13.render(f5); - WireL.render(f5); - WireR.render(f5); - Gauge1.render(f5); - Gauge2.render(f5); - WireB.render(f5); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.Base.render(scaleFactor); + this.BTop.render(scaleFactor); + this.BBottom.render(scaleFactor); + this.BLeft.render(scaleFactor); + this.BRight.render(scaleFactor); + this.RTop.render(scaleFactor); + this.RBottom.render(scaleFactor); + this.RLeft.render(scaleFactor); + this.RRight.render(scaleFactor); + this.GPivot.render(scaleFactor); + this.GBase.render(scaleFactor); + this.F31.render(scaleFactor); + this.F21.render(scaleFactor); + this.F41.render(scaleFactor); + this.F51.render(scaleFactor); + this.F11.render(scaleFactor); + this.F22.render(scaleFactor); + this.F32.render(scaleFactor); + this.F42.render(scaleFactor); + this.F52.render(scaleFactor); + this.F12.render(scaleFactor); + this.F23.render(scaleFactor); + this.F33.render(scaleFactor); + this.F43.render(scaleFactor); + this.F53.render(scaleFactor); + this.F13.render(scaleFactor); + this.WireL.render(scaleFactor); + this.WireR.render(scaleFactor); + this.Gauge1.render(scaleFactor); + this.Gauge2.render(scaleFactor); + this.WireB.render(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - } diff --git a/src/main/java/com/hbm/render/model/ModelNo9.java b/src/main/java/com/hbm/render/model/ModelNo9.java index c94970207..f47890983 100644 --- a/src/main/java/com/hbm/render/model/ModelNo9.java +++ b/src/main/java/com/hbm/render/model/ModelNo9.java @@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; import com.hbm.render.loader.ModelRendererObj; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -15,49 +14,49 @@ public class ModelNo9 extends ModelArmorBase { public ModelRendererObj lamp; public ModelRendererObj insig; - + public ModelNo9(int type) { super(type); - head = new ModelRendererObj(ResourceManager.armor_no9, "Helmet"); - insig = new ModelRendererObj(ResourceManager.armor_no9, "Insignia"); - lamp = new ModelRendererObj(ResourceManager.armor_no9, "Flame"); - body = new ModelRendererObj(null); - leftArm = new ModelRendererObj(null).setRotationPoint(-5.0F, 2.0F, 0.0F); - rightArm = new ModelRendererObj(null).setRotationPoint(5.0F, 2.0F, 0.0F); - leftLeg = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); - rightLeg = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); - leftFoot = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); - rightFoot = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); + this.head = new ModelRendererObj(ResourceManager.armor_no9, "Helmet"); + this.insig = new ModelRendererObj(ResourceManager.armor_no9, "Insignia"); + this.lamp = new ModelRendererObj(ResourceManager.armor_no9, "Flame"); + this.body = new ModelRendererObj(null); + this.leftArm = new ModelRendererObj(null).setRotationPoint(-5.0F, 2.0F, 0.0F); + this.rightArm = new ModelRendererObj(null).setRotationPoint(5.0F, 2.0F, 0.0F); + this.leftLeg = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightLeg = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); + this.leftFoot = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); + this.rightFoot = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); - head.copyTo(insig); - head.copyTo(lamp); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.head.copyTo(this.insig); + this.head.copyTo(this.lamp); + GL11.glPushMatrix(); - - if(type == 0) { + + if(this.type == 0) { GL11.glShadeModel(GL11.GL_SMOOTH); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.no9); - head.render(par7); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.no9_insignia); - insig.render(par7); - - if(par1Entity instanceof EntityPlayer) { - EntityPlayer player = (EntityPlayer) par1Entity; + bindTexture(ResourceManager.no9); + this.head.render(scaleFactor); + bindTexture(ResourceManager.no9_insignia); + this.insig.render(scaleFactor); + + if(entity instanceof EntityPlayer) { + EntityPlayer player = (EntityPlayer) entity; ItemStack helmet = player.getEquipmentInSlot(4); - + if(helmet != null && helmet.hasTagCompound() && helmet.getTagCompound().getBoolean("isOn")) { GL11.glColor3f(1F, 1F, 0.8F); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); GL11.glDisable(GL11.GL_LIGHTING); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F); - lamp.render(par7); + this.lamp.render(scaleFactor); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopAttrib(); GL11.glEnable(GL11.GL_TEXTURE_2D); @@ -66,7 +65,7 @@ public class ModelNo9 extends ModelArmorBase { } } } - + GL11.glPopMatrix(); } } diff --git a/src/main/java/com/hbm/render/model/ModelPigeon.java b/src/main/java/com/hbm/render/model/ModelPigeon.java index 14c4dc3ac..3782e7c5d 100644 --- a/src/main/java/com/hbm/render/model/ModelPigeon.java +++ b/src/main/java/com/hbm/render/model/ModelPigeon.java @@ -19,13 +19,8 @@ public class ModelPigeon extends ModelBase { public ModelRenderer rightWing; public ModelRenderer ass; public ModelRenderer feathers; - + public ModelPigeon() { - initModel(); - } - - private void initModel() { - this.head = new ModelRenderer(this, 0, 0); this.head.addBox(-2F, -6F, -2F, 4, 6, 4); this.head.setRotationPoint(0F, 16F, -2F); @@ -45,14 +40,14 @@ public class ModelPigeon extends ModelBase { this.feathers = new ModelRenderer(this, 16, 24); this.feathers.addBox(-1F, -0.5F, -2F, 2, 1, 4); this.feathers.setRotationPoint(0F, 21.5F, 7.5F); - + this.leftLeg = new ModelRenderer(this, 20, 0); this.leftLeg.addBox(-1F, 0F, 0F, 2, 4, 2); this.leftLeg.setRotationPoint(1F, 20F, -1F); this.rightLeg = new ModelRenderer(this, 20, 0); this.rightLeg.addBox(-1F, 0F, 0F, 2, 4, 2); this.rightLeg.setRotationPoint(-1F, 20F, -1F); - + this.leftWing = new ModelRenderer(this, 28, 0); this.leftWing.addBox(0F, 0F, -3F, 1, 4, 6); this.leftWing.setRotationPoint(3F, -2F, 0F); @@ -66,31 +61,18 @@ public class ModelPigeon extends ModelBase { this.bodyFat.addChild(this.rightWing); } - public void render(Entity entity, float f0, float f1, float f2, float f3, float f4, float scale) { - this.setRotationAngles(f0, f1, f2, f3, f4, scale, entity); - this.head.render(scale); - this.beak.render(scale); - if(((EntityPigeon) entity).isFat()) { - this.bodyFat.render(scale); - } else { - this.body.render(scale); - } - this.rightLeg.render(scale); - this.leftLeg.render(scale); - this.ass.render(scale); - this.feathers.render(scale); - } - - public void setRotationAngles(float walkLoop, float legAmplitude, float armSwing, float headYaw, float headPitch, float scale, Entity entity) { + @Override + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { + this.head.rotateAngleX = this.beak.rotateAngleX = headPitch / (180F / (float) Math.PI); - this.head.rotateAngleY = this.beak.rotateAngleY = headYaw / (180F / (float) Math.PI); + this.head.rotateAngleY = this.beak.rotateAngleY = netHeadYaw / (180F / (float) Math.PI); this.body.rotateAngleX = this.bodyFat.rotateAngleX = this.ass.rotateAngleX = -((float) Math.PI / 4F); this.feathers.rotateAngleX = -((float) Math.PI / 8F); - this.rightLeg.rotateAngleX = MathHelper.cos(walkLoop * 0.6662F) * 1.4F * legAmplitude; - this.leftLeg.rotateAngleX = MathHelper.cos(walkLoop * 0.6662F + (float) Math.PI) * 1.4F * legAmplitude; - this.rightWing.rotateAngleZ = armSwing; - this.leftWing.rotateAngleZ = -armSwing; - + this.rightLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount; + this.leftLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float) Math.PI) * 1.4F * limbSwingAmount; + this.rightWing.rotateAngleZ = ageInTicks; + this.leftWing.rotateAngleZ = -ageInTicks; + if(((EntityPigeon) entity).isFat()) { this.head.rotationPointZ = -4F; this.beak.rotationPointZ = -4F; @@ -107,4 +89,21 @@ public class ModelPigeon extends ModelBase { this.rightWing.rotationPointX = -3F; } } + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.head.render(scaleFactor); + this.beak.render(scaleFactor); + if(((EntityPigeon) entity).isFat()) { + this.bodyFat.render(scaleFactor); + } else { + this.body.render(scaleFactor); + } + this.rightLeg.render(scaleFactor); + this.leftLeg.render(scaleFactor); + this.ass.render(scaleFactor); + this.feathers.render(scaleFactor); + } } diff --git a/src/main/java/com/hbm/render/model/ModelPoleTop.java b/src/main/java/com/hbm/render/model/ModelPoleTop.java index deb9cc0c2..bfa6ec289 100644 --- a/src/main/java/com/hbm/render/model/ModelPoleTop.java +++ b/src/main/java/com/hbm/render/model/ModelPoleTop.java @@ -4,104 +4,81 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX - - - - - package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelPoleTop extends ModelBase -{ - //fields - ModelRenderer Shape1; - ModelRenderer Shape2; - ModelRenderer Shape3; - ModelRenderer Shape4; - ModelRenderer Shape5; - ModelRenderer Shape6; - - public ModelPoleTop() - { - textureWidth = 64; - textureHeight = 64; - - Shape1 = new ModelRenderer(this, 0, 1); - Shape1.addBox(0F, 0F, 0F, 12, 8, 12); - Shape1.setRotationPoint(-6F, 16F, -6F); - Shape1.setTextureSize(64, 64); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 0, 23); - Shape2.addBox(0F, 0F, 0F, 4, 16, 4); - Shape2.setRotationPoint(4F, 4F, -8F); - Shape2.setTextureSize(64, 64); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 0, 23); - Shape3.addBox(0F, 0F, 0F, 4, 16, 4); - Shape3.setRotationPoint(4F, 4F, 4F); - Shape3.setTextureSize(64, 64); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 0, 23); - Shape4.addBox(0F, 0F, 0F, 4, 16, 4); - Shape4.setRotationPoint(-8F, 4F, -8F); - Shape4.setTextureSize(64, 64); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); - Shape5 = new ModelRenderer(this, 0, 23); - Shape5.addBox(0F, 0F, 0F, 4, 16, 4); - Shape5.setRotationPoint(-8F, 4F, 4F); - Shape5.setTextureSize(64, 64); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - Shape6 = new ModelRenderer(this, 0, 47); - Shape6.addBox(0F, 0F, 0F, 4, 2, 4); - Shape6.setRotationPoint(-2F, 14F, -2F); - Shape6.setTextureSize(64, 64); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - } - - @Override -public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void renderModel(float f) - { - Shape1.render(f); - Shape2.render(f); - Shape3.render(f); - Shape4.render(f); - Shape5.render(f); - Shape6.render(f); - } - - @Override -public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } +public class ModelPoleTop extends ModelBase { + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape5; + ModelRenderer Shape6; + + public ModelPoleTop() { + this.textureWidth = 64; + this.textureHeight = 64; + + this.Shape1 = new ModelRenderer(this, 0, 1); + this.Shape1.addBox(0F, 0F, 0F, 12, 8, 12); + this.Shape1.setRotationPoint(-6F, 16F, -6F); + this.Shape1.setTextureSize(64, 64); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + this.Shape2 = new ModelRenderer(this, 0, 23); + this.Shape2.addBox(0F, 0F, 0F, 4, 16, 4); + this.Shape2.setRotationPoint(4F, 4F, -8F); + this.Shape2.setTextureSize(64, 64); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + this.Shape3 = new ModelRenderer(this, 0, 23); + this.Shape3.addBox(0F, 0F, 0F, 4, 16, 4); + this.Shape3.setRotationPoint(4F, 4F, 4F); + this.Shape3.setTextureSize(64, 64); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0F, 0F, 0F); + this.Shape4 = new ModelRenderer(this, 0, 23); + this.Shape4.addBox(0F, 0F, 0F, 4, 16, 4); + this.Shape4.setRotationPoint(-8F, 4F, -8F); + this.Shape4.setTextureSize(64, 64); + this.Shape4.mirror = true; + setRotation(this.Shape4, 0F, 0F, 0F); + this.Shape5 = new ModelRenderer(this, 0, 23); + this.Shape5.addBox(0F, 0F, 0F, 4, 16, 4); + this.Shape5.setRotationPoint(-8F, 4F, 4F); + this.Shape5.setTextureSize(64, 64); + this.Shape5.mirror = true; + setRotation(this.Shape5, 0F, 0F, 0F); + this.Shape6 = new ModelRenderer(this, 0, 47); + this.Shape6.addBox(0F, 0F, 0F, 4, 2, 4); + this.Shape6.setRotationPoint(-2F, 14F, -2F); + this.Shape6.setTextureSize(64, 64); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0F, 0F, 0F); + } + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderModel(scaleFactor); + } + + public void renderModel(float scaleFactor) { + this.Shape1.render(scaleFactor); + this.Shape2.render(scaleFactor); + this.Shape3.render(scaleFactor); + this.Shape4.render(scaleFactor); + this.Shape5.render(scaleFactor); + this.Shape6.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelPylon.java b/src/main/java/com/hbm/render/model/ModelPylon.java index 8f37b769a..3fffe8e93 100755 --- a/src/main/java/com/hbm/render/model/ModelPylon.java +++ b/src/main/java/com/hbm/render/model/ModelPylon.java @@ -13,62 +13,51 @@ import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelPylon extends ModelBase -{ - int textureX = 64; - int textureY = 128; +public class ModelPylon extends ModelBase { - public ModelRenderer pylonModel[]; + public ModelRenderer[] pylonModel; - public ModelPylon() - { - textureWidth = 64; - textureHeight = 128; - pylonModel = new ModelRenderer[4]; - pylonModel[0] = new ModelRenderer(this, 0, 96); // Box 0 - pylonModel[1] = new ModelRenderer(this, 1, 1); // Box 1 - pylonModel[2] = new ModelRenderer(this, 24, 1); // Box 2 - pylonModel[3] = new ModelRenderer(this, 25, 17); // Box 3 + public ModelPylon() { + this.textureWidth = 64; + this.textureHeight = 128; - pylonModel[0].addBox(0F, 0F, 0F, 16, 16, 16, 0F); // Box 0 - pylonModel[0].setRotationPoint(-8F, -6F, -8F); + this.pylonModel = new ModelRenderer[4]; + this.pylonModel[0] = new ModelRenderer(this, 0, 96); // Box 0 + this.pylonModel[1] = new ModelRenderer(this, 1, 1); // Box 1 + this.pylonModel[2] = new ModelRenderer(this, 24, 1); // Box 2 + this.pylonModel[3] = new ModelRenderer(this, 25, 17); // Box 3 - pylonModel[1].addBox(0F, 0F, 0F, 4, 73, 4, 0F); // Box 1 - pylonModel[1].setRotationPoint(-2F, -79F, -2F); + this.pylonModel[0].addBox(0F, 0F, 0F, 16, 16, 16, 0F); // Box 0 + this.pylonModel[0].setRotationPoint(-8F, -6F, -8F); - pylonModel[2].addBox(0F, 0F, 0F, 6, 4, 6, 0F); // Box 2 - pylonModel[2].setRotationPoint(-3F, -74F, -3F); + this.pylonModel[1].addBox(0F, 0F, 0F, 4, 73, 4, 0F); // Box 1 + this.pylonModel[1].setRotationPoint(-2F, -79F, -2F); - pylonModel[3].addBox(0F, 0F, 0F, 6, 2, 6, 0F); // Box 3 - pylonModel[3].setRotationPoint(-3F, -78F, -3F); + this.pylonModel[2].addBox(0F, 0F, 0F, 6, 4, 6, 0F); // Box 2 + this.pylonModel[2].setRotationPoint(-3F, -74F, -3F); + + this.pylonModel[3].addBox(0F, 0F, 0F, 6, 2, 6, 0F); // Box 3 + this.pylonModel[3].setRotationPoint(-3F, -78F, -3F); - for(int i = 0; i < pylonModel.length; i++) { - pylonModel[i].setTextureSize(textureX, textureY); - pylonModel[i].mirror = true; + for (ModelRenderer modelRenderer : this.pylonModel) { + modelRenderer.setTextureSize(this.textureWidth, this.textureHeight); + modelRenderer.mirror = true; } } @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - for(int i = 0; i < 4; i++) - { - pylonModel[i].render(f5); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + for(int i = 0; i < 4; i++) { + this.pylonModel[i].render(scaleFactor); } } - public void renderAll(float f5) - { - for(int i = 0; i < 4; i++) - { - pylonModel[i].render(f5); + public void renderAll(float scaleFactor) { + + for(int i = 0; i < 4; i++) { + this.pylonModel[i].render(scaleFactor); } } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } -} \ No newline at end of file +} diff --git a/src/main/java/com/hbm/render/model/ModelRadio.java b/src/main/java/com/hbm/render/model/ModelRadio.java index 7efdd0118..fa543ec8f 100644 --- a/src/main/java/com/hbm/render/model/ModelRadio.java +++ b/src/main/java/com/hbm/render/model/ModelRadio.java @@ -5,57 +5,55 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelRadio extends ModelBase { - // fields + ModelRenderer Box; ModelRenderer Plate; ModelRenderer Lever; public ModelRadio() { - textureWidth = 32; - textureHeight = 32; + this.textureWidth = 32; + this.textureHeight = 32; - Box = new ModelRenderer(this, 0, 0); - Box.addBox(0F, 0F, 0F, 8, 14, 4); - Box.setRotationPoint(-4F, 9F, -12F); - Box.setTextureSize(32, 32); - Box.mirror = true; - setRotation(Box, 0F, 0F, 0F); - Plate = new ModelRenderer(this, 0, 18); - Plate.addBox(0F, 0F, 0F, 7, 13, 1); - Plate.setRotationPoint(-3.5F, 9.5F, -12.5F); - Plate.setTextureSize(32, 32); - Plate.mirror = true; - setRotation(Plate, 0F, 0F, 0F); - Lever = new ModelRenderer(this, 16, 18); - Lever.addBox(0F, -1F, -1F, 2, 8, 2); - Lever.setRotationPoint(4F, 16F, -10F); - Lever.setTextureSize(32, 32); - Lever.mirror = true; - setRotation(Lever, 0F, 0F, 0F); + this.Box = new ModelRenderer(this, 0, 0); + this.Box.addBox(0F, 0F, 0F, 8, 14, 4); + this.Box.setRotationPoint(-4F, 9F, -12F); + this.Box.setTextureSize(32, 32); + this.Box.mirror = true; + setRotation(this.Box, 0F, 0F, 0F); + this.Plate = new ModelRenderer(this, 0, 18); + this.Plate.addBox(0F, 0F, 0F, 7, 13, 1); + this.Plate.setRotationPoint(-3.5F, 9.5F, -12.5F); + this.Plate.setTextureSize(32, 32); + this.Plate.mirror = true; + setRotation(this.Plate, 0F, 0F, 0F); + this.Lever = new ModelRenderer(this, 16, 18); + this.Lever.addBox(0F, -1F, -1F, 2, 8, 2); + this.Lever.setRotationPoint(4F, 16F, -10F); + this.Lever.setTextureSize(32, 32); + this.Lever.mirror = true; + setRotation(this.Lever, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Box.render(f5); - Plate.render(f5); - Lever.render(f5); + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.Box.render(scaleFactor); + this.Plate.render(scaleFactor); + this.Lever.render(scaleFactor); } - public void renderModel(float f5, int deg) { - Box.render(f5); - Plate.render(f5); - Lever.rotateAngleX = -(float)(deg / 180F * Math.PI); - Lever.render(f5); + public void renderModel(float scaleFactor, int rotation) { + + this.Box.render(scaleFactor); + this.Plate.render(scaleFactor); + this.Lever.rotateAngleX = -(float)(rotation / 180F * Math.PI); + this.Lever.render(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } } diff --git a/src/main/java/com/hbm/render/model/ModelRevolver.java b/src/main/java/com/hbm/render/model/ModelRevolver.java index 5a22711b0..c9da656d6 100644 --- a/src/main/java/com/hbm/render/model/ModelRevolver.java +++ b/src/main/java/com/hbm/render/model/ModelRevolver.java @@ -4,11 +4,6 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX - - - - - package com.hbm.render.model; import org.lwjgl.opengl.GL11; @@ -17,9 +12,8 @@ import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelRevolver extends ModelBase -{ - //fields +public class ModelRevolver extends ModelBase { + ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; @@ -32,118 +26,108 @@ public class ModelRevolver extends ModelBase ModelRenderer Shape10; ModelRenderer Shape11; ModelRenderer Shape12; - - public ModelRevolver() - { - textureWidth = 64; - textureHeight = 64; - - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 3, 8, 2); - Shape1.setRotationPoint(0F, 0F, 0F); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, -0.3490659F); - Shape2 = new ModelRenderer(this, 42, 0); - Shape2.addBox(0F, 0F, 0F, 9, 6, 2); - Shape2.setRotationPoint(-8F, -5F, 0F); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 0, 14); - Shape3.addBox(0F, 0F, 0F, 4, 2, 1); - Shape3.setRotationPoint(-0.03333334F, -3F, 0.5F); - Shape3.setTextureSize(64, 32); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0.715585F); - Shape4 = new ModelRenderer(this, 22, 0); - Shape4.addBox(0F, 0F, 0F, 6, 4, 4); - Shape4.setRotationPoint(-7F, -4F, -1F); - Shape4.setTextureSize(64, 32); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); - Shape5 = new ModelRenderer(this, 0, 0); - Shape5.addBox(0F, 0F, 0F, 1, 1, 1); - Shape5.setRotationPoint(0F, 0F, 0F); - Shape5.setTextureSize(64, 32); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - Shape6 = new ModelRenderer(this, 34, 8); - Shape6.addBox(0F, 0F, 0F, 13, 2, 2); - Shape6.setRotationPoint(-21F, -4F, 0F); - Shape6.setTextureSize(64, 32); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - Shape7 = new ModelRenderer(this, 0, 17); - Shape7.addBox(0F, 0F, 0F, 1, 2, 1); - Shape7.setRotationPoint(2F, -3F, 0.5F); - Shape7.setTextureSize(64, 32); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0.715585F); - Shape8 = new ModelRenderer(this, 4, 17); - Shape8.addBox(0F, 0F, 0F, 2, 1, 1); - Shape8.setRotationPoint(2F, -4F, 0.5F); - Shape8.setTextureSize(64, 32); - Shape8.mirror = true; - setRotation(Shape8, 0F, 0F, 0.715585F); - Shape9 = new ModelRenderer(this, 0, 20); - Shape9.addBox(0F, 0F, 0F, 6, 1, 1); - Shape9.setRotationPoint(-14F, -2F, 0.5F); - Shape9.setTextureSize(64, 32); - Shape9.mirror = true; - setRotation(Shape9, 0F, 0F, 0F); - Shape10 = new ModelRenderer(this, 26, 8); - Shape10.addBox(0F, 0F, 0F, 2, 2, 2); - Shape10.setRotationPoint(-19F, -5F, 0F); - Shape10.setTextureSize(64, 32); - Shape10.mirror = true; - setRotation(Shape10, 0F, 0F, 0.6108652F); - Shape11 = new ModelRenderer(this, 0, 10); - Shape11.addBox(0F, 0F, 0F, 4, 3, 1); - Shape11.setRotationPoint(-2F, 1F, 0.5F); - Shape11.setTextureSize(64, 32); - Shape11.mirror = true; - setRotation(Shape11, 0F, 0F, 0F); - Shape12 = new ModelRenderer(this, 10, 0); - Shape12.addBox(0F, 0F, 0F, 1, 3, 1); - Shape12.setRotationPoint(0F, 0F, 0.5F); - Shape12.setTextureSize(64, 32); - Shape12.mirror = true; - setRotation(Shape12, 0F, 0F, 0.5235988F); - } - - @Override -public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - GL11.glDisable(GL11.GL_CULL_FACE); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - Shape7.render(f5); - Shape8.render(f5); - Shape9.render(f5); - Shape10.render(f5); - Shape11.render(f5); - Shape12.render(f5); - GL11.glEnable(GL11.GL_CULL_FACE); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override -public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } + public ModelRevolver() { + this.textureWidth = 64; + this.textureHeight = 64; + + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 3, 8, 2); + this.Shape1.setRotationPoint(0F, 0F, 0F); + this.Shape1.setTextureSize(64, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, -0.3490659F); + this.Shape2 = new ModelRenderer(this, 42, 0); + this.Shape2.addBox(0F, 0F, 0F, 9, 6, 2); + this.Shape2.setRotationPoint(-8F, -5F, 0F); + this.Shape2.setTextureSize(64, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + this.Shape3 = new ModelRenderer(this, 0, 14); + this.Shape3.addBox(0F, 0F, 0F, 4, 2, 1); + this.Shape3.setRotationPoint(-0.03333334F, -3F, 0.5F); + this.Shape3.setTextureSize(64, 32); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0F, 0F, 0.715585F); + this.Shape4 = new ModelRenderer(this, 22, 0); + this.Shape4.addBox(0F, 0F, 0F, 6, 4, 4); + this.Shape4.setRotationPoint(-7F, -4F, -1F); + this.Shape4.setTextureSize(64, 32); + this.Shape4.mirror = true; + setRotation(this.Shape4, 0F, 0F, 0F); + this.Shape5 = new ModelRenderer(this, 0, 0); + this.Shape5.addBox(0F, 0F, 0F, 1, 1, 1); + this.Shape5.setRotationPoint(0F, 0F, 0F); + this.Shape5.setTextureSize(64, 32); + this.Shape5.mirror = true; + setRotation(this.Shape5, 0F, 0F, 0F); + this.Shape6 = new ModelRenderer(this, 34, 8); + this.Shape6.addBox(0F, 0F, 0F, 13, 2, 2); + this.Shape6.setRotationPoint(-21F, -4F, 0F); + this.Shape6.setTextureSize(64, 32); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0F, 0F, 0F); + this.Shape7 = new ModelRenderer(this, 0, 17); + this.Shape7.addBox(0F, 0F, 0F, 1, 2, 1); + this.Shape7.setRotationPoint(2F, -3F, 0.5F); + this.Shape7.setTextureSize(64, 32); + this.Shape7.mirror = true; + setRotation(this.Shape7, 0F, 0F, 0.715585F); + this.Shape8 = new ModelRenderer(this, 4, 17); + this.Shape8.addBox(0F, 0F, 0F, 2, 1, 1); + this.Shape8.setRotationPoint(2F, -4F, 0.5F); + this.Shape8.setTextureSize(64, 32); + this.Shape8.mirror = true; + setRotation(this.Shape8, 0F, 0F, 0.715585F); + this.Shape9 = new ModelRenderer(this, 0, 20); + this.Shape9.addBox(0F, 0F, 0F, 6, 1, 1); + this.Shape9.setRotationPoint(-14F, -2F, 0.5F); + this.Shape9.setTextureSize(64, 32); + this.Shape9.mirror = true; + setRotation(this.Shape9, 0F, 0F, 0F); + this.Shape10 = new ModelRenderer(this, 26, 8); + this.Shape10.addBox(0F, 0F, 0F, 2, 2, 2); + this.Shape10.setRotationPoint(-19F, -5F, 0F); + this.Shape10.setTextureSize(64, 32); + this.Shape10.mirror = true; + setRotation(this.Shape10, 0F, 0F, 0.6108652F); + this.Shape11 = new ModelRenderer(this, 0, 10); + this.Shape11.addBox(0F, 0F, 0F, 4, 3, 1); + this.Shape11.setRotationPoint(-2F, 1F, 0.5F); + this.Shape11.setTextureSize(64, 32); + this.Shape11.mirror = true; + setRotation(this.Shape11, 0F, 0F, 0F); + this.Shape12 = new ModelRenderer(this, 10, 0); + this.Shape12.addBox(0F, 0F, 0F, 1, 3, 1); + this.Shape12.setRotationPoint(0F, 0F, 0.5F); + this.Shape12.setTextureSize(64, 32); + this.Shape12.mirror = true; + setRotation(this.Shape12, 0F, 0F, 0.5235988F); + } + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + GL11.glDisable(GL11.GL_CULL_FACE); + this.Shape1.render(scaleFactor); + this.Shape2.render(scaleFactor); + this.Shape3.render(scaleFactor); + this.Shape4.render(scaleFactor); + this.Shape5.render(scaleFactor); + this.Shape6.render(scaleFactor); + this.Shape7.render(scaleFactor); + this.Shape8.render(scaleFactor); + this.Shape9.render(scaleFactor); + this.Shape10.render(scaleFactor); + this.Shape11.render(scaleFactor); + this.Shape12.render(scaleFactor); + GL11.glEnable(GL11.GL_CULL_FACE); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelRotationTester.java b/src/main/java/com/hbm/render/model/ModelRotationTester.java index 083645b02..f046048d7 100644 --- a/src/main/java/com/hbm/render/model/ModelRotationTester.java +++ b/src/main/java/com/hbm/render/model/ModelRotationTester.java @@ -4,67 +4,50 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX - - - - - package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelRotationTester extends ModelBase -{ - //fields - ModelRenderer Shape1; - ModelRenderer Shape2; - - public ModelRotationTester() - { - textureWidth = 64; - textureHeight = 32; - - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 16, 8, 16); - Shape1.setRotationPoint(-8F, 16F, -8F); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 0, 0); - Shape2.addBox(0F, 0F, 0F, 16, 8, 8); - Shape2.setRotationPoint(-8F, 8F, 0F); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - } - - @Override -public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - } - - public void renderModel(float f) { - Shape1.render(f); - Shape2.render(f); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override -public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } +public class ModelRotationTester extends ModelBase { + ModelRenderer Shape1; + ModelRenderer Shape2; + + public ModelRotationTester() { + this.textureWidth = 64; + this.textureHeight = 32; + + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 16, 8, 16); + this.Shape1.setRotationPoint(-8F, 16F, -8F); + this.Shape1.setTextureSize(64, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + this.Shape2 = new ModelRenderer(this, 0, 0); + this.Shape2.addBox(0F, 0F, 0F, 16, 8, 8); + this.Shape2.setRotationPoint(-8F, 8F, 0F); + this.Shape2.setTextureSize(64, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + } + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderModel(scaleFactor); + } + + public void renderModel(float scaleFactor) { + + this.Shape1.render(scaleFactor); + this.Shape2.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelRubble.java b/src/main/java/com/hbm/render/model/ModelRubble.java index 642d1a956..b4af2e901 100644 --- a/src/main/java/com/hbm/render/model/ModelRubble.java +++ b/src/main/java/com/hbm/render/model/ModelRubble.java @@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelRubble extends ModelBase { - // fields + ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; @@ -24,109 +24,95 @@ public class ModelRubble extends ModelBase { ModelRenderer Shape10; public ModelRubble() { - textureWidth = 16; - textureHeight = 16; + this.textureWidth = 16; + this.textureHeight = 16; - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 14, 6, 6); - Shape1.setRotationPoint(-7F, 1F, 2F); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 0, 0); - Shape2.addBox(0F, 0F, 0F, 6, 13, 5); - Shape2.setRotationPoint(-7F, -6F, -5F); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 0, 0); - Shape3.addBox(0F, 0F, 0F, 6, 6, 6); - Shape3.setRotationPoint(1F, 1F, -5F); - Shape3.setTextureSize(64, 32); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 0, 0); - Shape4.addBox(0F, 0F, 0F, 14, 7, 4); - Shape4.setRotationPoint(-7F, -7F, 2F); - Shape4.setTextureSize(64, 32); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0.4363323F, 0F); - Shape5 = new ModelRenderer(this, 0, 0); - Shape5.addBox(0F, 0F, 0F, 6, 6, 11); - Shape5.setRotationPoint(0F, -6F, -5F); - Shape5.setTextureSize(64, 32); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - Shape6 = new ModelRenderer(this, 0, 0); - Shape6.addBox(0F, 0F, 0F, 8, 8, 8); - Shape6.setRotationPoint(-4F, -4F, -4F); - Shape6.setTextureSize(64, 32); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - Shape7 = new ModelRenderer(this, 0, 0); - Shape7.addBox(0F, 0F, 0F, 6, 5, 7); - Shape7.setRotationPoint(-7F, -5F, 1F); - Shape7.setTextureSize(64, 32); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0F); - Shape8 = new ModelRenderer(this, 0, 0); - Shape8.addBox(0F, 0F, 0F, 12, 6, 4); - Shape8.setRotationPoint(-6F, -1F, 3F); - Shape8.setTextureSize(64, 32); - Shape8.mirror = true; - setRotation(Shape8, 0F, 0F, -0.3490659F); - Shape9 = new ModelRenderer(this, 0, 0); - Shape9.addBox(0F, 0F, 0F, 12, 6, 6); - Shape9.setRotationPoint(-6F, 2F, -3F); - Shape9.setTextureSize(64, 32); - Shape9.mirror = true; - setRotation(Shape9, 0F, -0.2094395F, 0F); - Shape10 = new ModelRenderer(this, 0, 0); - Shape10.addBox(0F, 0F, 0F, 6, 10, 4); - Shape10.setRotationPoint(-5F, -3F, -6F); - Shape10.setTextureSize(64, 32); - Shape10.mirror = true; - setRotation(Shape10, 0F, 0F, -0.3490659F); + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 14, 6, 6); + this.Shape1.setRotationPoint(-7F, 1F, 2F); + this.Shape1.setTextureSize(64, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + this.Shape2 = new ModelRenderer(this, 0, 0); + this.Shape2.addBox(0F, 0F, 0F, 6, 13, 5); + this.Shape2.setRotationPoint(-7F, -6F, -5F); + this.Shape2.setTextureSize(64, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + this.Shape3 = new ModelRenderer(this, 0, 0); + this.Shape3.addBox(0F, 0F, 0F, 6, 6, 6); + this.Shape3.setRotationPoint(1F, 1F, -5F); + this.Shape3.setTextureSize(64, 32); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0F, 0F, 0F); + this.Shape4 = new ModelRenderer(this, 0, 0); + this.Shape4.addBox(0F, 0F, 0F, 14, 7, 4); + this.Shape4.setRotationPoint(-7F, -7F, 2F); + this.Shape4.setTextureSize(64, 32); + this.Shape4.mirror = true; + setRotation(this.Shape4, 0F, 0.4363323F, 0F); + this.Shape5 = new ModelRenderer(this, 0, 0); + this.Shape5.addBox(0F, 0F, 0F, 6, 6, 11); + this.Shape5.setRotationPoint(0F, -6F, -5F); + this.Shape5.setTextureSize(64, 32); + this.Shape5.mirror = true; + setRotation(this.Shape5, 0F, 0F, 0F); + this.Shape6 = new ModelRenderer(this, 0, 0); + this.Shape6.addBox(0F, 0F, 0F, 8, 8, 8); + this.Shape6.setRotationPoint(-4F, -4F, -4F); + this.Shape6.setTextureSize(64, 32); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0F, 0F, 0F); + this.Shape7 = new ModelRenderer(this, 0, 0); + this.Shape7.addBox(0F, 0F, 0F, 6, 5, 7); + this.Shape7.setRotationPoint(-7F, -5F, 1F); + this.Shape7.setTextureSize(64, 32); + this.Shape7.mirror = true; + setRotation(this.Shape7, 0F, 0F, 0F); + this.Shape8 = new ModelRenderer(this, 0, 0); + this.Shape8.addBox(0F, 0F, 0F, 12, 6, 4); + this.Shape8.setRotationPoint(-6F, -1F, 3F); + this.Shape8.setTextureSize(64, 32); + this.Shape8.mirror = true; + setRotation(this.Shape8, 0F, 0F, -0.3490659F); + this.Shape9 = new ModelRenderer(this, 0, 0); + this.Shape9.addBox(0F, 0F, 0F, 12, 6, 6); + this.Shape9.setRotationPoint(-6F, 2F, -3F); + this.Shape9.setTextureSize(64, 32); + this.Shape9.mirror = true; + setRotation(this.Shape9, 0F, -0.2094395F, 0F); + this.Shape10 = new ModelRenderer(this, 0, 0); + this.Shape10.addBox(0F, 0F, 0F, 6, 10, 4); + this.Shape10.setRotationPoint(-5F, -3F, -6F); + this.Shape10.setTextureSize(64, 32); + this.Shape10.mirror = true; + setRotation(this.Shape10, 0F, 0F, -0.3490659F); } @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - Shape7.render(f5); - Shape8.render(f5); - Shape9.render(f5); - Shape10.render(f5); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderAll(scaleFactor); } - public void renderAll(float f5) { - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - Shape7.render(f5); - Shape8.render(f5); - Shape9.render(f5); - Shape10.render(f5); + public void renderAll(float scaleFactor) { + + this.Shape1.render(scaleFactor); + this.Shape2.render(scaleFactor); + this.Shape3.render(scaleFactor); + this.Shape4.render(scaleFactor); + this.Shape5.render(scaleFactor); + this.Shape6.render(scaleFactor); + this.Shape7.render(scaleFactor); + this.Shape8.render(scaleFactor); + this.Shape9.render(scaleFactor); + this.Shape10.render(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - } diff --git a/src/main/java/com/hbm/render/model/ModelSatelliteReceiver.java b/src/main/java/com/hbm/render/model/ModelSatelliteReceiver.java index f02181d8c..8e7e9d579 100644 --- a/src/main/java/com/hbm/render/model/ModelSatelliteReceiver.java +++ b/src/main/java/com/hbm/render/model/ModelSatelliteReceiver.java @@ -4,131 +4,107 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX - - - - - package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelSatelliteReceiver extends ModelBase -{ - //fields - ModelRenderer Shape1; - ModelRenderer Shape2; - ModelRenderer Shape3; - ModelRenderer Shape4; - ModelRenderer Shape5; - ModelRenderer Shape6; - ModelRenderer Shape7; - ModelRenderer Shape8; - ModelRenderer Shape9; - - public ModelSatelliteReceiver() - { - textureWidth = 64; - textureHeight = 64; - - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 12, 16, 12); - Shape1.setRotationPoint(-6F, 8F, -6F); - Shape1.setTextureSize(64, 64); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 10, 28); - Shape2.addBox(3F, 9F, -8F, 8, 8, 2); - Shape2.setRotationPoint(-3F, 6F, 0F); - Shape2.setTextureSize(64, 64); - Shape2.mirror = true; - setRotation(Shape2, -0.2617994F, -0.4363323F, 0F); - Shape3 = new ModelRenderer(this, 0, 39); - Shape3.addBox(3F, 7F, -10F, 8, 2, 3); - Shape3.setRotationPoint(-3F, 6F, 0F); - Shape3.setTextureSize(64, 64); - Shape3.mirror = true; - setRotation(Shape3, -0.2617994F, -0.4363323F, 0F); - Shape4 = new ModelRenderer(this, 0, 28); - Shape4.addBox(1F, 9F, -10F, 2, 8, 3); - Shape4.setRotationPoint(-3F, 6F, 0F); - Shape4.setTextureSize(64, 64); - Shape4.mirror = true; - setRotation(Shape4, -0.2617994F, -0.4363323F, 0F); - Shape5 = new ModelRenderer(this, 0, 28); - Shape5.addBox(11F, 9F, -10F, 2, 8, 3); - Shape5.setRotationPoint(-3F, 6F, 0F); - Shape5.setTextureSize(64, 64); - Shape5.mirror = true; - setRotation(Shape5, -0.2617994F, -0.4363323F, 0F); - Shape6 = new ModelRenderer(this, 0, 39); - Shape6.addBox(3F, 17F, -10F, 8, 2, 3); - Shape6.setRotationPoint(-3F, 6F, 0F); - Shape6.setTextureSize(64, 64); - Shape6.mirror = true; - setRotation(Shape6, -0.2617994F, -0.4363323F, 0F); - Shape7 = new ModelRenderer(this, 0, 44); - Shape7.addBox(6F, 12F, -11F, 2, 2, 3); - Shape7.setRotationPoint(-3F, 6F, 0F); - Shape7.setTextureSize(64, 64); - Shape7.mirror = true; - setRotation(Shape7, -0.2617994F, -0.4363323F, 0F); - Shape8 = new ModelRenderer(this, 0, 49); - Shape8.addBox(6.5F, 12.5F, -14F, 1, 1, 3); - Shape8.setRotationPoint(-3F, 6F, 0F); - Shape8.setTextureSize(64, 64); - Shape8.mirror = true; - setRotation(Shape8, -0.2617994F, -0.4363323F, 0F); - Shape9 = new ModelRenderer(this, 0, 53); - Shape9.addBox(6F, 12F, -16F, 2, 2, 2); - Shape9.setRotationPoint(-3F, 6F, 0F); - Shape9.setTextureSize(64, 64); - Shape9.mirror = true; - setRotation(Shape9, -0.2617994F, -0.4363323F, 0F); - } - - @Override -public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - Shape7.render(f5); - Shape8.render(f5); - Shape9.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void renderModel(float f) - { - Shape1.render(f); - Shape2.render(f); - Shape3.render(f); - Shape4.render(f); - Shape5.render(f); - Shape6.render(f); - Shape7.render(f); - Shape8.render(f); - Shape9.render(f); - } - - @Override -public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } +public class ModelSatelliteReceiver extends ModelBase { + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape5; + ModelRenderer Shape6; + ModelRenderer Shape7; + ModelRenderer Shape8; + ModelRenderer Shape9; + + public ModelSatelliteReceiver() { + this.textureWidth = 64; + this.textureHeight = 64; + + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 12, 16, 12); + this.Shape1.setRotationPoint(-6F, 8F, -6F); + this.Shape1.setTextureSize(64, 64); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + this.Shape2 = new ModelRenderer(this, 10, 28); + this.Shape2.addBox(3F, 9F, -8F, 8, 8, 2); + this.Shape2.setRotationPoint(-3F, 6F, 0F); + this.Shape2.setTextureSize(64, 64); + this.Shape2.mirror = true; + setRotation(this.Shape2, -0.2617994F, -0.4363323F, 0F); + this.Shape3 = new ModelRenderer(this, 0, 39); + this.Shape3.addBox(3F, 7F, -10F, 8, 2, 3); + this.Shape3.setRotationPoint(-3F, 6F, 0F); + this.Shape3.setTextureSize(64, 64); + this.Shape3.mirror = true; + setRotation(this.Shape3, -0.2617994F, -0.4363323F, 0F); + this.Shape4 = new ModelRenderer(this, 0, 28); + this.Shape4.addBox(1F, 9F, -10F, 2, 8, 3); + this.Shape4.setRotationPoint(-3F, 6F, 0F); + this.Shape4.setTextureSize(64, 64); + this.Shape4.mirror = true; + setRotation(this.Shape4, -0.2617994F, -0.4363323F, 0F); + this.Shape5 = new ModelRenderer(this, 0, 28); + this.Shape5.addBox(11F, 9F, -10F, 2, 8, 3); + this.Shape5.setRotationPoint(-3F, 6F, 0F); + this.Shape5.setTextureSize(64, 64); + this.Shape5.mirror = true; + setRotation(this.Shape5, -0.2617994F, -0.4363323F, 0F); + this.Shape6 = new ModelRenderer(this, 0, 39); + this.Shape6.addBox(3F, 17F, -10F, 8, 2, 3); + this.Shape6.setRotationPoint(-3F, 6F, 0F); + this.Shape6.setTextureSize(64, 64); + this.Shape6.mirror = true; + setRotation(this.Shape6, -0.2617994F, -0.4363323F, 0F); + this.Shape7 = new ModelRenderer(this, 0, 44); + this.Shape7.addBox(6F, 12F, -11F, 2, 2, 3); + this.Shape7.setRotationPoint(-3F, 6F, 0F); + this.Shape7.setTextureSize(64, 64); + this.Shape7.mirror = true; + setRotation(this.Shape7, -0.2617994F, -0.4363323F, 0F); + this.Shape8 = new ModelRenderer(this, 0, 49); + this.Shape8.addBox(6.5F, 12.5F, -14F, 1, 1, 3); + this.Shape8.setRotationPoint(-3F, 6F, 0F); + this.Shape8.setTextureSize(64, 64); + this.Shape8.mirror = true; + setRotation(this.Shape8, -0.2617994F, -0.4363323F, 0F); + this.Shape9 = new ModelRenderer(this, 0, 53); + this.Shape9.addBox(6F, 12F, -16F, 2, 2, 2); + this.Shape9.setRotationPoint(-3F, 6F, 0F); + this.Shape9.setTextureSize(64, 64); + this.Shape9.mirror = true; + setRotation(this.Shape9, -0.2617994F, -0.4363323F, 0F); + } + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderModel(scaleFactor); + } + + public void renderModel(float scaleFactor) { + + this.Shape1.render(scaleFactor); + this.Shape2.render(scaleFactor); + this.Shape3.render(scaleFactor); + this.Shape4.render(scaleFactor); + this.Shape5.render(scaleFactor); + this.Shape6.render(scaleFactor); + this.Shape7.render(scaleFactor); + this.Shape8.render(scaleFactor); + this.Shape9.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelShrapnel.java b/src/main/java/com/hbm/render/model/ModelShrapnel.java index 4c037cdbf..25174515b 100644 --- a/src/main/java/com/hbm/render/model/ModelShrapnel.java +++ b/src/main/java/com/hbm/render/model/ModelShrapnel.java @@ -9,37 +9,32 @@ public class ModelShrapnel extends ModelBase { ModelRenderer bullet; public ModelShrapnel() { - textureWidth = 16; - textureHeight = 8; + this.textureWidth = 16; + this.textureHeight = 8; - bullet = new ModelRenderer(this, 0, 0); - bullet.addBox(0F, 0F, 0F, 4, 4, 4); - bullet.setRotationPoint(1F, -0.5F, -0.5F); - bullet.setTextureSize(16, 8); - bullet.mirror = true; - setRotation(bullet, 0F, 0F, 0F); + this.bullet = new ModelRenderer(this, 0, 0); + this.bullet.addBox(0F, 0F, 0F, 4, 4, 4); + this.bullet.setRotationPoint(1F, -0.5F, -0.5F); + this.bullet.setTextureSize(16, 8); + this.bullet.mirror = true; + setRotation(this.bullet, 0F, 0F, 0F); } @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - bullet.render(f5); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderAll(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + public void renderAll(float scaleFactor) { + + this.bullet.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - - public void renderAll(float f5) { - bullet.render(f5); - } - -} \ No newline at end of file +} diff --git a/src/main/java/com/hbm/render/model/ModelStatue.java b/src/main/java/com/hbm/render/model/ModelStatue.java index 2b00d13d3..e13c381d8 100644 --- a/src/main/java/com/hbm/render/model/ModelStatue.java +++ b/src/main/java/com/hbm/render/model/ModelStatue.java @@ -4,130 +4,107 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX - - - - - package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelStatue extends ModelBase -{ - //fields - ModelRenderer Shape1; - ModelRenderer Shape2; - ModelRenderer Shape3; - ModelRenderer Shape4; - ModelRenderer Shape6; - ModelRenderer Shape7; - ModelRenderer Shape8; - ModelRenderer Shape9; - ModelRenderer Shape10; - - public ModelStatue() - { - textureWidth = 64; - textureHeight = 64; - - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 16, 8, 16); - Shape1.setRotationPoint(-8F, 16F, -8F); - Shape1.setTextureSize(64, 64); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 0, 24); - Shape2.addBox(0F, 0F, 0F, 4, 12, 4); - Shape2.setRotationPoint(-4F, 4F, -2F); - Shape2.setTextureSize(64, 64); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 16, 24); - Shape3.addBox(0F, 0F, 0F, 4, 12, 4); - Shape3.setRotationPoint(0F, 4F, -2F); - Shape3.setTextureSize(64, 64); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 32, 40); - Shape4.addBox(0F, 0F, 0F, 8, 12, 4); - Shape4.setRotationPoint(-4F, -8F, -2F); - Shape4.setTextureSize(64, 64); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); - Shape6 = new ModelRenderer(this, 0, 40); - Shape6.addBox(0F, 0F, -2F, 4, 8, 4); - Shape6.setRotationPoint(4F, -8F, 0F); - Shape6.setTextureSize(64, 64); - Shape6.mirror = true; - setRotation(Shape6, 0.5235988F, 0F, 0F); - Shape7 = new ModelRenderer(this, 16, 40); - Shape7.addBox(-4F, 0F, -2F, 4, 8, 4); - Shape7.setRotationPoint(-4F, -8F, 0F); - Shape7.setTextureSize(64, 64); - Shape7.mirror = true; - setRotation(Shape7, -0.0872665F, 0F, 0F); - Shape8 = new ModelRenderer(this, 0, 52); - Shape8.addBox(-2F, 0F, -2F, 4, 8, 4); - Shape8.setRotationPoint(6F, -2F, 3F); - Shape8.setTextureSize(64, 64); - Shape8.mirror = true; - setRotation(Shape8, 1.22173F, 0F, 0F); - Shape9 = new ModelRenderer(this, 16, 52); - Shape9.addBox(0F, 0F, -2F, 4, 8, 4); - Shape9.setRotationPoint(-8F, -1F, -0.5F); - Shape9.setTextureSize(64, 64); - Shape9.mirror = true; - setRotation(Shape9, 0.2617994F, 0F, 0F); - Shape10 = new ModelRenderer(this, 32, 24); - Shape10.addBox(-4F, -8F, -4F, 8, 8, 8); - Shape10.setRotationPoint(0F, -8F, 0F); - Shape10.setTextureSize(64, 64); - Shape10.mirror = true; - setRotation(Shape10, -0.1745329F, 0F, 0F); - } - - @Override -public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape6.render(f5); - Shape7.render(f5); - Shape8.render(f5); - Shape9.render(f5); - Shape10.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override -public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } +public class ModelStatue extends ModelBase { - public void renderModel(float f) { - Shape1.render(f); - Shape2.render(f); - Shape3.render(f); - Shape4.render(f); - Shape6.render(f); - Shape7.render(f); - Shape8.render(f); - Shape9.render(f); - Shape10.render(f); - } + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape6; + ModelRenderer Shape7; + ModelRenderer Shape8; + ModelRenderer Shape9; + ModelRenderer Shape10; + public ModelStatue() { + this.textureWidth = 64; + this.textureHeight = 64; + + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 16, 8, 16); + this.Shape1.setRotationPoint(-8F, 16F, -8F); + this.Shape1.setTextureSize(64, 64); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + this.Shape2 = new ModelRenderer(this, 0, 24); + this.Shape2.addBox(0F, 0F, 0F, 4, 12, 4); + this.Shape2.setRotationPoint(-4F, 4F, -2F); + this.Shape2.setTextureSize(64, 64); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + this.Shape3 = new ModelRenderer(this, 16, 24); + this.Shape3.addBox(0F, 0F, 0F, 4, 12, 4); + this.Shape3.setRotationPoint(0F, 4F, -2F); + this.Shape3.setTextureSize(64, 64); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0F, 0F, 0F); + this.Shape4 = new ModelRenderer(this, 32, 40); + this.Shape4.addBox(0F, 0F, 0F, 8, 12, 4); + this.Shape4.setRotationPoint(-4F, -8F, -2F); + this.Shape4.setTextureSize(64, 64); + this.Shape4.mirror = true; + setRotation(this.Shape4, 0F, 0F, 0F); + this.Shape6 = new ModelRenderer(this, 0, 40); + this.Shape6.addBox(0F, 0F, -2F, 4, 8, 4); + this.Shape6.setRotationPoint(4F, -8F, 0F); + this.Shape6.setTextureSize(64, 64); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0.5235988F, 0F, 0F); + this.Shape7 = new ModelRenderer(this, 16, 40); + this.Shape7.addBox(-4F, 0F, -2F, 4, 8, 4); + this.Shape7.setRotationPoint(-4F, -8F, 0F); + this.Shape7.setTextureSize(64, 64); + this.Shape7.mirror = true; + setRotation(this.Shape7, -0.0872665F, 0F, 0F); + this.Shape8 = new ModelRenderer(this, 0, 52); + this.Shape8.addBox(-2F, 0F, -2F, 4, 8, 4); + this.Shape8.setRotationPoint(6F, -2F, 3F); + this.Shape8.setTextureSize(64, 64); + this.Shape8.mirror = true; + setRotation(this.Shape8, 1.22173F, 0F, 0F); + this.Shape9 = new ModelRenderer(this, 16, 52); + this.Shape9.addBox(0F, 0F, -2F, 4, 8, 4); + this.Shape9.setRotationPoint(-8F, -1F, -0.5F); + this.Shape9.setTextureSize(64, 64); + this.Shape9.mirror = true; + setRotation(this.Shape9, 0.2617994F, 0F, 0F); + this.Shape10 = new ModelRenderer(this, 32, 24); + this.Shape10.addBox(-4F, -8F, -4F, 8, 8, 8); + this.Shape10.setRotationPoint(0F, -8F, 0F); + this.Shape10.setTextureSize(64, 64); + this.Shape10.mirror = true; + setRotation(this.Shape10, -0.1745329F, 0F, 0F); + } + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderModel(scaleFactor); + } + + public void renderModel(float scaleFactor) { + + this.Shape1.render(scaleFactor); + this.Shape2.render(scaleFactor); + this.Shape3.render(scaleFactor); + this.Shape4.render(scaleFactor); + this.Shape6.render(scaleFactor); + this.Shape7.render(scaleFactor); + this.Shape8.render(scaleFactor); + this.Shape9.render(scaleFactor); + this.Shape10.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelSteelRoof.java b/src/main/java/com/hbm/render/model/ModelSteelRoof.java index f0263e805..4e51eb982 100644 --- a/src/main/java/com/hbm/render/model/ModelSteelRoof.java +++ b/src/main/java/com/hbm/render/model/ModelSteelRoof.java @@ -4,77 +4,59 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX - - - - - package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelSteelRoof extends ModelBase -{ - //fields - ModelRenderer Shape1; - ModelRenderer Shape2; - ModelRenderer Shape3; - - public ModelSteelRoof() - { - textureWidth = 64; - textureHeight = 32; - - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 16, 1, 16); - Shape1.setRotationPoint(-8F, 23F, -8F); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 30, 15); - Shape2.addBox(0F, 0F, 0F, 1, 1, 16); - Shape2.setRotationPoint(-3F, 22F, -8F); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 0, 17); - Shape3.addBox(0F, 0F, 0F, 16, 2, 2); - Shape3.setRotationPoint(-8F, 21F, 2F); - Shape3.setTextureSize(64, 32); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - } - - @Override -public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void renderModel(float f) - { - Shape1.render(f); - Shape2.render(f); - Shape3.render(f); - } - - @Override -public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } +public class ModelSteelRoof extends ModelBase { + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + + public ModelSteelRoof() { + this.textureWidth = 64; + this.textureHeight = 32; + + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 16, 1, 16); + this.Shape1.setRotationPoint(-8F, 23F, -8F); + this.Shape1.setTextureSize(64, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + this.Shape2 = new ModelRenderer(this, 30, 15); + this.Shape2.addBox(0F, 0F, 0F, 1, 1, 16); + this.Shape2.setRotationPoint(-3F, 22F, -8F); + this.Shape2.setTextureSize(64, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + this.Shape3 = new ModelRenderer(this, 0, 17); + this.Shape3.addBox(0F, 0F, 0F, 16, 2, 2); + this.Shape3.setRotationPoint(-8F, 21F, 2F); + this.Shape3.setTextureSize(64, 32); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0F, 0F, 0F); + } + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderModel(scaleFactor); + } + + public void renderModel(float scaleFactor) { + + this.Shape1.render(scaleFactor); + this.Shape2.render(scaleFactor); + this.Shape3.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelStinger.java b/src/main/java/com/hbm/render/model/ModelStinger.java index a56c12805..c3cb2b7b7 100644 --- a/src/main/java/com/hbm/render/model/ModelStinger.java +++ b/src/main/java/com/hbm/render/model/ModelStinger.java @@ -13,7 +13,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelStinger extends ModelBase { - // fields + ModelRenderer B1; ModelRenderer B2; ModelRenderer B3; @@ -33,146 +33,141 @@ public class ModelStinger extends ModelBase { ModelRenderer E4; public ModelStinger() { - textureWidth = 128; - textureHeight = 64; + this.textureWidth = 128; + this.textureHeight = 64; - B1 = new ModelRenderer(this, 0, 0); - B1.addBox(0F, 0F, 0F, 52, 4, 2); - B1.setRotationPoint(-26F, 0F, -1F); - B1.setTextureSize(128, 64); - B1.mirror = true; - setRotation(B1, 0F, 0F, 0F); - B2 = new ModelRenderer(this, 0, 6); - B2.addBox(0F, 0F, 0F, 52, 2, 4); - B2.setRotationPoint(-26F, 1F, -2F); - B2.setTextureSize(128, 64); - B2.mirror = true; - setRotation(B2, 0F, 0F, 0F); - B3 = new ModelRenderer(this, 0, 12); - B3.addBox(0F, 0F, 0F, 52, 3, 3); - B3.setRotationPoint(-26F, 0.5F, -1.5F); - B3.setTextureSize(128, 64); - B3.mirror = true; - setRotation(B3, 0F, 0F, 0F); - E1 = new ModelRenderer(this, 0, 18); - E1.addBox(0F, 0F, 0F, 2, 6, 3); - E1.setRotationPoint(26F, -1F, -1.5F); - E1.setTextureSize(128, 64); - E1.mirror = true; - setRotation(E1, 0F, 0F, 0F); - E2 = new ModelRenderer(this, 10, 18); - E2.addBox(0F, 0F, 0F, 2, 3, 6); - E2.setRotationPoint(26F, 0.5F, -3F); - E2.setTextureSize(128, 64); - E2.mirror = true; - setRotation(E2, 0F, 0F, 0F); - E3 = new ModelRenderer(this, 26, 18); - E3.addBox(0F, 0F, 0F, 2, 5, 5); - E3.setRotationPoint(26F, -0.5F, -2.5F); - E3.setTextureSize(128, 64); - E3.mirror = true; - setRotation(E3, 0F, 0F, 0F); - F1 = new ModelRenderer(this, 0, 27); - F1.addBox(0F, 0F, 0F, 4, 5, 5); - F1.setRotationPoint(-30F, -0.5F, -2.5F); - F1.setTextureSize(128, 64); - F1.mirror = true; - setRotation(F1, 0F, 0F, 0F); - F2 = new ModelRenderer(this, 0, 37); - F2.addBox(0F, 0F, 0F, 4, 6, 3); - F2.setRotationPoint(-30F, -1F, -1.5F); - F2.setTextureSize(128, 64); - F2.mirror = true; - setRotation(F2, 0F, 0F, 0F); - F3 = new ModelRenderer(this, 14, 37); - F3.addBox(0F, 0F, 0F, 4, 3, 6); - F3.setRotationPoint(-30F, 0.5F, -3F); - F3.setTextureSize(128, 64); - F3.mirror = true; - setRotation(F3, 0F, 0F, 0F); - D1 = new ModelRenderer(this, 0, 46); - D1.addBox(0F, 0F, 0F, 16, 8, 3); - D1.setRotationPoint(-25F, 4F, -1F); - D1.setTextureSize(128, 64); - D1.mirror = true; - setRotation(D1, 0F, 0F, 0F); - D2 = new ModelRenderer(this, 38, 46); - D2.addBox(0F, 0F, 0F, 12, 8, 1); - D2.setRotationPoint(-21F, 4F, -2F); - D2.setTextureSize(128, 64); - D2.mirror = true; - setRotation(D2, 0F, 0F, 0F); - D3 = new ModelRenderer(this, 34, 38); - D3.addBox(0F, 0F, 0F, 16, 6, 2); - D3.setRotationPoint(-21F, 0.5F, -4F); - D3.setTextureSize(128, 64); - D3.mirror = true; - setRotation(D3, 0F, 0F, 0F); - F = new ModelRenderer(this, 40, 18); - F.addBox(0F, 0F, 0F, 12, 8, 5); - F.setRotationPoint(-25F, -8F, -2.5F); - F.setTextureSize(128, 64); - F.mirror = true; - setRotation(F, 0F, 0F, 0F); - H1 = new ModelRenderer(this, 18, 27); - H1.addBox(0F, 0F, 0F, 2, 7, 1); - H1.setRotationPoint(-4F, 4F, -0.5F); - H1.setTextureSize(128, 64); - H1.mirror = true; + this.B1 = new ModelRenderer(this, 0, 0); + this.B1.addBox(0F, 0F, 0F, 52, 4, 2); + this.B1.setRotationPoint(-26F, 0F, -1F); + this.B1.setTextureSize(128, 64); + this.B1.mirror = true; + setRotation(this.B1, 0F, 0F, 0F); + this.B2 = new ModelRenderer(this, 0, 6); + this.B2.addBox(0F, 0F, 0F, 52, 2, 4); + this.B2.setRotationPoint(-26F, 1F, -2F); + this.B2.setTextureSize(128, 64); + this.B2.mirror = true; + setRotation(this.B2, 0F, 0F, 0F); + this.B3 = new ModelRenderer(this, 0, 12); + this.B3.addBox(0F, 0F, 0F, 52, 3, 3); + this.B3.setRotationPoint(-26F, 0.5F, -1.5F); + this.B3.setTextureSize(128, 64); + this.B3.mirror = true; + setRotation(this.B3, 0F, 0F, 0F); + this.E1 = new ModelRenderer(this, 0, 18); + this.E1.addBox(0F, 0F, 0F, 2, 6, 3); + this.E1.setRotationPoint(26F, -1F, -1.5F); + this.E1.setTextureSize(128, 64); + this.E1.mirror = true; + setRotation(this.E1, 0F, 0F, 0F); + this.E2 = new ModelRenderer(this, 10, 18); + this.E2.addBox(0F, 0F, 0F, 2, 3, 6); + this.E2.setRotationPoint(26F, 0.5F, -3F); + this.E2.setTextureSize(128, 64); + this.E2.mirror = true; + setRotation(this.E2, 0F, 0F, 0F); + this.E3 = new ModelRenderer(this, 26, 18); + this.E3.addBox(0F, 0F, 0F, 2, 5, 5); + this.E3.setRotationPoint(26F, -0.5F, -2.5F); + this.E3.setTextureSize(128, 64); + this.E3.mirror = true; + setRotation(this.E3, 0F, 0F, 0F); + this.F1 = new ModelRenderer(this, 0, 27); + this.F1.addBox(0F, 0F, 0F, 4, 5, 5); + this.F1.setRotationPoint(-30F, -0.5F, -2.5F); + this.F1.setTextureSize(128, 64); + this.F1.mirror = true; + setRotation(this.F1, 0F, 0F, 0F); + this.F2 = new ModelRenderer(this, 0, 37); + this.F2.addBox(0F, 0F, 0F, 4, 6, 3); + this.F2.setRotationPoint(-30F, -1F, -1.5F); + this.F2.setTextureSize(128, 64); + this.F2.mirror = true; + setRotation(this.F2, 0F, 0F, 0F); + this.F3 = new ModelRenderer(this, 14, 37); + this.F3.addBox(0F, 0F, 0F, 4, 3, 6); + this.F3.setRotationPoint(-30F, 0.5F, -3F); + this.F3.setTextureSize(128, 64); + this.F3.mirror = true; + setRotation(this.F3, 0F, 0F, 0F); + this.D1 = new ModelRenderer(this, 0, 46); + this.D1.addBox(0F, 0F, 0F, 16, 8, 3); + this.D1.setRotationPoint(-25F, 4F, -1F); + this.D1.setTextureSize(128, 64); + this.D1.mirror = true; + setRotation(this.D1, 0F, 0F, 0F); + this.D2 = new ModelRenderer(this, 38, 46); + this.D2.addBox(0F, 0F, 0F, 12, 8, 1); + this.D2.setRotationPoint(-21F, 4F, -2F); + this.D2.setTextureSize(128, 64); + this.D2.mirror = true; + setRotation(this.D2, 0F, 0F, 0F); + this.D3 = new ModelRenderer(this, 34, 38); + this.D3.addBox(0F, 0F, 0F, 16, 6, 2); + this.D3.setRotationPoint(-21F, 0.5F, -4F); + this.D3.setTextureSize(128, 64); + this.D3.mirror = true; + setRotation(this.D3, 0F, 0F, 0F); + this.F = new ModelRenderer(this, 40, 18); + this.F.addBox(0F, 0F, 0F, 12, 8, 5); + this.F.setRotationPoint(-25F, -8F, -2.5F); + this.F.setTextureSize(128, 64); + this.F.mirror = true; + setRotation(this.F, 0F, 0F, 0F); + this.H1 = new ModelRenderer(this, 18, 27); + this.H1.addBox(0F, 0F, 0F, 2, 7, 1); + this.H1.setRotationPoint(-4F, 4F, -0.5F); + this.H1.setTextureSize(128, 64); + this.H1.mirror = true; //setRotation(H1, 0F, 0F, -0.2617994F); - setRotation(H1, 0F, 0F, 0F); - H2 = new ModelRenderer(this, 24, 31); - H2.addBox(0F, 0F, 0F, 8, 1, 2); - H2.setRotationPoint(-9F, 4F, -1F); - H2.setTextureSize(128, 64); - H2.mirror = true; - setRotation(H2, 0F, 0F, 0F); - H3 = new ModelRenderer(this, 44, 31); - H3.addBox(0F, 0F, 0F, 2, 3, 2); - H3.setRotationPoint(-12F, 12F, -1F); - H3.setTextureSize(128, 64); - H3.mirror = true; - setRotation(H3, 0F, 0F, 0F); - E4 = new ModelRenderer(this, 38, 55); - E4.addBox(0F, 0F, 0F, 8, 6, 2); - E4.setRotationPoint(16F, -1F, -4F); - E4.setTextureSize(128, 64); - E4.mirror = true; - setRotation(E4, 0F, 0F, 0F); + setRotation(this.H1, 0F, 0F, 0F); + this.H2 = new ModelRenderer(this, 24, 31); + this.H2.addBox(0F, 0F, 0F, 8, 1, 2); + this.H2.setRotationPoint(-9F, 4F, -1F); + this.H2.setTextureSize(128, 64); + this.H2.mirror = true; + setRotation(this.H2, 0F, 0F, 0F); + this.H3 = new ModelRenderer(this, 44, 31); + this.H3.addBox(0F, 0F, 0F, 2, 3, 2); + this.H3.setRotationPoint(-12F, 12F, -1F); + this.H3.setTextureSize(128, 64); + this.H3.mirror = true; + setRotation(this.H3, 0F, 0F, 0F); + this.E4 = new ModelRenderer(this, 38, 55); + this.E4.addBox(0F, 0F, 0F, 8, 6, 2); + this.E4.setRotationPoint(16F, -1F, -4F); + this.E4.setTextureSize(128, 64); + this.E4.mirror = true; + setRotation(this.E4, 0F, 0F, 0F); } - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - B1.render(f5); - B2.render(f5); - B3.render(f5); - E1.render(f5); - E2.render(f5); - E3.render(f5); - F1.render(f5); - F2.render(f5); - F3.render(f5); - D1.render(f5); - D2.render(f5); - D3.render(f5); + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.B1.render(scaleFactor); + this.B2.render(scaleFactor); + this.B3.render(scaleFactor); + this.E1.render(scaleFactor); + this.E2.render(scaleFactor); + this.E3.render(scaleFactor); + this.F1.render(scaleFactor); + this.F2.render(scaleFactor); + this.F3.render(scaleFactor); + this.D1.render(scaleFactor); + this.D2.render(scaleFactor); + this.D3.render(scaleFactor); GL11.glDisable(GL11.GL_CULL_FACE); - F.render(f5); + this.F.render(scaleFactor); GL11.glEnable(GL11.GL_CULL_FACE); - H1.render(f5); - H2.render(f5); - H3.render(f5); - E4.render(f5); + this.H1.render(scaleFactor); + this.H2.render(scaleFactor); + this.H3.render(scaleFactor); + this.E4.render(scaleFactor); } - private void setRotation(ModelRenderer model, float x, float y, float z) { + private static void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - } diff --git a/src/main/java/com/hbm/render/model/ModelSword.java b/src/main/java/com/hbm/render/model/ModelSword.java index 19d4e7c62..1832f4b97 100644 --- a/src/main/java/com/hbm/render/model/ModelSword.java +++ b/src/main/java/com/hbm/render/model/ModelSword.java @@ -4,102 +4,85 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX - - - - - package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelSword extends ModelBase -{ - //fields - ModelRenderer GripBottom; - ModelRenderer GripHandle; - ModelRenderer Shield; - ModelRenderer Blade; - ModelRenderer BladeTip; - ModelRenderer Shield1; - ModelRenderer Shield2; - - public ModelSword() - { - textureWidth = 64; - textureHeight = 32; - - GripBottom = new ModelRenderer(this, 0, 17); - GripBottom.addBox(0F, 0F, 0F, 3, 3, 1); - GripBottom.setRotationPoint(0F, 0F, 0F); - GripBottom.setTextureSize(64, 32); - GripBottom.mirror = true; - setRotation(GripBottom, 0F, 0F, 0F); - GripHandle = new ModelRenderer(this, 8, 2); - GripHandle.addBox(0F, 0F, 0F, 2, 5, 1); - GripHandle.setRotationPoint(0.5F, -5F, 0F); - GripHandle.setTextureSize(64, 32); - GripHandle.mirror = true; - setRotation(GripHandle, 0F, 0F, 0F); - Shield = new ModelRenderer(this, 14, 5); - Shield.addBox(0F, 0F, 0F, 6, 1, 3); - Shield.setRotationPoint(-1.5F, -6F, -1F); - Shield.setTextureSize(64, 32); - Shield.mirror = true; - setRotation(Shield, 0F, 0F, 0F); - Blade = new ModelRenderer(this, 0, 0); - Blade.addBox(0F, 0F, 0F, 3, 16, 1); - Blade.setRotationPoint(0F, -22F, 0F); - Blade.setTextureSize(64, 32); - Blade.mirror = true; - setRotation(Blade, 0F, 0F, 0F); - BladeTip = new ModelRenderer(this, 8, 0); - BladeTip.addBox(0F, 0F, 0F, 2, 1, 1); - BladeTip.setRotationPoint(0.5F, -23F, 0F); - BladeTip.setTextureSize(64, 32); - BladeTip.mirror = true; - setRotation(BladeTip, 0F, 0F, 0F); - Shield1 = new ModelRenderer(this, 14, 0); - Shield1.addBox(0F, 0F, 0F, 1, 1, 4); - Shield1.setRotationPoint(-2F, -6.5F, -1.5F); - Shield1.setTextureSize(64, 32); - Shield1.mirror = true; - setRotation(Shield1, 0F, 0F, 0F); - Shield2 = new ModelRenderer(this, 24, 0); - Shield2.addBox(0F, 0F, 0F, 1, 1, 4); - Shield2.setRotationPoint(4F, -6.5F, -1.5F); - Shield2.setTextureSize(64, 32); - Shield2.mirror = true; - setRotation(Shield2, 0F, 0F, 0F); - } - - @Override -public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - GripBottom.render(f5); - GripHandle.render(f5); - Shield.render(f5); - Blade.render(f5); - BladeTip.render(f5); - Shield1.render(f5); - Shield2.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override -public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } +public class ModelSword extends ModelBase { + ModelRenderer GripBottom; + ModelRenderer GripHandle; + ModelRenderer Shield; + ModelRenderer Blade; + ModelRenderer BladeTip; + ModelRenderer Shield1; + ModelRenderer Shield2; + + public ModelSword() { + this.textureWidth = 64; + this.textureHeight = 32; + + this.GripBottom = new ModelRenderer(this, 0, 17); + this.GripBottom.addBox(0F, 0F, 0F, 3, 3, 1); + this.GripBottom.setRotationPoint(0F, 0F, 0F); + this.GripBottom.setTextureSize(64, 32); + this.GripBottom.mirror = true; + setRotation(this.GripBottom, 0F, 0F, 0F); + this.GripHandle = new ModelRenderer(this, 8, 2); + this.GripHandle.addBox(0F, 0F, 0F, 2, 5, 1); + this.GripHandle.setRotationPoint(0.5F, -5F, 0F); + this.GripHandle.setTextureSize(64, 32); + this.GripHandle.mirror = true; + setRotation(this.GripHandle, 0F, 0F, 0F); + this.Shield = new ModelRenderer(this, 14, 5); + this.Shield.addBox(0F, 0F, 0F, 6, 1, 3); + this.Shield.setRotationPoint(-1.5F, -6F, -1F); + this.Shield.setTextureSize(64, 32); + this.Shield.mirror = true; + setRotation(this.Shield, 0F, 0F, 0F); + this.Blade = new ModelRenderer(this, 0, 0); + this.Blade.addBox(0F, 0F, 0F, 3, 16, 1); + this.Blade.setRotationPoint(0F, -22F, 0F); + this.Blade.setTextureSize(64, 32); + this.Blade.mirror = true; + setRotation(this.Blade, 0F, 0F, 0F); + this.BladeTip = new ModelRenderer(this, 8, 0); + this.BladeTip.addBox(0F, 0F, 0F, 2, 1, 1); + this.BladeTip.setRotationPoint(0.5F, -23F, 0F); + this.BladeTip.setTextureSize(64, 32); + this.BladeTip.mirror = true; + setRotation(this.BladeTip, 0F, 0F, 0F); + this.Shield1 = new ModelRenderer(this, 14, 0); + this.Shield1.addBox(0F, 0F, 0F, 1, 1, 4); + this.Shield1.setRotationPoint(-2F, -6.5F, -1.5F); + this.Shield1.setTextureSize(64, 32); + this.Shield1.mirror = true; + setRotation(this.Shield1, 0F, 0F, 0F); + this.Shield2 = new ModelRenderer(this, 24, 0); + this.Shield2.addBox(0F, 0F, 0F, 1, 1, 4); + this.Shield2.setRotationPoint(4F, -6.5F, -1.5F); + this.Shield2.setTextureSize(64, 32); + this.Shield2.mirror = true; + setRotation(this.Shield2, 0F, 0F, 0F); + } + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.GripBottom.render(scaleFactor); + this.GripHandle.render(scaleFactor); + this.Shield.render(scaleFactor); + this.Blade.render(scaleFactor); + this.BladeTip.render(scaleFactor); + this.Shield1.render(scaleFactor); + this.Shield2.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelT45Boots.java b/src/main/java/com/hbm/render/model/ModelT45Boots.java index 57a9e5e55..fc3e1f4c3 100644 --- a/src/main/java/com/hbm/render/model/ModelT45Boots.java +++ b/src/main/java/com/hbm/render/model/ModelT45Boots.java @@ -13,7 +13,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelT45Boots extends ModelBiped { - // fields + ModelRenderer leftleg; ModelRenderer rightleg; ModelRenderer Shape1; @@ -22,61 +22,49 @@ public class ModelT45Boots extends ModelBiped { ModelRenderer Shape4; public ModelT45Boots() { - textureWidth = 64; - textureHeight = 32; + this.textureWidth = 64; + this.textureHeight = 32; - leftleg = new ModelRenderer(this, 0, 0); - rightleg = new ModelRenderer(this, 0, 0); - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 4, 2, 6); - Shape1.setRotationPoint(-4F + 2, 0F + 9.5F, -4F); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - convertToChild(leftleg, Shape1); - Shape2 = new ModelRenderer(this, 0, 8); - Shape2.addBox(0F, 0F, 0F, 4, 2, 6); - Shape2.setRotationPoint(0F - 2, 0F + 9.5F, -4F); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - convertToChild(rightleg, Shape2); - Shape3 = new ModelRenderer(this, 0, 16); - Shape3.addBox(0F, -1F, 0F, 4, 2, 4); - Shape3.setRotationPoint(-4F + 2, 0F + 9.5F, -4F); - Shape3.setTextureSize(64, 32); - Shape3.mirror = true; - setRotation(Shape3, 0.2617994F, 0F, 0F); - convertToChild(leftleg, Shape3); - Shape4 = new ModelRenderer(this, 0, 22); - Shape4.addBox(0F, -1F, 0F, 4, 2, 4); - Shape4.setRotationPoint(0F - 2, 0F + 9.5F, -4F); - Shape4.setTextureSize(64, 32); - Shape4.mirror = true; - setRotation(Shape4, 0.2617994F, 0F, 0F); - convertToChild(rightleg, Shape4); - } - - /* - * public void render(Entity entity, float f, float f1, float f2, float f3, - * float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); - * setRotationAngles(f, f1, f2, f3, f4, f5); Shape1.render(f5); - * Shape2.render(f5); Shape3.render(f5); Shape4.render(f5); } - */ - - private void setRotation(ModelRenderer model, float x, float y, float z) { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; + this.leftleg = new ModelRenderer(this, 0, 0); + this.rightleg = new ModelRenderer(this, 0, 0); + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 4, 2, 6); + this.Shape1.setRotationPoint(-4F + 2, 0F + 9.5F, -4F); + this.Shape1.setTextureSize(64, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + convertToChild(this.leftleg, this.Shape1); + this.Shape2 = new ModelRenderer(this, 0, 8); + this.Shape2.addBox(0F, 0F, 0F, 4, 2, 6); + this.Shape2.setRotationPoint(0F - 2, 0F + 9.5F, -4F); + this.Shape2.setTextureSize(64, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + convertToChild(this.rightleg, this.Shape2); + this.Shape3 = new ModelRenderer(this, 0, 16); + this.Shape3.addBox(0F, -1F, 0F, 4, 2, 4); + this.Shape3.setRotationPoint(-4F + 2, 0F + 9.5F, -4F); + this.Shape3.setTextureSize(64, 32); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0.2617994F, 0F, 0F); + convertToChild(this.leftleg, this.Shape3); + this.Shape4 = new ModelRenderer(this, 0, 22); + this.Shape4.addBox(0F, -1F, 0F, 4, 2, 4); + this.Shape4.setRotationPoint(0F - 2, 0F + 9.5F, -4F); + this.Shape4.setTextureSize(64, 32); + this.Shape4.mirror = true; + setRotation(this.Shape4, 0.2617994F, 0F, 0F); + convertToChild(this.rightleg, this.Shape4); } @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { this.isSneak = entity.isSneaking(); this.isRiding = entity.isRiding(); - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.leftleg.rotationPointX = this.bipedLeftLeg.rotationPointX; this.leftleg.rotationPointY = this.bipedLeftLeg.rotationPointY - 1.5F; this.leftleg.rotationPointZ = this.bipedLeftLeg.rotationPointZ; @@ -99,31 +87,40 @@ public class ModelT45Boots extends ModelBiped { } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + GL11.glPushMatrix(); GL11.glScalef(1.125F, 1.125F, 1.125F); // this.leftleg.addChild(Shape1); // this.leftleg.addChild(Shape3); - this.leftleg.render(par7); + this.leftleg.render(scaleFactor); // this.rightleg.addChild(Shape2); // this.rightleg.addChild(Shape4); - this.rightleg.render(par7); + this.rightleg.render(scaleFactor); GL11.glPopMatrix(); } - protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) { + protected static void convertToChild(ModelRenderer parent, ModelRenderer child) { + // move child rotation point to be relative to parent - parChild.rotationPointX -= parParent.rotationPointX; - parChild.rotationPointY -= parParent.rotationPointY; - parChild.rotationPointZ -= parParent.rotationPointZ; + child.rotationPointX -= parent.rotationPointX; + child.rotationPointY -= parent.rotationPointY; + child.rotationPointZ -= parent.rotationPointZ; // make rotations relative to parent - parChild.rotateAngleX -= parParent.rotateAngleX; - parChild.rotateAngleY -= parParent.rotateAngleY; - parChild.rotateAngleZ -= parParent.rotateAngleZ; + child.rotateAngleX -= parent.rotateAngleX; + child.rotateAngleY -= parent.rotateAngleY; + child.rotateAngleZ -= parent.rotateAngleZ; // create relationship - parParent.addChild(parChild); + parent.addChild(child); } + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelT45Chest.java b/src/main/java/com/hbm/render/model/ModelT45Chest.java index 1935cf7b8..037ae3cb8 100644 --- a/src/main/java/com/hbm/render/model/ModelT45Chest.java +++ b/src/main/java/com/hbm/render/model/ModelT45Chest.java @@ -14,7 +14,6 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -import net.minecraft.entity.monster.EntityPigZombie; import net.minecraft.entity.monster.EntitySkeleton; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.player.EntityPlayer; @@ -22,7 +21,7 @@ import net.minecraft.item.EnumAction; import net.minecraft.item.ItemStack; public class ModelT45Chest extends ModelBiped { - // fields + ModelRenderer chest; ModelRenderer leftarm; ModelRenderer rightarm; @@ -47,179 +46,161 @@ public class ModelT45Chest extends ModelBiped { ModelRenderer Shape19; public ModelT45Chest() { - textureWidth = 128; - textureHeight = 64; + this.textureWidth = 128; + this.textureHeight = 64; - chest = new ModelRenderer(this, 0, 0); - leftarm = new ModelRenderer(this, 0, 0); - rightarm = new ModelRenderer(this, 0, 0); - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 8, 12, 4); - Shape1.setRotationPoint(-4F, 0F - 0.0625F / 2, -2F); - Shape1.setTextureSize(128, 64); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - convertToChild(chest, Shape1); - Shape2 = new ModelRenderer(this, 0, 16); - Shape2.addBox(0F, 0F, 0F, 7, 5, 2); - Shape2.setRotationPoint(-3.5F, 2F - 0.0625F / 2, -3.5F); - Shape2.setTextureSize(128, 64); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - convertToChild(chest, Shape2); - Shape3 = new ModelRenderer(this, 0, 23); - Shape3.addBox(0F, 0F, 0F, 1, 1, 1); - Shape3.setRotationPoint(-2.5F, 7F - 0.0625F / 2, -3F); - Shape3.setTextureSize(128, 64); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - convertToChild(chest, Shape3); - Shape4 = new ModelRenderer(this, 0, 25); - Shape4.addBox(0F, 0F, 0F, 1, 1, 1); - Shape4.setRotationPoint(1.5F, 7F - 0.0625F / 2, -3F); - Shape4.setTextureSize(128, 64); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); - convertToChild(chest, Shape4); - Shape5 = new ModelRenderer(this, 0, 28); - Shape5.addBox(0F, -2F, 0F, 7, 2, 2); - Shape5.setRotationPoint(-3.5F, 2F - 0.0625F / 2, -3.5F); - Shape5.setTextureSize(128, 64); - Shape5.mirror = true; - setRotation(Shape5, -0.6108652F, 0F, 0F); - convertToChild(chest, Shape5); - Shape6 = new ModelRenderer(this, 48, 0); - Shape6.addBox(0F, 0F, 0F, 4, 12, 4); - Shape6.setRotationPoint(4F - 6 + 0.25F, 0F - 3, -2F); - Shape6.setTextureSize(128, 64); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - convertToChild(leftarm, Shape6); - Shape7 = new ModelRenderer(this, 32, 0); - Shape7.addBox(0F, 0F, 0F, 4, 12, 4); - Shape7.setRotationPoint(-8F + 6 - 0.25F, 0F - 3, -2F); - Shape7.setTextureSize(128, 64); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0F); - convertToChild(rightarm, Shape7); - Shape8 = new ModelRenderer(this, 32, 16); - Shape8.addBox(0F, 0F, 0F, 5, 6, 6); - Shape8.setRotationPoint(4F - 6 + 0.25F, 4F - 3, -3F); - Shape8.setTextureSize(128, 64); - Shape8.mirror = true; - setRotation(Shape8, 0F, 0F, 0F); - convertToChild(leftarm, Shape8); - Shape9 = new ModelRenderer(this, 0, 34); - Shape9.addBox(0F, 0F, 0F, 5, 6, 6); - Shape9.setRotationPoint(-9F + 6 - 0.25F, 4F - 3, -3F); - Shape9.setTextureSize(128, 64); - Shape9.mirror = true; - setRotation(Shape9, 0F, 0F, 0F); - convertToChild(rightarm, Shape9); - Shape10 = new ModelRenderer(this, 32, 30); - Shape10.addBox(0F, 0F, 0F, 2, 6, 2); - Shape10.setRotationPoint(1F, 4F - 0.0625F / 2, 2F); - Shape10.setTextureSize(128, 64); - Shape10.mirror = true; - setRotation(Shape10, 0F, 0F, 0F); - convertToChild(chest, Shape10); - Shape11 = new ModelRenderer(this, 42, 30); - Shape11.addBox(0F, 0F, 0F, 2, 6, 2); - Shape11.setRotationPoint(-3F, 4F - 0.0625F / 2, 2F); - Shape11.setTextureSize(128, 64); - Shape11.mirror = true; - setRotation(Shape11, 0F, 0F, 0F); - convertToChild(chest, Shape11); - Shape12 = new ModelRenderer(this, 26, 9); - Shape12.addBox(0F, 0F, 0F, 1, 6, 1); - Shape12.setRotationPoint(1.5F, -2F - 0.0625F / 2, 2F); - Shape12.setTextureSize(128, 64); - Shape12.mirror = true; - setRotation(Shape12, 0F, 0F, 0F); - convertToChild(chest, Shape12); - Shape13 = new ModelRenderer(this, 26, 0); - Shape13.addBox(0F, 0F, 0F, 1, 6, 1); - Shape13.setRotationPoint(-2.5F, -2F - 0.0625F / 2, 2F); - Shape13.setTextureSize(128, 64); - Shape13.mirror = true; - setRotation(Shape13, 0F, 0F, 0F); - convertToChild(chest, Shape13); - Shape14 = new ModelRenderer(this, 20, 18); - Shape14.addBox(0F, 0F, 0F, 2, 2, 1); - Shape14.setRotationPoint(-1F, 1F - 0.0625F / 2, 2F); - Shape14.setTextureSize(128, 64); - Shape14.mirror = true; - setRotation(Shape14, 0F, 0F, 0F); - convertToChild(chest, Shape14); - Shape15 = new ModelRenderer(this, 21, 23); - Shape15.addBox(-1.5F, -1.5F, 0F, 3, 3, 1); - Shape15.setRotationPoint(0F, 2F - 0.0625F / 2, 3F); - Shape15.setTextureSize(128, 64); - Shape15.mirror = true; - setRotation(Shape15, 0F, 0F, 0.7853982F); - convertToChild(chest, Shape15); - Shape16 = new ModelRenderer(this, 0, 48); - Shape16.addBox(0F, -1F, 0F, 3, 1, 4); - Shape16.setRotationPoint(-8F + 6 - 0.25F, 12F - 3, -2F); - Shape16.setTextureSize(128, 64); - Shape16.mirror = true; - setRotation(Shape16, 0F, 0F, 0.5235988F); - convertToChild(rightarm, Shape16); - Shape17 = new ModelRenderer(this, 0, 55); - Shape17.addBox(-3F, -1F, 0F, 3, 1, 4); - Shape17.setRotationPoint(8F - 6 + 0.25F, 12F - 3, -2F); - Shape17.setTextureSize(128, 64); - Shape17.mirror = true; - setRotation(Shape17, 0F, 0F, -0.5235988F); - convertToChild(leftarm, Shape17); - Shape18 = new ModelRenderer(this, 90, 0); - Shape18.addBox(0F, -3F, 0F, 5, 3, 6); - Shape18.setRotationPoint(4F - 6 + 0.25F, 0F - 3, -3F); - Shape18.setTextureSize(128, 64); - Shape18.mirror = true; - setRotation(Shape18, 0F, 0F, 0.2617994F); - convertToChild(leftarm, Shape18); - Shape19 = new ModelRenderer(this, 66, 0); - Shape19.addBox(-5F, -3F, 0F, 5, 3, 6); - Shape19.setRotationPoint(-4F + 6 - 0.25F, 0F - 3, -3F); - Shape19.setTextureSize(128, 64); - Shape19.mirror = true; - setRotation(Shape19, 0F, 0F, -0.2617994F); - convertToChild(rightarm, Shape19); - } - - /* - * public void render(Entity entity, float f, float f1, float f2, float f3, - * float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); - * setRotationAngles(f, f1, f2, f3, f4, f5); Shape1.render(f5); - * Shape2.render(f5); Shape3.render(f5); Shape4.render(f5); - * Shape5.render(f5); Shape6.render(f5); Shape7.render(f5); - * Shape8.render(f5); Shape9.render(f5); Shape10.render(f5); - * Shape11.render(f5); Shape12.render(f5); Shape13.render(f5); - * Shape14.render(f5); Shape15.render(f5); Shape16.render(f5); - * Shape17.render(f5); Shape18.render(f5); Shape19.render(f5); } - */ - - private void setRotation(ModelRenderer model, float x, float y, float z) { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; + this.chest = new ModelRenderer(this, 0, 0); + this.leftarm = new ModelRenderer(this, 0, 0); + this.rightarm = new ModelRenderer(this, 0, 0); + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 8, 12, 4); + this.Shape1.setRotationPoint(-4F, 0F - 0.0625F / 2, -2F); + this.Shape1.setTextureSize(128, 64); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + convertToChild(this.chest, this.Shape1); + this.Shape2 = new ModelRenderer(this, 0, 16); + this.Shape2.addBox(0F, 0F, 0F, 7, 5, 2); + this.Shape2.setRotationPoint(-3.5F, 2F - 0.0625F / 2, -3.5F); + this.Shape2.setTextureSize(128, 64); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + convertToChild(this.chest, this.Shape2); + this.Shape3 = new ModelRenderer(this, 0, 23); + this.Shape3.addBox(0F, 0F, 0F, 1, 1, 1); + this.Shape3.setRotationPoint(-2.5F, 7F - 0.0625F / 2, -3F); + this.Shape3.setTextureSize(128, 64); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0F, 0F, 0F); + convertToChild(this.chest, this.Shape3); + this.Shape4 = new ModelRenderer(this, 0, 25); + this.Shape4.addBox(0F, 0F, 0F, 1, 1, 1); + this.Shape4.setRotationPoint(1.5F, 7F - 0.0625F / 2, -3F); + this.Shape4.setTextureSize(128, 64); + this.Shape4.mirror = true; + setRotation(this.Shape4, 0F, 0F, 0F); + convertToChild(this.chest, this.Shape4); + this.Shape5 = new ModelRenderer(this, 0, 28); + this.Shape5.addBox(0F, -2F, 0F, 7, 2, 2); + this.Shape5.setRotationPoint(-3.5F, 2F - 0.0625F / 2, -3.5F); + this.Shape5.setTextureSize(128, 64); + this.Shape5.mirror = true; + setRotation(this.Shape5, -0.6108652F, 0F, 0F); + convertToChild(this.chest, this.Shape5); + this.Shape6 = new ModelRenderer(this, 48, 0); + this.Shape6.addBox(0F, 0F, 0F, 4, 12, 4); + this.Shape6.setRotationPoint(4F - 6 + 0.25F, 0F - 3, -2F); + this.Shape6.setTextureSize(128, 64); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0F, 0F, 0F); + convertToChild(this.leftarm, this.Shape6); + this.Shape7 = new ModelRenderer(this, 32, 0); + this.Shape7.addBox(0F, 0F, 0F, 4, 12, 4); + this.Shape7.setRotationPoint(-8F + 6 - 0.25F, 0F - 3, -2F); + this.Shape7.setTextureSize(128, 64); + this.Shape7.mirror = true; + setRotation(this.Shape7, 0F, 0F, 0F); + convertToChild(this.rightarm, this.Shape7); + this.Shape8 = new ModelRenderer(this, 32, 16); + this.Shape8.addBox(0F, 0F, 0F, 5, 6, 6); + this.Shape8.setRotationPoint(4F - 6 + 0.25F, 4F - 3, -3F); + this.Shape8.setTextureSize(128, 64); + this.Shape8.mirror = true; + setRotation(this.Shape8, 0F, 0F, 0F); + convertToChild(this.leftarm, this.Shape8); + this.Shape9 = new ModelRenderer(this, 0, 34); + this.Shape9.addBox(0F, 0F, 0F, 5, 6, 6); + this.Shape9.setRotationPoint(-9F + 6 - 0.25F, 4F - 3, -3F); + this.Shape9.setTextureSize(128, 64); + this.Shape9.mirror = true; + setRotation(this.Shape9, 0F, 0F, 0F); + convertToChild(this.rightarm, this.Shape9); + this.Shape10 = new ModelRenderer(this, 32, 30); + this.Shape10.addBox(0F, 0F, 0F, 2, 6, 2); + this.Shape10.setRotationPoint(1F, 4F - 0.0625F / 2, 2F); + this.Shape10.setTextureSize(128, 64); + this.Shape10.mirror = true; + setRotation(this.Shape10, 0F, 0F, 0F); + convertToChild(this.chest, this.Shape10); + this.Shape11 = new ModelRenderer(this, 42, 30); + this.Shape11.addBox(0F, 0F, 0F, 2, 6, 2); + this.Shape11.setRotationPoint(-3F, 4F - 0.0625F / 2, 2F); + this.Shape11.setTextureSize(128, 64); + this.Shape11.mirror = true; + setRotation(this.Shape11, 0F, 0F, 0F); + convertToChild(this.chest, this.Shape11); + this.Shape12 = new ModelRenderer(this, 26, 9); + this.Shape12.addBox(0F, 0F, 0F, 1, 6, 1); + this.Shape12.setRotationPoint(1.5F, -2F - 0.0625F / 2, 2F); + this.Shape12.setTextureSize(128, 64); + this.Shape12.mirror = true; + setRotation(this.Shape12, 0F, 0F, 0F); + convertToChild(this.chest, this.Shape12); + this.Shape13 = new ModelRenderer(this, 26, 0); + this.Shape13.addBox(0F, 0F, 0F, 1, 6, 1); + this.Shape13.setRotationPoint(-2.5F, -2F - 0.0625F / 2, 2F); + this.Shape13.setTextureSize(128, 64); + this.Shape13.mirror = true; + setRotation(this.Shape13, 0F, 0F, 0F); + convertToChild(this.chest, this.Shape13); + this.Shape14 = new ModelRenderer(this, 20, 18); + this.Shape14.addBox(0F, 0F, 0F, 2, 2, 1); + this.Shape14.setRotationPoint(-1F, 1F - 0.0625F / 2, 2F); + this.Shape14.setTextureSize(128, 64); + this.Shape14.mirror = true; + setRotation(this.Shape14, 0F, 0F, 0F); + convertToChild(this.chest, this.Shape14); + this.Shape15 = new ModelRenderer(this, 21, 23); + this.Shape15.addBox(-1.5F, -1.5F, 0F, 3, 3, 1); + this.Shape15.setRotationPoint(0F, 2F - 0.0625F / 2, 3F); + this.Shape15.setTextureSize(128, 64); + this.Shape15.mirror = true; + setRotation(this.Shape15, 0F, 0F, 0.7853982F); + convertToChild(this.chest, this.Shape15); + this.Shape16 = new ModelRenderer(this, 0, 48); + this.Shape16.addBox(0F, -1F, 0F, 3, 1, 4); + this.Shape16.setRotationPoint(-8F + 6 - 0.25F, 12F - 3, -2F); + this.Shape16.setTextureSize(128, 64); + this.Shape16.mirror = true; + setRotation(this.Shape16, 0F, 0F, 0.5235988F); + convertToChild(this.rightarm, this.Shape16); + this.Shape17 = new ModelRenderer(this, 0, 55); + this.Shape17.addBox(-3F, -1F, 0F, 3, 1, 4); + this.Shape17.setRotationPoint(8F - 6 + 0.25F, 12F - 3, -2F); + this.Shape17.setTextureSize(128, 64); + this.Shape17.mirror = true; + setRotation(this.Shape17, 0F, 0F, -0.5235988F); + convertToChild(this.leftarm, this.Shape17); + this.Shape18 = new ModelRenderer(this, 90, 0); + this.Shape18.addBox(0F, -3F, 0F, 5, 3, 6); + this.Shape18.setRotationPoint(4F - 6 + 0.25F, 0F - 3, -3F); + this.Shape18.setTextureSize(128, 64); + this.Shape18.mirror = true; + setRotation(this.Shape18, 0F, 0F, 0.2617994F); + convertToChild(this.leftarm, this.Shape18); + this.Shape19 = new ModelRenderer(this, 66, 0); + this.Shape19.addBox(-5F, -3F, 0F, 5, 3, 6); + this.Shape19.setRotationPoint(-4F + 6 - 0.25F, 0F - 3, -3F); + this.Shape19.setTextureSize(128, 64); + this.Shape19.mirror = true; + setRotation(this.Shape19, 0F, 0F, -0.2617994F); + convertToChild(this.rightarm, this.Shape19); } @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { - - if (entity instanceof EntityPlayer) { + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { + + if(entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; ItemStack itemstack = player.inventory.getCurrentItem(); this.heldItemRight = itemstack != null ? 1 : 0; - if (itemstack != null && player.getItemInUseCount() > 0) { + if(itemstack != null && player.getItemInUseCount() > 0) { EnumAction enumaction = itemstack.getItemUseAction(); - if (enumaction == EnumAction.block) { + if(enumaction == EnumAction.block) { this.heldItemRight = 3; - } else if (enumaction == EnumAction.bow) { + } else if(enumaction == EnumAction.bow) { this.aimedBow = true; } } @@ -230,8 +211,9 @@ public class ModelT45Chest extends ModelBiped { this.isSneak = entity.isSneaking(); this.isRiding = entity.isRiding(); - - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.chest.rotationPointX = this.bipedBody.rotationPointX; this.chest.rotationPointY = this.bipedBody.rotationPointY; this.chest.rotationPointZ = this.bipedBody.rotationPointZ; @@ -250,56 +232,66 @@ public class ModelT45Chest extends ModelBiped { this.rightarm.rotateAngleX = this.bipedRightArm.rotateAngleX; this.rightarm.rotateAngleY = this.bipedRightArm.rotateAngleY; this.rightarm.rotateAngleZ = this.bipedRightArm.rotateAngleZ; - - if(entity instanceof EntityZombie || entity instanceof EntityPigZombie || entity instanceof EntitySkeleton) { - this.leftarm.rotateAngleX -= (90 * Math.PI / 180D); - this.rightarm.rotateAngleX -= (90 * Math.PI / 180D); + + if(entity instanceof EntityZombie || entity instanceof EntitySkeleton) { + this.leftarm.rotateAngleX -= (float) (90 * Math.PI / 180D); + this.rightarm.rotateAngleX -= (float) (90 * Math.PI / 180D); } } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); GL11.glPushMatrix(); GL11.glScalef(1.125F, 1.125F, 1.125F); - this.chest.render(par7); + this.chest.render(scaleFactor); this.aimedBow = false; GL11.glPopMatrix(); - this.renderLeft(par1Entity, par2, par3, par4, par5, par6, par7); - this.renderRight(par1Entity, par2, par3, par4, par5, par6, par7); + this.renderLeft(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor); + this.renderRight(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor); } - public void renderLeft(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); + public void renderLeft(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); GL11.glPushMatrix(); GL11.glScalef(1.125F, 1.125F, 1.125F); - this.leftarm.render(par7); + this.leftarm.render(scaleFactor); this.aimedBow = false; GL11.glPopMatrix(); } - public void renderRight(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); + public void renderRight(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); GL11.glPushMatrix(); GL11.glScalef(1.125F, 1.125F, 1.125F); - this.rightarm.render(par7); + this.rightarm.render(scaleFactor); this.aimedBow = false; GL11.glPopMatrix(); } // Jabelar, you saved my time! I was about to redo all this crap if you can // simply use this method!! - protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) { + protected static void convertToChild(ModelRenderer parent, ModelRenderer child) { + // move child rotation point to be relative to parent - parChild.rotationPointX -= parParent.rotationPointX; - parChild.rotationPointY -= parParent.rotationPointY; - parChild.rotationPointZ -= parParent.rotationPointZ; + child.rotationPointX -= parent.rotationPointX; + child.rotationPointY -= parent.rotationPointY; + child.rotationPointZ -= parent.rotationPointZ; // make rotations relative to parent - parChild.rotateAngleX -= parParent.rotateAngleX; - parChild.rotateAngleY -= parParent.rotateAngleY; - parChild.rotateAngleZ -= parParent.rotateAngleZ; + child.rotateAngleX -= parent.rotateAngleX; + child.rotateAngleY -= parent.rotateAngleY; + child.rotateAngleZ -= parent.rotateAngleZ; // create relationship - parParent.addChild(parChild); + parent.addChild(child); } + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelT45Helmet.java b/src/main/java/com/hbm/render/model/ModelT45Helmet.java index b49a4a870..bda3e446b 100644 --- a/src/main/java/com/hbm/render/model/ModelT45Helmet.java +++ b/src/main/java/com/hbm/render/model/ModelT45Helmet.java @@ -13,7 +13,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelT45Helmet extends ModelBiped { - // fields + ModelRenderer helmet; ModelRenderer Shape1; ModelRenderer Shape2; @@ -25,90 +25,76 @@ public class ModelT45Helmet extends ModelBiped { ModelRenderer Shape8; public ModelT45Helmet() { - textureWidth = 64; - textureHeight = 32; + this.textureWidth = 64; + this.textureHeight = 32; - helmet = new ModelRenderer(this, 0, 0); - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 8, 8, 8); - Shape1.setRotationPoint(-4F, 0F - 8 + 0.0625F / 2, -4F); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - convertToChild(helmet, Shape1); - Shape2 = new ModelRenderer(this, 32, 0); - Shape2.addBox(0F, 0F, 0F, 2, 2, 1); - Shape2.setRotationPoint(1F, 1F - 8 + 0.0625F / 2 + 1, -5F); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - convertToChild(helmet, Shape2); - Shape3 = new ModelRenderer(this, 40, 6); - Shape3.addBox(0F, 0F, 0F, 1, 1, 4); - Shape3.setRotationPoint(-5F, 1F - 8 + 0.0625F / 2, -5.466667F); - Shape3.setTextureSize(64, 32); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - convertToChild(helmet, Shape3); - Shape4 = new ModelRenderer(this, 40, 0); - Shape4.addBox(0F, 0F, 0F, 4, 2, 2); - Shape4.setRotationPoint(-2F, 5F - 8 + 0.0625F / 2, -4F); - Shape4.setTextureSize(64, 32); - Shape4.mirror = true; - setRotation(Shape4, -0.7853982F, 0F, 0F); - convertToChild(helmet, Shape4); - Shape5 = new ModelRenderer(this, 54, 0); - Shape5.addBox(0F, 2F, 0F, 2, 1, 2); - Shape5.setRotationPoint(-1F, 5F - 8 + 0.0625F / 2, -4F); - Shape5.setTextureSize(64, 32); - Shape5.mirror = true; - setRotation(Shape5, -0.7853982F, 0F, 0F); - convertToChild(helmet, Shape5); - Shape6 = new ModelRenderer(this, 0, 16); - Shape6.addBox(0F, 0F, 0F, 10, 1, 9); - Shape6.setRotationPoint(-5F, 6F - 8 + 0.0625F / 2, -4.5F); - Shape6.setTextureSize(64, 32); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - convertToChild(helmet, Shape6); - Shape7 = new ModelRenderer(this, 32, 7); - Shape7.addBox(0F, 0F, 0F, 1, 1, 1); - Shape7.setRotationPoint(-1.5F, 5F - 8 + 0.0625F / 2, -4.5F); - Shape7.setTextureSize(64, 32); - Shape7.mirror = true; - setRotation(Shape7, -0.7853982F, 0F, 0F); - convertToChild(helmet, Shape7); - Shape8 = new ModelRenderer(this, 32, 5); - Shape8.addBox(0F, 0F, 0F, 1, 1, 1); - Shape8.setRotationPoint(0.5F, 5F - 8 + 0.0625F / 2, -4.5F); - Shape8.setTextureSize(64, 32); - Shape8.mirror = true; - setRotation(Shape8, -0.7853982F, 0F, 0F); - convertToChild(helmet, Shape8); - } - - /* - * public void render(Entity entity, float f, float f1, float f2, float f3, - * float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); - * setRotationAngles(f, f1, f2, f3, f4, f5); Shape1.render(f5); - * Shape2.render(f5); Shape3.render(f5); Shape4.render(f5); - * Shape5.render(f5); Shape6.render(f5); Shape7.render(f5); - * Shape8.render(f5); } - */ - - private void setRotation(ModelRenderer model, float x, float y, float z) { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; + this.helmet = new ModelRenderer(this, 0, 0); + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 8, 8, 8); + this.Shape1.setRotationPoint(-4F, 0F - 8 + 0.0625F / 2, -4F); + this.Shape1.setTextureSize(64, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + convertToChild(this.helmet, this.Shape1); + this.Shape2 = new ModelRenderer(this, 32, 0); + this.Shape2.addBox(0F, 0F, 0F, 2, 2, 1); + this.Shape2.setRotationPoint(1F, 1F - 8 + 0.0625F / 2 + 1, -5F); + this.Shape2.setTextureSize(64, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + convertToChild(this.helmet, this.Shape2); + this.Shape3 = new ModelRenderer(this, 40, 6); + this.Shape3.addBox(0F, 0F, 0F, 1, 1, 4); + this.Shape3.setRotationPoint(-5F, 1F - 8 + 0.0625F / 2, -5.466667F); + this.Shape3.setTextureSize(64, 32); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0F, 0F, 0F); + convertToChild(this.helmet, this.Shape3); + this.Shape4 = new ModelRenderer(this, 40, 0); + this.Shape4.addBox(0F, 0F, 0F, 4, 2, 2); + this.Shape4.setRotationPoint(-2F, 5F - 8 + 0.0625F / 2, -4F); + this.Shape4.setTextureSize(64, 32); + this.Shape4.mirror = true; + setRotation(this.Shape4, -0.7853982F, 0F, 0F); + convertToChild(this.helmet, this.Shape4); + this.Shape5 = new ModelRenderer(this, 54, 0); + this.Shape5.addBox(0F, 2F, 0F, 2, 1, 2); + this.Shape5.setRotationPoint(-1F, 5F - 8 + 0.0625F / 2, -4F); + this.Shape5.setTextureSize(64, 32); + this.Shape5.mirror = true; + setRotation(this.Shape5, -0.7853982F, 0F, 0F); + convertToChild(this.helmet, this.Shape5); + this.Shape6 = new ModelRenderer(this, 0, 16); + this.Shape6.addBox(0F, 0F, 0F, 10, 1, 9); + this.Shape6.setRotationPoint(-5F, 6F - 8 + 0.0625F / 2, -4.5F); + this.Shape6.setTextureSize(64, 32); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0F, 0F, 0F); + convertToChild(this.helmet, this.Shape6); + this.Shape7 = new ModelRenderer(this, 32, 7); + this.Shape7.addBox(0F, 0F, 0F, 1, 1, 1); + this.Shape7.setRotationPoint(-1.5F, 5F - 8 + 0.0625F / 2, -4.5F); + this.Shape7.setTextureSize(64, 32); + this.Shape7.mirror = true; + setRotation(this.Shape7, -0.7853982F, 0F, 0F); + convertToChild(this.helmet, this.Shape7); + this.Shape8 = new ModelRenderer(this, 32, 5); + this.Shape8.addBox(0F, 0F, 0F, 1, 1, 1); + this.Shape8.setRotationPoint(0.5F, 5F - 8 + 0.0625F / 2, -4.5F); + this.Shape8.setTextureSize(64, 32); + this.Shape8.mirror = true; + setRotation(this.Shape8, -0.7853982F, 0F, 0F); + convertToChild(this.helmet, this.Shape8); } @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { this.isSneak = entity.isSneaking(); this.isRiding = entity.isRiding(); - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.helmet.rotationPointX = this.bipedHead.rotationPointX; this.helmet.rotationPointY = this.bipedHead.rotationPointY; this.helmet.rotateAngleY = this.bipedHead.rotateAngleY; @@ -116,26 +102,34 @@ public class ModelT45Helmet extends ModelBiped { } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); GL11.glPushMatrix(); GL11.glScalef(1.125F, 1.125F, 1.125F); GL11.glScalef(1.0625F, 1.0625F, 1.0625F); - this.helmet.render(par7); + this.helmet.render(scaleFactor); GL11.glPopMatrix(); } - protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) { + protected static void convertToChild(ModelRenderer parent, ModelRenderer child) { + // move child rotation point to be relative to parent - parChild.rotationPointX -= parParent.rotationPointX; - parChild.rotationPointY -= parParent.rotationPointY; - parChild.rotationPointZ -= parParent.rotationPointZ; + child.rotationPointX -= parent.rotationPointX; + child.rotationPointY -= parent.rotationPointY; + child.rotationPointZ -= parent.rotationPointZ; // make rotations relative to parent - parChild.rotateAngleX -= parParent.rotateAngleX; - parChild.rotateAngleY -= parParent.rotateAngleY; - parChild.rotateAngleZ -= parParent.rotateAngleZ; + child.rotateAngleX -= parent.rotateAngleX; + child.rotateAngleY -= parent.rotateAngleY; + child.rotateAngleZ -= parent.rotateAngleZ; // create relationship - parParent.addChild(parChild); + parent.addChild(child); } -} \ No newline at end of file + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } +} diff --git a/src/main/java/com/hbm/render/model/ModelT45Legs.java b/src/main/java/com/hbm/render/model/ModelT45Legs.java index 56c0e182c..5090933d7 100644 --- a/src/main/java/com/hbm/render/model/ModelT45Legs.java +++ b/src/main/java/com/hbm/render/model/ModelT45Legs.java @@ -13,7 +13,7 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelT45Legs extends ModelBiped { - // fields + ModelRenderer leftleg; ModelRenderer rightleg; ModelRenderer Shape1; @@ -24,76 +24,63 @@ public class ModelT45Legs extends ModelBiped { ModelRenderer Shape6; public ModelT45Legs() { - textureWidth = 64; - textureHeight = 32; + this.textureWidth = 64; + this.textureHeight = 32; - leftleg = new ModelRenderer(this, 0, 0); - rightleg = new ModelRenderer(this, 0, 0); - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 4, 12, 4); - Shape1.setRotationPoint(-4F + 2, 0F - 0.5F, -2F); - Shape1.setTextureSize(64, 32); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - convertToChild(rightleg, Shape1); - Shape2 = new ModelRenderer(this, 16, 0); - Shape2.addBox(0F, 0F, 0F, 4, 12, 4); - Shape2.setRotationPoint(0F - 2, 0F - 0.5F, -2F); - Shape2.setTextureSize(64, 32); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - convertToChild(leftleg, Shape2); - Shape3 = new ModelRenderer(this, 0, 16); - Shape3.addBox(0F, -6F, 0F, 5, 6, 4); - Shape3.setRotationPoint(-5F + 2, 10F - 0.5F, -2F); - Shape3.setTextureSize(64, 32); - Shape3.mirror = true; - setRotation(Shape3, 0.1745329F, 0F, 0F); - convertToChild(rightleg, Shape3); - Shape4 = new ModelRenderer(this, 18, 16); - Shape4.addBox(0F, -6F, 0F, 5, 6, 4); - Shape4.setRotationPoint(0F - 2, 10F - 0.5F, -2F); - Shape4.setTextureSize(64, 32); - Shape4.mirror = true; - setRotation(Shape4, 0.1745329F, 0F, 0F); - convertToChild(leftleg, Shape4); - Shape5 = new ModelRenderer(this, 34, 0); - Shape5.addBox(0F, 0F, 0F, 5, 2, 4); - Shape5.setRotationPoint(-5F + 2, 1F - 0.5F, -3F); - Shape5.setTextureSize(64, 32); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - convertToChild(rightleg, Shape5); - Shape6 = new ModelRenderer(this, 34, 8); - Shape6.addBox(0F, 0F, 0F, 5, 2, 4); - Shape6.setRotationPoint(0F - 2, 1F - 0.5F, -3F); - Shape6.setTextureSize(64, 32); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - convertToChild(leftleg, Shape6); - } - - /* - * public void render(Entity entity, float f, float f1, float f2, float f3, - * float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); - * setRotationAngles(f, f1, f2, f3, f4, f5); Shape1.render(f5); - * Shape2.render(f5); Shape3.render(f5); Shape4.render(f5); - * Shape5.render(f5); Shape6.render(f5); } - */ - - private void setRotation(ModelRenderer model, float x, float y, float z) { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; + this.leftleg = new ModelRenderer(this, 0, 0); + this.rightleg = new ModelRenderer(this, 0, 0); + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 4, 12, 4); + this.Shape1.setRotationPoint(-4F + 2, 0F - 0.5F, -2F); + this.Shape1.setTextureSize(64, 32); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + convertToChild(this.rightleg, this.Shape1); + this.Shape2 = new ModelRenderer(this, 16, 0); + this.Shape2.addBox(0F, 0F, 0F, 4, 12, 4); + this.Shape2.setRotationPoint(0F - 2, 0F - 0.5F, -2F); + this.Shape2.setTextureSize(64, 32); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + convertToChild(this.leftleg, this.Shape2); + this.Shape3 = new ModelRenderer(this, 0, 16); + this.Shape3.addBox(0F, -6F, 0F, 5, 6, 4); + this.Shape3.setRotationPoint(-5F + 2, 10F - 0.5F, -2F); + this.Shape3.setTextureSize(64, 32); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0.1745329F, 0F, 0F); + convertToChild(this.rightleg, this.Shape3); + this.Shape4 = new ModelRenderer(this, 18, 16); + this.Shape4.addBox(0F, -6F, 0F, 5, 6, 4); + this.Shape4.setRotationPoint(0F - 2, 10F - 0.5F, -2F); + this.Shape4.setTextureSize(64, 32); + this.Shape4.mirror = true; + setRotation(this.Shape4, 0.1745329F, 0F, 0F); + convertToChild(this.leftleg, this.Shape4); + this.Shape5 = new ModelRenderer(this, 34, 0); + this.Shape5.addBox(0F, 0F, 0F, 5, 2, 4); + this.Shape5.setRotationPoint(-5F + 2, 1F - 0.5F, -3F); + this.Shape5.setTextureSize(64, 32); + this.Shape5.mirror = true; + setRotation(this.Shape5, 0F, 0F, 0F); + convertToChild(this.rightleg, this.Shape5); + this.Shape6 = new ModelRenderer(this, 34, 8); + this.Shape6.addBox(0F, 0F, 0F, 5, 2, 4); + this.Shape6.setRotationPoint(0F - 2, 1F - 0.5F, -3F); + this.Shape6.setTextureSize(64, 32); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0F, 0F, 0F); + convertToChild(this.leftleg, this.Shape6); } @Override - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) { this.isSneak = entity.isSneaking(); this.isRiding = entity.isRiding(); - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); + this.leftleg.rotationPointX = this.bipedLeftLeg.rotationPointX; this.leftleg.rotationPointY = this.bipedLeftLeg.rotationPointY - 1.5F; this.leftleg.rotationPointZ = this.bipedLeftLeg.rotationPointZ; @@ -116,27 +103,35 @@ public class ModelT45Legs extends ModelBiped { } @Override - public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { - setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity); GL11.glPushMatrix(); GL11.glScalef(1.125F, 1.125F, 1.125F); - this.leftleg.render(par7); + this.leftleg.render(scaleFactor); - this.rightleg.render(par7); + this.rightleg.render(scaleFactor); GL11.glPopMatrix(); } - protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) { + protected static void convertToChild(ModelRenderer parent, ModelRenderer child) { + // move child rotation point to be relative to parent - parChild.rotationPointX -= parParent.rotationPointX; - parChild.rotationPointY -= parParent.rotationPointY; - parChild.rotationPointZ -= parParent.rotationPointZ; + child.rotationPointX -= parent.rotationPointX; + child.rotationPointY -= parent.rotationPointY; + child.rotationPointZ -= parent.rotationPointZ; // make rotations relative to parent - parChild.rotateAngleX -= parParent.rotateAngleX; - parChild.rotateAngleY -= parParent.rotateAngleY; - parChild.rotateAngleZ -= parParent.rotateAngleZ; + child.rotateAngleX -= parent.rotateAngleX; + child.rotateAngleY -= parent.rotateAngleY; + child.rotateAngleZ -= parent.rotateAngleZ; // create relationship - parParent.addChild(parChild); + parent.addChild(child); } + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelTaintCrab.java b/src/main/java/com/hbm/render/model/ModelTaintCrab.java index a9bb0ac99..0d504ca8d 100644 --- a/src/main/java/com/hbm/render/model/ModelTaintCrab.java +++ b/src/main/java/com/hbm/render/model/ModelTaintCrab.java @@ -11,17 +11,18 @@ import net.minecraft.util.MathHelper; public class ModelTaintCrab extends ModelBase { @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor); + GL11.glPushMatrix(); GL11.glRotatef(90, 0, -1, 0); GL11.glRotatef(180, 0, 0, 1); GL11.glTranslatef(0, -1.5F, 0); - float rot = -(MathHelper.cos(f * 0.6662F * 2.0F + 0.0F) * 0.4F) * f1 * 57.3F; - + float rot = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + 0.0F) * 0.4F) * limbSwingAmount * 57.3F; + ResourceManager.taintcrab.renderPart("Body"); GL11.glPushMatrix(); @@ -33,7 +34,7 @@ public class ModelTaintCrab extends ModelBase { GL11.glRotatef(rot, 0, -1, 0); ResourceManager.taintcrab.renderPart("Legs2"); GL11.glPopMatrix(); - + GL11.glPopMatrix(); } } diff --git a/src/main/java/com/hbm/render/model/ModelTapeRecorder.java b/src/main/java/com/hbm/render/model/ModelTapeRecorder.java index 8f0c79145..c55d1bb7d 100644 --- a/src/main/java/com/hbm/render/model/ModelTapeRecorder.java +++ b/src/main/java/com/hbm/render/model/ModelTapeRecorder.java @@ -4,74 +4,59 @@ import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ModelTapeRecorder extends ModelBase -{ - ModelRenderer Base; - ModelRenderer Tape; - ModelRenderer Part1; - ModelRenderer Part2; - - public ModelTapeRecorder() - { - textureWidth = 128; - textureHeight = 64; - - Base = new ModelRenderer(this, 0, 0); - Base.addBox(0F, 0F, 0F, 16, 16, 12); - Base.setRotationPoint(-8F, 8F, -4F); - Base.setTextureSize(128, 64); - Base.mirror = true; - setRotation(Base, 0F, 0F, 0F); - Tape = new ModelRenderer(this, 0, 28); - Tape.addBox(0F, 0F, 0F, 8, 0, 2); - Tape.setRotationPoint(-4F, 11F, -6F); - Tape.setTextureSize(128, 64); - Tape.mirror = true; - setRotation(Tape, 0F, 0F, 0F); - Part1 = new ModelRenderer(this, 9, 42); - Part1.addBox(0F, 0F, 0F, 6, 6, 2); - Part1.setRotationPoint(-7F, 11F, -6F); - Part1.setTextureSize(128, 64); - Part1.mirror = true; - setRotation(Part1, 0F, 0F, 0F); - Part2 = new ModelRenderer(this, 44, 42); - Part2.addBox(0F, 0F, 0F, 6, 6, 2); - Part2.setRotationPoint(1F, 11F, -6F); - Part2.setTextureSize(128, 64); - Part2.mirror = true; - setRotation(Part2, 0F, 0F, 0F); - } - - @Override -public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Base.render(f5); - Tape.render(f5); - Part1.render(f5); - Part2.render(f5); - } - - public void renderModel(float f) - { - Base.render(f); - Tape.render(f); - Part1.render(f); - Part2.render(f); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override -public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } +public class ModelTapeRecorder extends ModelBase { + ModelRenderer Base; + ModelRenderer Tape; + ModelRenderer Part1; + ModelRenderer Part2; + + public ModelTapeRecorder() { + this.textureWidth = 128; + this.textureHeight = 64; + + this.Base = new ModelRenderer(this, 0, 0); + this.Base.addBox(0F, 0F, 0F, 16, 16, 12); + this.Base.setRotationPoint(-8F, 8F, -4F); + this.Base.setTextureSize(128, 64); + this.Base.mirror = true; + setRotation(this.Base, 0F, 0F, 0F); + this.Tape = new ModelRenderer(this, 0, 28); + this.Tape.addBox(0F, 0F, 0F, 8, 0, 2); + this.Tape.setRotationPoint(-4F, 11F, -6F); + this.Tape.setTextureSize(128, 64); + this.Tape.mirror = true; + setRotation(this.Tape, 0F, 0F, 0F); + this.Part1 = new ModelRenderer(this, 9, 42); + this.Part1.addBox(0F, 0F, 0F, 6, 6, 2); + this.Part1.setRotationPoint(-7F, 11F, -6F); + this.Part1.setTextureSize(128, 64); + this.Part1.mirror = true; + setRotation(this.Part1, 0F, 0F, 0F); + this.Part2 = new ModelRenderer(this, 44, 42); + this.Part2.addBox(0F, 0F, 0F, 6, 6, 2); + this.Part2.setRotationPoint(1F, 11F, -6F); + this.Part2.setTextureSize(128, 64); + this.Part2.mirror = true; + setRotation(this.Part2, 0F, 0F, 0F); + } + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderModel(scaleFactor); + } + + public void renderModel(float scaleFactor) { + this.Base.render(scaleFactor); + this.Tape.render(scaleFactor); + this.Part1.render(scaleFactor); + this.Part2.render(scaleFactor); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } } diff --git a/src/main/java/com/hbm/render/model/ModelTeslaCrab.java b/src/main/java/com/hbm/render/model/ModelTeslaCrab.java index 786b1a9ed..651113363 100644 --- a/src/main/java/com/hbm/render/model/ModelTeslaCrab.java +++ b/src/main/java/com/hbm/render/model/ModelTeslaCrab.java @@ -11,16 +11,17 @@ import net.minecraft.util.MathHelper; public class ModelTeslaCrab extends ModelBase { @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - super.render(entity, f, f1, f2, f3, f4, f5); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor); + GL11.glPushMatrix(); GL11.glRotatef(180, 0, 0, 1); GL11.glTranslatef(0, -1.5F, 0); - float rot = -(MathHelper.cos(f * 0.6662F * 2.0F + 0.0F) * 0.4F) * f1 * 57.3F; - + float rot = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + 0.0F) * 0.4F) * limbSwingAmount * 57.3F; + ResourceManager.teslacrab.renderPart("Body"); GL11.glPushMatrix(); @@ -32,8 +33,7 @@ public class ModelTeslaCrab extends ModelBase { GL11.glRotatef(rot, 0, -1, 0); ResourceManager.teslacrab.renderPart("Back"); GL11.glPopMatrix(); - + GL11.glPopMatrix(); } - } diff --git a/src/main/java/com/hbm/render/model/ModelWormHead.java b/src/main/java/com/hbm/render/model/ModelWormHead.java index 694168b08..c040c6966 100644 --- a/src/main/java/com/hbm/render/model/ModelWormHead.java +++ b/src/main/java/com/hbm/render/model/ModelWormHead.java @@ -11,17 +11,17 @@ import net.minecraftforge.client.model.AdvancedModelLoader; import net.minecraftforge.client.model.IModelCustom; public class ModelWormHead extends ModelBase { - + public static final IModelCustom head = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mobs/bot_prime_head.obj")); @Override - public void render(Entity entity, float x, float y, float z, float f3, float f4, float f5) { - super.render(entity, x, y, z, f3, f4, f5); - - GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f5 - 90.0F, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f5 - 90, 0.0F, 0.0F, 1.0F); - + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor); + + GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * scaleFactor - 90.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * scaleFactor - 90, 0.0F, 0.0F, 1.0F); + head.renderAll(); } - } diff --git a/src/main/java/com/hbm/render/model/ProtoCopter.java b/src/main/java/com/hbm/render/model/ProtoCopter.java index e64b227e6..367275a41 100644 --- a/src/main/java/com/hbm/render/model/ProtoCopter.java +++ b/src/main/java/com/hbm/render/model/ProtoCopter.java @@ -4,125 +4,102 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX - - - - - package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -public class ProtoCopter extends ModelBase -{ - //fields - ModelRenderer Shape1; - ModelRenderer Shape2; - ModelRenderer Shape3; - ModelRenderer Shape4; - ModelRenderer Shape5; - ModelRenderer Shape6; - ModelRenderer Shape7; - ModelRenderer Shape8; - - public ProtoCopter() - { - textureWidth = 128; - textureHeight = 64; +public class ProtoCopter extends ModelBase { - int x = 0; - int z = -2; - - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 16, 4, 4); - Shape1.setRotationPoint(-8F + x, 0F, 0F + z); - Shape1.setTextureSize(128, 64); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 0, 0); - Shape2.addBox(0F, 0F, 0F, 4, 8, 4); - Shape2.setRotationPoint(-12F + x, 0F, 0F + z); - Shape2.setTextureSize(128, 64); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 0, 0); - Shape3.addBox(0F, 0F, 0F, 7, 3, 2); - Shape3.setRotationPoint(8F + x, 0F, 1F + z); - Shape3.setTextureSize(128, 64); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 0, 0); - Shape4.addBox(0F, 0F, 0F, 6, 6, 2); - Shape4.setRotationPoint(15F + x, 0F, 1F + z); - Shape4.setTextureSize(128, 64); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); - Shape5 = new ModelRenderer(this, 0, 0); - Shape5.addBox(0F, 0F, 0F, 5, 5, 2); - Shape5.setRotationPoint(-8F + x, 3F, 1F + z); - Shape5.setTextureSize(128, 64); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - Shape6 = new ModelRenderer(this, 0, 0); - Shape6.addBox(0F, 0F, 0F, 4, 2, 14); - Shape6.setRotationPoint(-3F + x, 4F, -5F + z); - Shape6.setTextureSize(128, 64); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - Shape7 = new ModelRenderer(this, 0, 0); - Shape7.addBox(0F, 0F, 0F, 2, 4, 2); - Shape7.setRotationPoint(-1F + x, -4F, 1F + z); - Shape7.setTextureSize(128, 64); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0F); - Shape8 = new ModelRenderer(this, 0, 0); - Shape8.addBox(-14F, 0F, -14F, 28, 1, 28); - Shape8.setRotationPoint(0F + x, -3F, 2F + z); - Shape8.setTextureSize(128, 64); - Shape8.mirror = true; - setRotation(Shape8, 0F, 0F, 0F); - } - - @Override -public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - Shape7.render(f5); - Shape8.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - @Override -public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - - public void renderAll(float f5) - { - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - Shape7.render(f5); - Shape8.render(f5); - } + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape5; + ModelRenderer Shape6; + ModelRenderer Shape7; + ModelRenderer Shape8; + public ProtoCopter() { + this.textureWidth = 128; + this.textureHeight = 64; + + int x = 0; + int z = -2; + + this.Shape1 = new ModelRenderer(this, 0, 0); + this.Shape1.addBox(0F, 0F, 0F, 16, 4, 4); + this.Shape1.setRotationPoint(-8F + x, 0F, 0F + z); + this.Shape1.setTextureSize(128, 64); + this.Shape1.mirror = true; + setRotation(this.Shape1, 0F, 0F, 0F); + this.Shape2 = new ModelRenderer(this, 0, 0); + this.Shape2.addBox(0F, 0F, 0F, 4, 8, 4); + this.Shape2.setRotationPoint(-12F + x, 0F, 0F + z); + this.Shape2.setTextureSize(128, 64); + this.Shape2.mirror = true; + setRotation(this.Shape2, 0F, 0F, 0F); + this.Shape3 = new ModelRenderer(this, 0, 0); + this.Shape3.addBox(0F, 0F, 0F, 7, 3, 2); + this.Shape3.setRotationPoint(8F + x, 0F, 1F + z); + this.Shape3.setTextureSize(128, 64); + this.Shape3.mirror = true; + setRotation(this.Shape3, 0F, 0F, 0F); + this.Shape4 = new ModelRenderer(this, 0, 0); + this.Shape4.addBox(0F, 0F, 0F, 6, 6, 2); + this.Shape4.setRotationPoint(15F + x, 0F, 1F + z); + this.Shape4.setTextureSize(128, 64); + this.Shape4.mirror = true; + setRotation(this.Shape4, 0F, 0F, 0F); + this.Shape5 = new ModelRenderer(this, 0, 0); + this.Shape5.addBox(0F, 0F, 0F, 5, 5, 2); + this.Shape5.setRotationPoint(-8F + x, 3F, 1F + z); + this.Shape5.setTextureSize(128, 64); + this.Shape5.mirror = true; + setRotation(this.Shape5, 0F, 0F, 0F); + this.Shape6 = new ModelRenderer(this, 0, 0); + this.Shape6.addBox(0F, 0F, 0F, 4, 2, 14); + this.Shape6.setRotationPoint(-3F + x, 4F, -5F + z); + this.Shape6.setTextureSize(128, 64); + this.Shape6.mirror = true; + setRotation(this.Shape6, 0F, 0F, 0F); + this.Shape7 = new ModelRenderer(this, 0, 0); + this.Shape7.addBox(0F, 0F, 0F, 2, 4, 2); + this.Shape7.setRotationPoint(-1F + x, -4F, 1F + z); + this.Shape7.setTextureSize(128, 64); + this.Shape7.mirror = true; + setRotation(this.Shape7, 0F, 0F, 0F); + this.Shape8 = new ModelRenderer(this, 0, 0); + this.Shape8.addBox(-14F, 0F, -14F, 28, 1, 28); + this.Shape8.setRotationPoint(0F + x, -3F, 2F + z); + this.Shape8.setTextureSize(128, 64); + this.Shape8.mirror = true; + setRotation(this.Shape8, 0F, 0F, 0F); + } + + @Override + public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) { + + this.renderAll(scaleFactor); + } + + public void renderAll(float f5) { + + this.Shape1.render(f5); + this.Shape2.render(f5); + this.Shape3.render(f5); + this.Shape4.render(f5); + this.Shape5.render(f5); + this.Shape6.render(f5); + this.Shape7.render(f5); + this.Shape8.render(f5); + } + + private static void setRotation(ModelRenderer model, float x, float y, float z) { + + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } }