Refactor models, fix ModelArmorBase compatibility with SkinPort and Galacticraft

This commit is contained in:
ItsMakar 2025-04-01 13:06:57 +03:00
parent 3323356c73
commit bfede6d87b
69 changed files with 4655 additions and 5098 deletions

View File

@ -1,6 +1,7 @@
package com.hbm.items.armor; package com.hbm.items.armor;
import java.util.List; import java.util.List;
import java.util.stream.IntStream;
import org.lwjgl.opengl.GL11; 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.ModelCloak;
import com.hbm.render.model.ModelGoggles; import com.hbm.render.model.ModelGoggles;
import com.hbm.render.model.ModelHat; import com.hbm.render.model.ModelHat;
import com.hbm.render.model.ModelM65;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -32,20 +32,16 @@ import net.minecraft.util.ResourceLocation;
public class ArmorModel extends ItemArmor { public class ArmorModel extends ItemArmor {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
private ModelGoggles modelGoggles; private static final ModelGoggles modelGoggles = new ModelGoggles();
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
private ModelCloak modelCloak; private static final ModelHat modelHat = new ModelHat(0);
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
private ModelM65 modelM65; private static final ModelCloak modelCloak = new ModelCloak();
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
private ModelHat modelHat; private final ResourceLocation[] gogglesBlurs = IntStream.range(0, 6)
@Spaghetti("replace this garbage with an array") .mapToObj(i -> new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_goggles_" + i + ".png"))
private ResourceLocation goggleBlur0 = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_goggles_0.png"); .toArray(ResourceLocation[]::new);
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");
public ArmorModel(ArmorMaterial armorMaterial, int armorType) { public ArmorModel(ArmorMaterial armorMaterial, int armorType) {
super(armorMaterial, 0, armorType); super(armorMaterial, 0, armorType);
@ -56,26 +52,17 @@ public class ArmorModel extends ItemArmor {
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
if(this == ModItems.goggles) { if(this == ModItems.goggles) {
if(armorSlot == 0) { if(armorSlot == 0) {
if(this.modelGoggles == null) { return modelGoggles;
this.modelGoggles = new ModelGoggles();
}
return this.modelGoggles;
} }
} }
if(this == ModItems.hat) { if(this == ModItems.hat) {
if(armorSlot == 0) { if(armorSlot == 0) {
if(this.modelHat == null) { return modelHat;
this.modelHat = new ModelHat(0);
}
return this.modelHat;
} }
} }
if(this == ModItems.cape_radiation || this == ModItems.cape_gasmask || this == ModItems.cape_schrabidium || this == ModItems.cape_hidden) { if(this == ModItems.cape_radiation || this == ModItems.cape_gasmask || this == ModItems.cape_schrabidium || this == ModItems.cape_hidden) {
if(armorSlot == 1) { if(armorSlot == 1) {
if(this.modelCloak == null) { return modelCloak;
this.modelCloak = new ModelCloak();
}
return this.modelCloak;
} }
} }
return null; return null;
@ -110,45 +97,29 @@ public class ArmorModel extends ItemArmor {
GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_DEPTH_TEST); 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); GL11.glDisable(GL11.GL_ALPHA_TEST);
switch((int) ((double) stack.getItemDamage() / (double) stack.getMaxDamage() * 6D)) { GL11.glDepthMask(false);
case 0: GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur0); OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
break;
case 1: int blurTextureIndex = (int) ((double) stack.getItemDamage() / (double) stack.getMaxDamage() * 6D);
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur1); if (blurTextureIndex < 0 || blurTextureIndex > 5)
break; blurTextureIndex = 5;
case 2:
Minecraft.getMinecraft().getTextureManager().bindTexture(goggleBlur2); Minecraft.getMinecraft().getTextureManager().bindTexture(gogglesBlurs[blurTextureIndex]);
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;
}
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads(); tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0.0D, (double) resolution.getScaledHeight(), -90.0D, 0.0D, 1.0D); tessellator.addVertexWithUV(0.0D, resolution.getScaledHeight(), -90.0D, 0.0D, 1.0D);
tessellator.addVertexWithUV((double) resolution.getScaledWidth(), (double) resolution.getScaledHeight(), -90.0D, 1.0D, 1.0D); tessellator.addVertexWithUV(resolution.getScaledWidth(), resolution.getScaledHeight(), -90.0D, 1.0D, 1.0D);
tessellator.addVertexWithUV((double) resolution.getScaledWidth(), 0.0D, -90.0D, 1.0D, 0.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.addVertexWithUV(0.0D, 0.0D, -90.0D, 0.0D, 0.0D);
tessellator.draw(); tessellator.draw();
GL11.glDepthMask(true); GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_BLEND);
} }
@Override @Override

View File

@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.entity.mob.EntityHunterChopper; import com.hbm.entity.mob.EntityHunterChopper;
import com.hbm.lib.RefStrings; import com.hbm.lib.RefStrings;
import com.hbm.render.model.ModelHunterChopper; import com.hbm.render.model.ModelHunterChopper;
import com.hbm.render.model.ProtoCopter;
import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
@ -14,39 +13,35 @@ import net.minecraft.util.ResourceLocation;
public class RenderHunterChopper extends Render { public class RenderHunterChopper extends Render {
ProtoCopter mine; private static final ResourceLocation chopperTexture = new ResourceLocation(RefStrings.MODID + ":textures/entity/chopper.png");
ModelHunterChopper mine2; private final ModelHunterChopper chopperModel = new ModelHunterChopper();
public RenderHunterChopper() { @Override
mine = new ProtoCopter(); public void doRender(Entity entity, double x, double y, double z, float entityYaw, float partialTicks) {
mine2 = new ModelHunterChopper();
} 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) //if(rocket instanceof EntityHunterChopper)
// mine2.setGunRotations((EntityHunterChopper)rocket, yaw, pitch); // mine2.setGunRotations((EntityHunterChopper)rocket, yaw, pitch);
mine2.renderAll(0.0625F); this.chopperModel.renderAll(0.0625F);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
@Override @Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) { protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return new ResourceLocation(RefStrings.MODID + ":textures/entity/chopper.png");
return chopperTexture;
} }
} }

View File

@ -5,54 +5,54 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorAJR extends ModelArmorBase { public class ModelArmorAJR extends ModelArmorBase {
public ModelArmorAJR(int type) { public ModelArmorAJR(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_ajr, "Head"); this.head = new ModelRendererObj(ResourceManager.armor_ajr, "Head");
body = new ModelRendererObj(ResourceManager.armor_ajr, "Body"); this.body = new ModelRendererObj(ResourceManager.armor_ajr, "Body");
leftArm = new ModelRendererObj(ResourceManager.armor_ajr, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_ajr, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glShadeModel(GL11.GL_SMOOTH);
if(type == 0) { if(this.type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajr_helmet); bindTexture(ResourceManager.ajr_helmet);
head.render(par7); this.head.render(scaleFactor);
} }
if(type == 1) { if(this.type == 1) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajr_chest); bindTexture(ResourceManager.ajr_chest);
body.render(par7); this.body.render(scaleFactor);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajr_arm);
leftArm.render(par7); bindTexture(ResourceManager.ajr_arm);
rightArm.render(par7); this.leftArm.render(scaleFactor);
this.rightArm.render(scaleFactor);
} }
if(type == 2) { if(this.type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajr_leg); bindTexture(ResourceManager.ajr_leg);
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajr_leg); bindTexture(ResourceManager.ajr_leg);
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glShadeModel(GL11.GL_FLAT); GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }

View File

@ -5,54 +5,54 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorAJRO extends ModelArmorBase { public class ModelArmorAJRO extends ModelArmorBase {
public ModelArmorAJRO(int type) { public ModelArmorAJRO(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_ajr, "Head"); this.head = new ModelRendererObj(ResourceManager.armor_ajr, "Head");
body = new ModelRendererObj(ResourceManager.armor_ajr, "Body"); this.body = new ModelRendererObj(ResourceManager.armor_ajr, "Body");
leftArm = new ModelRendererObj(ResourceManager.armor_ajr, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_ajr, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glShadeModel(GL11.GL_SMOOTH);
if(type == 0) { if(this.type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajro_helmet); bindTexture(ResourceManager.ajro_helmet);
head.render(par7); this.head.render(scaleFactor);
} }
if(type == 1) { if(this.type == 1) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajro_chest); bindTexture(ResourceManager.ajro_chest);
body.render(par7); this.body.render(scaleFactor);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajro_arm);
leftArm.render(par7); bindTexture(ResourceManager.ajro_arm);
rightArm.render(par7); this.leftArm.render(scaleFactor);
this.rightArm.render(scaleFactor);
} }
if(type == 2) { if(this.type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajro_leg); bindTexture(ResourceManager.ajro_leg);
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ajro_leg); bindTexture(ResourceManager.ajro_leg);
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glShadeModel(GL11.GL_FLAT); GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }

View File

@ -5,62 +5,62 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorBJ extends ModelArmorBase { public class ModelArmorBJ extends ModelArmorBase {
ModelRendererObj jetpack; ModelRendererObj jetpack;
public ModelArmorBJ(int type) { public ModelArmorBJ(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_bj, "Head"); this.head = new ModelRendererObj(ResourceManager.armor_bj, "Head");
body = new ModelRendererObj(ResourceManager.armor_bj, "Body"); this.body = new ModelRendererObj(ResourceManager.armor_bj, "Body");
jetpack = new ModelRendererObj(ResourceManager.armor_bj, "Jetpack"); this.jetpack = new ModelRendererObj(ResourceManager.armor_bj, "Jetpack");
leftArm = new ModelRendererObj(ResourceManager.armor_bj, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_bj, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
body.copyTo(jetpack); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
this.body.copyTo(this.jetpack);
GL11.glPushMatrix(); GL11.glPushMatrix();
if(type == 0) { if(this.type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bj_eyepatch); bindTexture(ResourceManager.bj_eyepatch);
head.render(par7); this.head.render(scaleFactor);
} }
if(type == 1 || type == 5) { if(this.type == 1 || this.type == 5) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bj_chest); bindTexture(ResourceManager.bj_chest);
body.render(par7); this.body.render(scaleFactor);
if(type == 5) { if(this.type == 5) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bj_jetpack); bindTexture(ResourceManager.bj_jetpack);
jetpack.render(par7); this.jetpack.render(scaleFactor);
} }
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bj_arm); bindTexture(ResourceManager.bj_arm);
leftArm.render(par7); this.leftArm.render(scaleFactor);
rightArm.render(par7); this.rightArm.render(scaleFactor);
} }
if(type == 2) { if(this.type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bj_leg); bindTexture(ResourceManager.bj_leg);
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bj_leg); bindTexture(ResourceManager.bj_leg);
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -5,6 +5,7 @@ import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped; 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.RenderBiped;
import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.RenderPlayer; import net.minecraft.client.renderer.entity.RenderPlayer;
@ -16,8 +17,7 @@ import net.minecraft.util.ResourceLocation;
public class ModelArmorBase extends ModelBiped { public class ModelArmorBase extends ModelBiped {
int type; public int type;
public ModelRendererObj head; public ModelRendererObj head;
public ModelRendererObj body; public ModelRendererObj body;
public ModelRendererObj leftArm; public ModelRendererObj leftArm;
@ -30,30 +30,37 @@ public class ModelArmorBase extends ModelBiped {
public ModelArmorBase(int type) { public ModelArmorBase(int type) {
this.type = type; this.type = type;
// generate null defaults to prevent major breakage from using // Generate null defaults to prevent major breakage from using incomplete models
// incomplete models this.head = new ModelRendererObj(null);
head = new ModelRendererObj(null); this.body = new ModelRendererObj(null);
body = new ModelRendererObj(null); this.leftArm = new ModelRendererObj(null).setRotationPoint(-5.0F, 2.0F, 0.0F);
leftArm = new ModelRendererObj(null).setRotationPoint(-5.0F, 2.0F, 0.0F); this.rightArm = new ModelRendererObj(null).setRotationPoint(5.0F, 2.0F, 0.0F);
rightArm = new ModelRendererObj(null).setRotationPoint(5.0F, 2.0F, 0.0F); this.leftLeg = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F);
leftLeg = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); this.rightLeg = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F);
rightLeg = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); this.leftFoot = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F);
leftFoot = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); this.rightFoot = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F);
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); boolean calculateRotations = true;
head.rotateAngleX = headPitch / (180F / (float) Math.PI);
rightArm.rotateAngleX = MathHelper.cos(walkCycle * 0.6662F + (float) Math.PI) * 2.0F * walkAmplitude * 0.5F; Render render = RenderManager.instance.getEntityRenderObject(entity);
leftArm.rotateAngleX = MathHelper.cos(walkCycle * 0.6662F) * 2.0F * walkAmplitude * 0.5F; if(render instanceof RenderPlayer) {
rightArm.rotateAngleZ = 0.0F; RenderPlayer renderPlayer = (RenderPlayer) render;
leftArm.rotateAngleZ = 0.0F; this.copyPropertiesFromBiped(renderPlayer.modelBipedMain);
rightFoot.rotateAngleX = rightLeg.rotateAngleX = MathHelper.cos(walkCycle * 0.6662F) * 1.4F * walkAmplitude; calculateRotations = false;
leftFoot.rotateAngleX = leftLeg.rotateAngleX = MathHelper.cos(walkCycle * 0.6662F + (float) Math.PI) * 1.4F * walkAmplitude; } else if(render instanceof RenderBiped) {
rightFoot.rotateAngleY = rightLeg.rotateAngleY = 0.0F; RenderBiped renderBiped = (RenderBiped) render;
leftFoot.rotateAngleY = leftLeg.rotateAngleY = 0.0F; 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) { if(entity instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) entity; EntityPlayer player = (EntityPlayer) entity;
@ -78,7 +85,8 @@ public class ModelArmorBase extends ModelBiped {
if(player.getHeldItem().getItem() instanceof IHoldableWeapon) if(player.getHeldItem().getItem() instanceof IHoldableWeapon)
this.aimedBow = true; 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(); this.isRiding = entity.isRiding();
if(this.isRiding) { if(this.isRiding) {
rightArm.rotateAngleX += -((float) Math.PI / 5F); this.rightFoot.rotateAngleX = this.rightLeg.rotateAngleX = -((float) Math.PI * 2F / 5F);
leftArm.rotateAngleX += -((float) Math.PI / 5F); this.leftFoot.rotateAngleX = this.leftLeg.rotateAngleX = -((float) Math.PI * 2F / 5F);
rightFoot.rotateAngleX = rightLeg.rotateAngleX = -((float) Math.PI * 2F / 5F); this.rightFoot.rotateAngleY = this.rightLeg.rotateAngleY = ((float) Math.PI / 10F);
leftFoot.rotateAngleX = leftLeg.rotateAngleX = -((float) Math.PI * 2F / 5F); this.leftFoot.rotateAngleY = this.leftLeg.rotateAngleY = -((float) Math.PI / 10F);
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;
} }
if(this.isSneak) { if(this.isSneak) {
body.rotateAngleX = 0.5F; this.rightFoot.offsetZ = this.rightLeg.offsetZ = 4.0F;
rightArm.rotateAngleX += 0.4F; this.leftFoot.offsetZ = this.leftLeg.offsetZ = 4.0F;
leftArm.rotateAngleX += 0.4F; this.rightFoot.offsetY = this.rightLeg.offsetY = -3.0F;
rightFoot.offsetZ = rightLeg.offsetZ = 4.0F; this.leftFoot.offsetY = this.leftLeg.offsetY = -3.0F;
leftFoot.offsetZ = leftLeg.offsetZ = 4.0F;
rightFoot.offsetY = rightLeg.offsetY = -3.0F;
leftFoot.offsetY = leftLeg.offsetY = -3.0F;
head.offsetY = 1.0F;
} else { } else {
body.rotateAngleX = 0.0F; this.rightFoot.offsetZ = this.rightLeg.offsetZ = 0.1F;
rightFoot.offsetZ = rightLeg.offsetZ = 0.1F; this.leftFoot.offsetZ = this.leftLeg.offsetZ = 0.1F;
leftFoot.offsetZ = leftLeg.offsetZ = 0.1F; this.rightFoot.offsetY = this.rightLeg.offsetY = 0.0F;
rightFoot.offsetY = rightLeg.offsetY = 0.0F; this.leftFoot.offsetY = this.leftLeg.offsetY = 0.0F;
leftFoot.offsetY = leftLeg.offsetY = 0.0F;
head.offsetY = 0.0F;
} }
rightArm.rotateAngleZ += MathHelper.cos(idleCycle * 0.09F) * 0.05F + 0.05F; if(calculateRotations) {
leftArm.rotateAngleZ -= MathHelper.cos(idleCycle * 0.09F) * 0.05F + 0.05F; this.head.rotateAngleY = netHeadYaw / (180F / (float) Math.PI);
rightArm.rotateAngleX += MathHelper.sin(idleCycle * 0.067F) * 0.05F; this.head.rotateAngleX = headPitch / (180F / (float) Math.PI);
leftArm.rotateAngleX -= MathHelper.sin(idleCycle * 0.067F) * 0.05F; 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) { if(this.isRiding) {
f6 = 0.0F; this.rightArm.rotateAngleX -= (float) Math.PI / 5F;
f7 = 0.0F; this.leftArm.rotateAngleX -= (float) Math.PI / 5F;
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);
} }
} else {
Object o = RenderManager.instance.entityRenderMap.get(entity.getClass()); if(this.heldItemLeft != 0) {
if(o instanceof RenderBiped) { this.leftArm.rotateAngleX = this.leftArm.rotateAngleX * 0.5F - ((float) Math.PI / 10F) * (float) this.heldItemLeft;
RenderBiped render = (RenderBiped) o; }
leftArm.copyRotationFrom(render.modelBipedMain.bipedLeftArm);
rightArm.copyRotationFrom(render.modelBipedMain.bipedRightArm); 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) { protected static void bindTexture(ResourceLocation location) {
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
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;
} }
} }

View File

@ -5,51 +5,50 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorBismuth extends ModelArmorBase { public class ModelArmorBismuth extends ModelArmorBase {
public ModelArmorBismuth(int type) { public ModelArmorBismuth(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_bismuth, "Head"); this.head = new ModelRendererObj(ResourceManager.armor_bismuth, "Head");
body = new ModelRendererObj(ResourceManager.armor_bismuth, "Body"); this.body = new ModelRendererObj(ResourceManager.armor_bismuth, "Body");
leftArm = new ModelRendererObj(ResourceManager.armor_bismuth, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_bismuth, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.armor_bismuth_tex); bindTexture(ResourceManager.armor_bismuth_tex);
if(type == 0) { if(this.type == 0) {
head.render(par7); this.head.render(scaleFactor);
} }
if(type == 1) { if(this.type == 1) {
leftArm.render(par7); this.leftArm.render(scaleFactor);
rightArm.render(par7); this.rightArm.render(scaleFactor);
body.render(par7); this.body.render(scaleFactor);
} }
if(type == 2) { if(this.type == 2) {
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glShadeModel(GL11.GL_FLAT); GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }

View File

@ -5,54 +5,53 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorDNT extends ModelArmorBase { public class ModelArmorDNT extends ModelArmorBase {
public ModelArmorDNT(int type) { public ModelArmorDNT(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_dnt, "Head"); this.head = new ModelRendererObj(ResourceManager.armor_dnt, "Head");
body = new ModelRendererObj(ResourceManager.armor_dnt, "Body"); this.body = new ModelRendererObj(ResourceManager.armor_dnt, "Body");
leftArm = new ModelRendererObj(ResourceManager.armor_dnt, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_dnt, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glShadeModel(GL11.GL_SMOOTH);
if(type == 0) { if(this.type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.dnt_helmet); bindTexture(ResourceManager.dnt_helmet);
head.render(par7); this.head.render(scaleFactor);
} }
if(type == 1) { if(this.type == 1) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.dnt_chest); bindTexture(ResourceManager.dnt_chest);
body.render(par7); this.body.render(scaleFactor);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.dnt_arm); bindTexture(ResourceManager.dnt_arm);
leftArm.render(par7); this.leftArm.render(scaleFactor);
rightArm.render(par7); this.rightArm.render(scaleFactor);
} }
if(type == 2) { if(this.type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.dnt_leg); bindTexture(ResourceManager.dnt_leg);
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.dnt_leg); bindTexture(ResourceManager.dnt_leg);
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glShadeModel(GL11.GL_FLAT); GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }

View File

@ -8,50 +8,50 @@ import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorDesh extends ModelArmorBase { public class ModelArmorDesh extends ModelArmorBase {
public ModelArmorDesh(int type) { public ModelArmorDesh(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_steamsuit, "Head"); this.head = new ModelRendererObj(ResourceManager.armor_steamsuit, "Head");
body = new ModelRendererObj(ResourceManager.armor_steamsuit, "Body"); this.body = new ModelRendererObj(ResourceManager.armor_steamsuit, "Body");
leftArm = new ModelRendererObj(ResourceManager.armor_steamsuit, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_steamsuit, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glShadeModel(GL11.GL_SMOOTH);
if(type == 0) { if(this.type == 0) {
bindTexture(ResourceManager.steamsuit_helmet); bindTexture(ResourceManager.steamsuit_helmet);
head.render(par7); this.head.render(scaleFactor);
} }
if(type == 1) { if(this.type == 1) {
bindTexture(ResourceManager.steamsuit_chest); bindTexture(ResourceManager.steamsuit_chest);
body.render(par7); this.body.render(scaleFactor);
bindTexture(ResourceManager.steamsuit_arm); bindTexture(ResourceManager.steamsuit_arm);
leftArm.render(par7); this.leftArm.render(scaleFactor);
rightArm.render(par7); this.rightArm.render(scaleFactor);
} }
if(type == 2) { if(this.type == 2) {
bindTexture(ResourceManager.steamsuit_leg); bindTexture(ResourceManager.steamsuit_leg);
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
bindTexture(ResourceManager.steamsuit_leg); bindTexture(ResourceManager.steamsuit_leg);
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glShadeModel(GL11.GL_FLAT); GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }

View File

@ -8,50 +8,50 @@ import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorDiesel extends ModelArmorBase { public class ModelArmorDiesel extends ModelArmorBase {
public ModelArmorDiesel(int type) { public ModelArmorDiesel(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_dieselsuit, "Head"); this.head = new ModelRendererObj(ResourceManager.armor_dieselsuit, "Head");
body = new ModelRendererObj(ResourceManager.armor_dieselsuit, "Body"); this.body = new ModelRendererObj(ResourceManager.armor_dieselsuit, "Body");
leftArm = new ModelRendererObj(ResourceManager.armor_dieselsuit, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_dieselsuit, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glShadeModel(GL11.GL_SMOOTH);
if(type == 0) { if(this.type == 0) {
bindTexture(ResourceManager.dieselsuit_helmet); bindTexture(ResourceManager.dieselsuit_helmet);
head.render(par7); this.head.render(scaleFactor);
} }
if(type == 1) { if(this.type == 1) {
bindTexture(ResourceManager.dieselsuit_chest); bindTexture(ResourceManager.dieselsuit_chest);
body.render(par7); this.body.render(scaleFactor);
bindTexture(ResourceManager.dieselsuit_arm); bindTexture(ResourceManager.dieselsuit_arm);
leftArm.render(par7); this.leftArm.render(scaleFactor);
rightArm.render(par7); this.rightArm.render(scaleFactor);
} }
if(type == 2) { if(this.type == 2) {
bindTexture(ResourceManager.dieselsuit_leg); bindTexture(ResourceManager.dieselsuit_leg);
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
bindTexture(ResourceManager.dieselsuit_leg); bindTexture(ResourceManager.dieselsuit_leg);
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glShadeModel(GL11.GL_FLAT); GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }

View File

@ -5,64 +5,63 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorDigamma extends ModelArmorBase { public class ModelArmorDigamma extends ModelArmorBase {
ModelRendererObj cassette; ModelRendererObj cassette;
public ModelArmorDigamma(int type) { public ModelArmorDigamma(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_fau, "Head"); this.head = new ModelRendererObj(ResourceManager.armor_fau, "Head");
body = new ModelRendererObj(ResourceManager.armor_fau, "Body"); this.body = new ModelRendererObj(ResourceManager.armor_fau, "Body");
cassette = new ModelRendererObj(ResourceManager.armor_fau, "Cassette"); this.cassette = new ModelRendererObj(ResourceManager.armor_fau, "Cassette");
leftArm = new ModelRendererObj(ResourceManager.armor_fau, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_fau, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glShadeModel(GL11.GL_SMOOTH);
body.copyTo(cassette); this.body.copyTo(this.cassette);
if(type == 0) { if(this.type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_helmet); bindTexture(ResourceManager.fau_helmet);
head.render(par7); this.head.render(scaleFactor);
} }
if(type == 1) { if(this.type == 1) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_chest); bindTexture(ResourceManager.fau_chest);
body.render(par7); this.body.render(scaleFactor);
GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0); OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_cassette); bindTexture(ResourceManager.fau_cassette);
cassette.render(par7); this.cassette.render(scaleFactor);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_arm); bindTexture(ResourceManager.fau_arm);
leftArm.render(par7); this.leftArm.render(scaleFactor);
rightArm.render(par7); this.rightArm.render(scaleFactor);
} }
if(type == 2) { if(this.type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_leg); bindTexture(ResourceManager.fau_leg);
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fau_leg); bindTexture(ResourceManager.fau_leg);
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glShadeModel(GL11.GL_FLAT); GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }

View File

@ -5,42 +5,42 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorEnvsuit extends ModelArmorBase { public class ModelArmorEnvsuit extends ModelArmorBase {
ModelRendererObj lamps; ModelRendererObj lamps;
public ModelArmorEnvsuit(int type) { public ModelArmorEnvsuit(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_envsuit, "Helmet"); this.head = new ModelRendererObj(ResourceManager.armor_envsuit, "Helmet");
lamps = new ModelRendererObj(ResourceManager.armor_envsuit, "Lamps"); this.lamps = new ModelRendererObj(ResourceManager.armor_envsuit, "Lamps");
body = new ModelRendererObj(ResourceManager.armor_envsuit, "Chest"); this.body = new ModelRendererObj(ResourceManager.armor_envsuit, "Chest");
leftArm = new ModelRendererObj(ResourceManager.armor_envsuit, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_envsuit, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
head.copyTo(lamps); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
this.head.copyTo(this.lamps);
GL11.glPushMatrix(); GL11.glPushMatrix();
if(type == 0) { if(this.type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.envsuit_helmet); bindTexture(ResourceManager.envsuit_helmet);
GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0); OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
head.render(par7); this.head.render(scaleFactor);
GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_BLEND);
/// START GLOW /// /// START GLOW ///
float lastX = OpenGlHelper.lastBrightnessX; float lastX = OpenGlHelper.lastBrightnessX;
float lastY = OpenGlHelper.lastBrightnessY; float lastY = OpenGlHelper.lastBrightnessY;
@ -49,7 +49,7 @@ public class ModelArmorEnvsuit extends ModelArmorBase {
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glColor3f(1F, 1F, 0.8F); GL11.glColor3f(1F, 1F, 0.8F);
lamps.render(par7); this.lamps.render(scaleFactor);
GL11.glColor3f(1F, 1F, 1F); GL11.glColor3f(1F, 1F, 1F);
GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHTING);
@ -57,24 +57,24 @@ public class ModelArmorEnvsuit extends ModelArmorBase {
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY);
/// END GLOW /// /// END GLOW ///
} }
if(type == 1) { if(this.type == 1) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.envsuit_chest); bindTexture(ResourceManager.envsuit_chest);
body.render(par7); this.body.render(scaleFactor);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.envsuit_arm); bindTexture(ResourceManager.envsuit_arm);
leftArm.render(par7); this.leftArm.render(scaleFactor);
rightArm.render(par7); this.rightArm.render(scaleFactor);
} }
if(type == 2) { if(this.type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.envsuit_leg); bindTexture(ResourceManager.envsuit_leg);
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.envsuit_leg); bindTexture(ResourceManager.envsuit_leg);
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -5,53 +5,52 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorHEV extends ModelArmorBase { public class ModelArmorHEV extends ModelArmorBase {
public ModelArmorHEV(int type) { public ModelArmorHEV(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_hev, "Head"); this.head = new ModelRendererObj(ResourceManager.armor_hev, "Head");
body = new ModelRendererObj(ResourceManager.armor_hev, "Body"); this.body = new ModelRendererObj(ResourceManager.armor_hev, "Body");
leftArm = new ModelRendererObj(ResourceManager.armor_hev, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_hev, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
if(type == 0) { if(this.type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hev_helmet); bindTexture(ResourceManager.hev_helmet);
head.render(par7); this.head.render(scaleFactor);
} }
if(type == 1) { if(this.type == 1) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hev_chest); bindTexture(ResourceManager.hev_chest);
body.render(par7); this.body.render(scaleFactor);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hev_arm); bindTexture(ResourceManager.hev_arm);
leftArm.render(par7); this.leftArm.render(scaleFactor);
rightArm.render(par7); this.rightArm.render(scaleFactor);
} }
if(type == 2) { if(this.type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hev_leg); bindTexture(ResourceManager.hev_leg);
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hev_leg); bindTexture(ResourceManager.hev_leg);
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -5,101 +5,100 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorRPA extends ModelArmorBase { public class ModelArmorRPA extends ModelArmorBase {
ModelRendererObj fan; ModelRendererObj fan;
ModelRendererObj glow; ModelRendererObj glow;
public ModelArmorRPA(int type) { public ModelArmorRPA(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_remnant, "Head"); this.head = new ModelRendererObj(ResourceManager.armor_remnant, "Head");
body = new ModelRendererObj(ResourceManager.armor_remnant, "Body"); this.body = new ModelRendererObj(ResourceManager.armor_remnant, "Body");
fan = new ModelRendererObj(ResourceManager.armor_remnant, "Fan"); this.fan = new ModelRendererObj(ResourceManager.armor_remnant, "Fan");
glow = new ModelRendererObj(ResourceManager.armor_remnant, "Glow"); this.glow = new ModelRendererObj(ResourceManager.armor_remnant, "Glow");
leftArm = new ModelRendererObj(ResourceManager.armor_remnant, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_remnant, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
//body.copyTo(fan); //body.copyTo(fan);
body.copyTo(glow); this.body.copyTo(this.glow);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glShadeModel(GL11.GL_SMOOTH);
if(type == 0) { if(this.type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.rpa_helmet); bindTexture(ResourceManager.rpa_helmet);
head.render(par7); this.head.render(scaleFactor);
} }
if(type == 1) { if(this.type == 1) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.rpa_arm); bindTexture(ResourceManager.rpa_arm);
leftArm.render(par7); this.leftArm.render(scaleFactor);
rightArm.render(par7); this.rightArm.render(scaleFactor);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.rpa_chest); bindTexture(ResourceManager.rpa_chest);
body.render(par7); this.body.render(scaleFactor);
/// START GLOW /// /// START GLOW ///
float lastX = OpenGlHelper.lastBrightnessX; float lastX = OpenGlHelper.lastBrightnessX;
float lastY = OpenGlHelper.lastBrightnessY; float lastY = OpenGlHelper.lastBrightnessY;
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
glow.render(par7); this.glow.render(scaleFactor);
GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopAttrib(); GL11.glPopAttrib();
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY);
/// END GLOW /// /// END GLOW ///
/// START FAN /// /// START FAN ///
GL11.glPushMatrix(); GL11.glPushMatrix();
double px = 0.0625D; double px = 0.0625D;
GL11.glTranslatef(body.offsetX * (float) px, body.offsetY * (float) px, body.offsetZ * (float) px); GL11.glTranslatef(this.body.offsetX * (float) px, this.body.offsetY * (float) px, this.body.offsetZ * (float) px);
GL11.glTranslatef(body.rotationPointX * (float) px, body.rotationPointY * (float) px, body.rotationPointZ * (float) px); GL11.glTranslatef(this.body.rotationPointX * (float) px, this.body.rotationPointY * (float) px, this.body.rotationPointZ * (float) px);
if(body.rotateAngleZ != 0.0F) { if(this.body.rotateAngleZ != 0.0F) {
GL11.glRotatef(body.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F); GL11.glRotatef(this.body.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F);
} }
if(body.rotateAngleY != 0.0F) { if(this.body.rotateAngleY != 0.0F) {
GL11.glRotatef(body.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F); GL11.glRotatef(this.body.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F);
} }
if(body.rotateAngleX != 0.0F) { if(this.body.rotateAngleX != 0.0F) {
GL11.glRotatef(body.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 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.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); GL11.glTranslated(0, -4.875 * px, 0);
fan.render(par7); this.fan.render(scaleFactor);
GL11.glPopMatrix(); GL11.glPopMatrix();
/// END FAN /// /// END FAN ///
} }
if(type == 2) { if(this.type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.rpa_leg); bindTexture(ResourceManager.rpa_leg);
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.rpa_leg); bindTexture(ResourceManager.rpa_leg);
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glShadeModel(GL11.GL_FLAT); GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }

View File

@ -3,24 +3,24 @@ package com.hbm.render.model;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorTailPeep extends ModelArmorBase { public class ModelArmorTailPeep extends ModelArmorBase {
ModelRendererObj tail; ModelRendererObj tail;
public ModelArmorTailPeep() { public ModelArmorTailPeep() {
super(0); super(0);
tail = new ModelRendererObj(ResourceManager.armor_tail, "FaggyAssFuckingTailThing"); this.tail = new ModelRendererObj(ResourceManager.armor_tail, "FaggyAssFuckingTailThing");
} }
@Override @Override
public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, entity);
body.copyTo(tail); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
this.body.copyTo(this.tail);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.tail_peep);
tail.render(par7); bindTexture(ResourceManager.tail_peep);
this.tail.render(scaleFactor);
} }
} }

View File

@ -5,56 +5,56 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorTaurun extends ModelArmorBase { public class ModelArmorTaurun extends ModelArmorBase {
public ModelArmorTaurun(int type) { public ModelArmorTaurun(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_taurun, "Helmet"); this.head = new ModelRendererObj(ResourceManager.armor_taurun, "Helmet");
body = new ModelRendererObj(ResourceManager.armor_taurun, "Chest"); this.body = new ModelRendererObj(ResourceManager.armor_taurun, "Chest");
leftArm = new ModelRendererObj(ResourceManager.armor_taurun, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_taurun, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
if(type == 0) { if(this.type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_helmet); bindTexture(ResourceManager.taurun_helmet);
head.render(par7); this.head.render(scaleFactor);
} }
if(type == 1) { if(this.type == 1) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_chest); bindTexture(ResourceManager.taurun_chest);
body.render(par7); this.body.render(scaleFactor);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_arm); bindTexture(ResourceManager.taurun_arm);
leftArm.render(par7); this.leftArm.render(scaleFactor);
rightArm.render(par7); this.rightArm.render(scaleFactor);
} }
if(type == 2) { if(this.type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_leg); bindTexture(ResourceManager.taurun_leg);
GL11.glTranslated(-0.01, 0, 0); GL11.glTranslated(-0.01, 0, 0);
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
GL11.glTranslated(0.02, 0, 0); GL11.glTranslated(0.02, 0, 0);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.taurun_leg); bindTexture(ResourceManager.taurun_leg);
GL11.glTranslated(-0.01, 0, 0); GL11.glTranslated(-0.01, 0, 0);
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
GL11.glTranslated(0.02, 0, 0); GL11.glTranslated(0.02, 0, 0);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -5,76 +5,76 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelArmorTrenchmaster extends ModelArmorBase { public class ModelArmorTrenchmaster extends ModelArmorBase {
ModelRendererObj light; ModelRendererObj light;
public ModelArmorTrenchmaster(int type) { public ModelArmorTrenchmaster(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Helmet"); this.head = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Helmet");
light = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Light"); this.light = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Light");
body = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Chest"); this.body = new ModelRendererObj(ResourceManager.armor_trenchmaster, "Chest");
leftArm = new ModelRendererObj(ResourceManager.armor_trenchmaster, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_trenchmaster, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
head.copyTo(light); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
this.head.copyTo(this.light);
GL11.glPushMatrix(); GL11.glPushMatrix();
if(type == 0) { if(this.type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_helmet); bindTexture(ResourceManager.trenchmaster_helmet);
GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0); OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
head.render(par7); this.head.render(scaleFactor);
GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_BLEND);
/// START GLOW /// /// START GLOW ///
float lastX = OpenGlHelper.lastBrightnessX; float lastX = OpenGlHelper.lastBrightnessX;
float lastY = OpenGlHelper.lastBrightnessY; float lastY = OpenGlHelper.lastBrightnessY;
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
light.render(par7); this.light.render(scaleFactor);
GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopAttrib(); GL11.glPopAttrib();
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY);
/// END GLOW /// /// END GLOW ///
} }
if(type == 1) { if(this.type == 1) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_chest); bindTexture(ResourceManager.trenchmaster_chest);
body.render(par7); this.body.render(scaleFactor);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_arm); bindTexture(ResourceManager.trenchmaster_arm);
leftArm.render(par7); this.leftArm.render(scaleFactor);
rightArm.render(par7); this.rightArm.render(scaleFactor);
} }
if(type == 2) { if(this.type == 2) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_leg); bindTexture(ResourceManager.trenchmaster_leg);
GL11.glTranslated(-0.01, 0, 0); GL11.glTranslated(-0.01, 0, 0);
leftLeg.render(par7); this.leftLeg.render(scaleFactor);
GL11.glTranslated(0.02, 0, 0); GL11.glTranslated(0.02, 0, 0);
rightLeg.render(par7); this.rightLeg.render(scaleFactor);
} }
if(type == 3) { if(this.type == 3) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.trenchmaster_leg); bindTexture(ResourceManager.trenchmaster_leg);
GL11.glTranslated(-0.01, 0, 0); GL11.glTranslated(-0.01, 0, 0);
leftFoot.render(par7); this.leftFoot.render(scaleFactor);
GL11.glTranslated(0.02, 0, 0); GL11.glTranslated(0.02, 0, 0);
rightFoot.render(par7); this.rightFoot.render(scaleFactor);
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -15,77 +14,74 @@ public class ModelArmorWings extends ModelArmorBase {
ModelRendererObj wingLT; ModelRendererObj wingLT;
ModelRendererObj wingRB; ModelRendererObj wingRB;
ModelRendererObj wingRT; ModelRendererObj wingRT;
public ModelArmorWings(int type) { public ModelArmorWings(int type) {
super(type); super(type);
wingLB = new ModelRendererObj(ResourceManager.armor_wings, "LeftBase"); this.wingLB = new ModelRendererObj(ResourceManager.armor_wings, "LeftBase");
wingLT = new ModelRendererObj(ResourceManager.armor_wings, "LeftTip"); this.wingLT = new ModelRendererObj(ResourceManager.armor_wings, "LeftTip");
wingRB = new ModelRendererObj(ResourceManager.armor_wings, "RightBase"); this.wingRB = new ModelRendererObj(ResourceManager.armor_wings, "RightBase");
wingRT = new ModelRendererObj(ResourceManager.armor_wings, "RightTip"); this.wingRT = new ModelRendererObj(ResourceManager.armor_wings, "RightTip");
//i should really stop doing that //i should really stop doing that
head = new ModelRendererObj(ResourceManager.anvil); this.head = new ModelRendererObj(ResourceManager.anvil);
body = new ModelRendererObj(ResourceManager.anvil); this.body = new ModelRendererObj(ResourceManager.anvil);
leftArm = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(-5.0F, 2.0F, 0.0F); this.leftArm = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(-5.0F, 2.0F, 0.0F);
rightArm = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(5.0F, 2.0F, 0.0F); this.rightArm = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(5.0F, 2.0F, 0.0F);
leftLeg = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(1.9F, 12.0F, 0.0F); this.leftLeg = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(1.9F, 12.0F, 0.0F);
rightLeg = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(-1.9F, 12.0F, 0.0F); this.rightLeg = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(-1.9F, 12.0F, 0.0F);
leftFoot = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(1.9F, 12.0F, 0.0F); this.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.rightFoot = new ModelRendererObj(ResourceManager.anvil).setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
//body.copyTo(wingLB); //body.copyTo(wingLB);
//body.copyTo(wingLT); //body.copyTo(wingLT);
//body.copyTo(wingRB); //body.copyTo(wingRB);
//body.copyTo(wingRT); //body.copyTo(wingRT);
GL11.glPushMatrix(); GL11.glPushMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(this.getTexture()); bindTexture(this.getTexture());
double px = 0.0625D; double px = 0.0625D;
double rot = Math.sin((entity.ticksExisted) * 0.2D) * 20; double rot = Math.sin((entity.ticksExisted) * 0.2D) * 20;
double rot2 = Math.sin((entity.ticksExisted) * 0.2D - Math.PI * 0.5) * 50 + 30; double rot2 = Math.sin((entity.ticksExisted) * 0.2D - Math.PI * 0.5) * 50 + 30;
int pivotSideOffset = 1; int pivotSideOffset = 1;
int pivotFrontOffset = 5; int pivotFrontOffset = 5;
int pivotZOffset = 3; int pivotZOffset = 3;
int tipSideOffset = 16; int tipSideOffset = 16;
int tipZOffset = 2; int tipZOffset = 2;
double inwardAngle = 10D; double inwardAngle = 10D;
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(body.offsetX * (float) px, body.offsetY * (float) px, body.offsetZ * (float) px); GL11.glTranslatef(this.body.offsetX * (float) px, this.body.offsetY * (float) px, this.body.offsetZ * (float) px);
GL11.glTranslatef(body.rotationPointX * (float) px, body.rotationPointY * (float) px, body.rotationPointZ * (float) px); GL11.glTranslatef(this.body.rotationPointX * (float) px, this.body.rotationPointY * (float) px, this.body.rotationPointZ * (float) px);
if(body.rotateAngleZ != 0.0F) { if(this.body.rotateAngleZ != 0.0F) {
GL11.glRotatef(body.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F); GL11.glRotatef(this.body.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F);
} }
if(body.rotateAngleY != 0.0F) { if(this.body.rotateAngleY != 0.0F) {
GL11.glRotatef(body.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F); GL11.glRotatef(this.body.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F);
} }
if(body.rotateAngleX != 0.0F) { if(this.body.rotateAngleX != 0.0F) {
GL11.glRotatef(body.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F); GL11.glRotatef(this.body.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F);
} }
if(this.type != 1 && entity.onGround) { if(this.type != 1 && entity.onGround) {
rot = 20; rot = 20;
rot2 = 160; rot2 = 160;
} }
if(this.type == 1) { if(this.type == 1) {
rot = 0;
rot2 = 10;
if(entity.onGround) { if(entity.onGround) {
rot = 30; rot = 30;
rot2 = -30; rot2 = -30;
@ -97,75 +93,79 @@ public class ModelArmorWings extends ModelArmorBase {
rot2 = 20; rot2 = 20;
} }
} }
GL11.glTranslated(0, -2 * px, 0); GL11.glTranslated(0, -2 * px, 0);
GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glRotated(-inwardAngle, 0, 1, 0); //
GL11.glRotated(-inwardAngle, 0, 1, 0);
GL11.glTranslated(pivotSideOffset * px, pivotFrontOffset * px, pivotZOffset * px);
GL11.glRotated(rot * 0.5, 0, 1, 0); GL11.glTranslated(pivotSideOffset * px, pivotFrontOffset * px, pivotZOffset * px);
GL11.glRotated(rot + 5, 0, 0, 1); GL11.glRotated(rot * 0.5, 0, 1, 0);
GL11.glRotated(45, 1, 0, 0); GL11.glRotated(rot + 5, 0, 0, 1);
GL11.glTranslated(-pivotSideOffset * px, -pivotFrontOffset * px, -pivotZOffset * px); 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);
GL11.glTranslated(-pivotSideOffset * px, -pivotFrontOffset * px, -pivotZOffset * px); GL11.glRotated(rot, 0, 0, 1);
wingLB.render(par7); 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); GL11.glTranslated(tipSideOffset * px, pivotFrontOffset * px, tipZOffset * px);
if(doesRotateZ()) GL11.glRotated(rot2, 0, 1, 0);
GL11.glRotated(rot2 * 0.25 + 5, 0, 0, 1); if(doesRotateZ())
GL11.glTranslated(-tipSideOffset * px, -pivotFrontOffset * px, -tipZOffset * px); GL11.glRotated(rot2 * 0.25 + 5, 0, 0, 1);
wingLT.render(par7); GL11.glTranslated(-tipSideOffset * px, -pivotFrontOffset * px, -tipZOffset * px);
this.wingLT.render(scaleFactor);
//
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glRotated(inwardAngle, 0, 1, 0); //
GL11.glRotated(inwardAngle, 0, 1, 0);
GL11.glTranslated(-pivotSideOffset * px, pivotFrontOffset * px, pivotZOffset * px);
GL11.glRotated(-rot * 0.5, 0, 1, 0); GL11.glTranslated(-pivotSideOffset * px, pivotFrontOffset * px, pivotZOffset * px);
GL11.glRotated(-rot - 5, 0, 0, 1); GL11.glRotated(-rot * 0.5, 0, 1, 0);
GL11.glRotated(45, 1, 0, 0); GL11.glRotated(-rot - 5, 0, 0, 1);
GL11.glTranslated(pivotSideOffset * px, -pivotFrontOffset * px, -pivotZOffset * px); 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);
GL11.glTranslated(pivotSideOffset * px, -pivotFrontOffset * px, -pivotZOffset * px); GL11.glRotated(-rot, 0, 0, 1);
wingRB.render(par7); 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); GL11.glTranslated(-tipSideOffset * px, pivotFrontOffset * px, tipZOffset * px);
if(doesRotateZ()) GL11.glRotated(-rot2, 0, 1, 0);
GL11.glRotated(-rot2 * 0.25 - 5, 0, 0, 1); if(doesRotateZ())
GL11.glTranslated(tipSideOffset * px, -pivotFrontOffset * px, -tipZOffset * px); GL11.glRotated(-rot2 * 0.25 - 5, 0, 0, 1);
wingRT.render(par7); GL11.glTranslated(tipSideOffset * px, -pivotFrontOffset * px, -tipZOffset * px);
this.wingRT.render(scaleFactor);
//
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glDisable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
protected boolean doesRotateZ() { protected boolean doesRotateZ() {
return true; return true;
} }
protected ResourceLocation getTexture() { protected ResourceLocation getTexture() {
if(this.type == 2) if(this.type == 2)
return ResourceManager.wings_bob; return ResourceManager.wings_bob;
if(this.type == 3) if(this.type == 3)
return ResourceManager.wings_black; return ResourceManager.wings_black;
return ResourceManager.wings_murk; return ResourceManager.wings_murk;
} }
} }

View File

@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
@ -13,21 +12,22 @@ import net.minecraft.entity.Entity;
public class ModelArmorWingsPheo extends ModelArmorBase { public class ModelArmorWingsPheo extends ModelArmorBase {
ModelRendererObj axe; ModelRendererObj axe;
public ModelArmorWingsPheo() { public ModelArmorWingsPheo() {
super(0); super(0);
axe = new ModelRendererObj(ResourceManager.armor_axepack, "Wings"); this.axe = new ModelRendererObj(ResourceManager.armor_axepack, "Wings");
} }
@Override @Override
public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, entity);
body.copyTo(axe); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
this.body.copyTo(this.axe);
GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.wings_pheo); bindTexture(ResourceManager.wings_pheo);
axe.render(par7); this.axe.render(scaleFactor);
GL11.glPushMatrix(); GL11.glPushMatrix();
float lastX = OpenGlHelper.lastBrightnessX; float lastX = OpenGlHelper.lastBrightnessX;
float lastY = OpenGlHelper.lastBrightnessY; float lastY = OpenGlHelper.lastBrightnessY;
@ -37,16 +37,16 @@ public class ModelArmorWingsPheo extends ModelArmorBase {
GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
double pixel = 0.0625D; double pixel = 0.0625D;
if(entity.isSneaking()) { if(entity.isSneaking()) {
GL11.glRotated(28.6479D, 1, 0, 0); GL11.glRotated(28.6479D, 1, 0, 0);
} }
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslated(0, pixel * 15, pixel * 5.5); GL11.glTranslated(0, pixel * 15, pixel * 5.5);
this.renderFlame(); renderFlame();
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPushMatrix(); GL11.glPushMatrix();
@ -54,26 +54,26 @@ public class ModelArmorWingsPheo extends ModelArmorBase {
GL11.glRotated(-25, 0, 1, 0); GL11.glRotated(-25, 0, 1, 0);
GL11.glRotated(-90, 0, 0, 1); GL11.glRotated(-90, 0, 0, 1);
GL11.glTranslated(0, pixel * 5, 0); GL11.glTranslated(0, pixel * 5, 0);
this.renderFlame(); renderFlame();
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslated(0, -pixel * 5, 0); GL11.glTranslated(0, -pixel * 5, 0);
GL11.glRotated(45, 0, 0, 1); GL11.glRotated(45, 0, 0, 1);
GL11.glTranslated(-pixel, pixel * 5.5, 0); GL11.glTranslated(-pixel, pixel * 5.5, 0);
this.renderFlame(); renderFlame();
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslated(0, -pixel * 5, 0); GL11.glTranslated(0, -pixel * 5, 0);
GL11.glRotated(-45, 0, 0, 1); GL11.glRotated(-45, 0, 0, 1);
GL11.glTranslated(pixel, pixel * 5.5, 0); GL11.glTranslated(pixel, pixel * 5.5, 0);
this.renderFlame(); renderFlame();
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslated(0, pixel * 15, pixel * 5.5); GL11.glTranslated(0, pixel * 15, pixel * 5.5);
this.renderFlame(); renderFlame();
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPushMatrix(); GL11.glPushMatrix();
@ -81,20 +81,20 @@ public class ModelArmorWingsPheo extends ModelArmorBase {
GL11.glRotated(25, 0, 1, 0); GL11.glRotated(25, 0, 1, 0);
GL11.glRotated(90, 0, 0, 1); GL11.glRotated(90, 0, 0, 1);
GL11.glTranslated(0, pixel * 5, 0); GL11.glTranslated(0, pixel * 5, 0);
this.renderFlame(); renderFlame();
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslated(0, -pixel * 5, 0); GL11.glTranslated(0, -pixel * 5, 0);
GL11.glRotated(45, 0, 0, 1); GL11.glRotated(45, 0, 0, 1);
GL11.glTranslated(-pixel, pixel * 5.5, 0); GL11.glTranslated(-pixel, pixel * 5.5, 0);
this.renderFlame(); renderFlame();
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslated(0, -pixel * 5, 0); GL11.glTranslated(0, -pixel * 5, 0);
GL11.glRotated(-45, 0, 0, 1); GL11.glRotated(-45, 0, 0, 1);
GL11.glTranslated(pixel, pixel * 5.5, 0); GL11.glTranslated(pixel, pixel * 5.5, 0);
this.renderFlame(); renderFlame();
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPopMatrix(); GL11.glPopMatrix();
@ -104,15 +104,15 @@ public class ModelArmorWingsPheo extends ModelArmorBase {
GL11.glPopAttrib(); GL11.glPopAttrib();
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY);
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glShadeModel(GL11.GL_FLAT); GL11.glShadeModel(GL11.GL_FLAT);
} }
private static void renderFlame() { private static void renderFlame() {
Tessellator tess = Tessellator.instance; Tessellator tess = Tessellator.instance;
tess.startDrawing(GL11.GL_TRIANGLES); tess.startDrawing(GL11.GL_TRIANGLES);
double b = 0.125D; double b = 0.125D;
double t = 0.375; double t = 0.375;
double w = 0.0625D; double w = 0.0625D;
@ -120,7 +120,7 @@ public class ModelArmorWingsPheo extends ModelArmorBase {
int colorBase = 0x808080; int colorBase = 0x808080;
int colorFlame = 0x004040; int colorFlame = 0x004040;
int colorTip = 0x000000; int colorTip = 0x000000;
tess.setColorOpaque_I(colorBase); tess.setColorOpaque_I(colorBase);
tess.addVertex(0, 0, 0); tess.addVertex(0, 0, 0);
tess.setColorOpaque_I(colorFlame); tess.setColorOpaque_I(colorFlame);
@ -168,9 +168,9 @@ public class ModelArmorWingsPheo extends ModelArmorBase {
tess.setColorOpaque_I(colorFlame); tess.setColorOpaque_I(colorFlame);
tess.addVertex(s2, b, -s2); tess.addVertex(s2, b, -s2);
tess.addVertex(w, b, 0); tess.addVertex(w, b, 0);
//////////////////////// ////////////////////////
tess.setColorOpaque_I(colorTip); tess.setColorOpaque_I(colorTip);
tess.addVertex(0, t, 0); tess.addVertex(0, t, 0);
tess.setColorOpaque_I(colorFlame); tess.setColorOpaque_I(colorFlame);
@ -218,7 +218,7 @@ public class ModelArmorWingsPheo extends ModelArmorBase {
tess.setColorOpaque_I(colorFlame); tess.setColorOpaque_I(colorFlame);
tess.addVertex(s2, b, -s2); tess.addVertex(s2, b, -s2);
tess.addVertex(w, b, 0); tess.addVertex(w, b, 0);
tess.draw(); tess.draw();
} }
} }

View File

@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelB92 extends ModelBase { public class ModelB92 extends ModelBase {
// fields
ModelRenderer Muzzle1; ModelRenderer Muzzle1;
ModelRenderer Barrel1; ModelRenderer Barrel1;
ModelRenderer Barrel2; ModelRenderer Barrel2;
@ -35,182 +35,178 @@ public class ModelB92 extends ModelBase {
ModelRenderer BodyPlate; ModelRenderer BodyPlate;
public ModelB92() { public ModelB92() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 64; this.textureHeight = 64;
Muzzle1 = new ModelRenderer(this, 22, 36); this.Muzzle1 = new ModelRenderer(this, 22, 36);
Muzzle1.addBox(0F, 0F, 0F, 2, 3, 2); this.Muzzle1.addBox(0F, 0F, 0F, 2, 3, 2);
Muzzle1.setRotationPoint(-24F, 0.5F, -1F); this.Muzzle1.setRotationPoint(-24F, 0.5F, -1F);
Muzzle1.setTextureSize(64, 64); this.Muzzle1.setTextureSize(64, 64);
Muzzle1.mirror = true; this.Muzzle1.mirror = true;
setRotation(Muzzle1, 0F, 0F, 0F); setRotation(this.Muzzle1, 0F, 0F, 0F);
Barrel1 = new ModelRenderer(this, 0, 0); this.Barrel1 = new ModelRenderer(this, 0, 0);
Barrel1.addBox(0F, 0F, 0F, 24, 2, 3); this.Barrel1.addBox(0F, 0F, 0F, 24, 2, 3);
Barrel1.setRotationPoint(-24F, 1F, -1.5F); this.Barrel1.setRotationPoint(-24F, 1F, -1.5F);
Barrel1.setTextureSize(64, 64); this.Barrel1.setTextureSize(64, 64);
Barrel1.mirror = true; this.Barrel1.mirror = true;
setRotation(Barrel1, 0F, 0F, 0F); setRotation(this.Barrel1, 0F, 0F, 0F);
Barrel2 = new ModelRenderer(this, 0, 5); this.Barrel2 = new ModelRenderer(this, 0, 5);
Barrel2.addBox(0F, 0F, 0F, 22, 1, 2); this.Barrel2.addBox(0F, 0F, 0F, 22, 1, 2);
Barrel2.setRotationPoint(-22F, 0.5F, -1F); this.Barrel2.setRotationPoint(-22F, 0.5F, -1F);
Barrel2.setTextureSize(64, 64); this.Barrel2.setTextureSize(64, 64);
Barrel2.mirror = true; this.Barrel2.mirror = true;
setRotation(Barrel2, 0F, 0F, 0F); setRotation(this.Barrel2, 0F, 0F, 0F);
Grip = new ModelRenderer(this, 0, 8); this.Grip = new ModelRenderer(this, 0, 8);
Grip.addBox(0F, 0F, 0F, 20, 3, 4); this.Grip.addBox(0F, 0F, 0F, 20, 3, 4);
Grip.setRotationPoint(-20F, 3F, -2F); this.Grip.setRotationPoint(-20F, 3F, -2F);
Grip.setTextureSize(64, 64); this.Grip.setTextureSize(64, 64);
Grip.mirror = true; this.Grip.mirror = true;
setRotation(Grip, 0F, 0F, 0F); setRotation(this.Grip, 0F, 0F, 0F);
Front1 = new ModelRenderer(this, 10, 36); this.Front1 = new ModelRenderer(this, 10, 36);
Front1.addBox(0F, 0F, 0F, 2, 4, 4); this.Front1.addBox(0F, 0F, 0F, 2, 4, 4);
Front1.setRotationPoint(-22F, 0.5F, -2F); this.Front1.setRotationPoint(-22F, 0.5F, -2F);
Front1.setTextureSize(64, 64); this.Front1.setTextureSize(64, 64);
Front1.mirror = true; this.Front1.mirror = true;
setRotation(Front1, 0F, 0F, 0F); setRotation(this.Front1, 0F, 0F, 0F);
Front2 = new ModelRenderer(this, 0, 36); this.Front2 = new ModelRenderer(this, 0, 36);
Front2.addBox(0F, 0F, 0F, 2, 6, 3); this.Front2.addBox(0F, 0F, 0F, 2, 6, 3);
Front2.setRotationPoint(-22F, 0F, -1.5F); this.Front2.setRotationPoint(-22F, 0F, -1.5F);
Front2.setTextureSize(64, 64); this.Front2.setTextureSize(64, 64);
Front2.mirror = true; this.Front2.mirror = true;
setRotation(Front2, 0F, 0F, 0F); setRotation(this.Front2, 0F, 0F, 0F);
Body = new ModelRenderer(this, 0, 15); this.Body = new ModelRenderer(this, 0, 15);
Body.addBox(0F, 0F, 0F, 15, 7, 4); this.Body.addBox(0F, 0F, 0F, 15, 7, 4);
Body.setRotationPoint(0F, 0.5F, -2F); this.Body.setRotationPoint(0F, 0.5F, -2F);
Body.setTextureSize(64, 64); this.Body.setTextureSize(64, 64);
Body.mirror = true; this.Body.mirror = true;
setRotation(Body, 0F, 0F, 0F); setRotation(this.Body, 0F, 0F, 0F);
Top = new ModelRenderer(this, 28, 60); this.Top = new ModelRenderer(this, 28, 60);
Top.addBox(0F, 0F, 0F, 15, 1, 3); this.Top.addBox(0F, 0F, 0F, 15, 1, 3);
Top.setRotationPoint(0F, 0F, -1.5F); this.Top.setRotationPoint(0F, 0F, -1.5F);
Top.setTextureSize(64, 64); this.Top.setTextureSize(64, 64);
Top.mirror = true; this.Top.mirror = true;
setRotation(Top, 0F, 0F, 0F); setRotation(this.Top, 0F, 0F, 0F);
GripBottom = new ModelRenderer(this, 24, 43); this.GripBottom = new ModelRenderer(this, 24, 43);
GripBottom.addBox(0F, 0F, 0F, 18, 1, 2); this.GripBottom.addBox(0F, 0F, 0F, 18, 1, 2);
GripBottom.setRotationPoint(-18F, 5.5F, -1F); this.GripBottom.setRotationPoint(-18F, 5.5F, -1F);
GripBottom.setTextureSize(64, 64); this.GripBottom.setTextureSize(64, 64);
GripBottom.mirror = true; this.GripBottom.mirror = true;
setRotation(GripBottom, 0F, 0F, 0F); setRotation(this.GripBottom, 0F, 0F, 0F);
Handle = new ModelRenderer(this, 0, 45); this.Handle = new ModelRenderer(this, 0, 45);
Handle.addBox(0F, 0F, 0F, 6, 15, 4); this.Handle.addBox(0F, 0F, 0F, 6, 15, 4);
Handle.setRotationPoint(6F, 7F, -2F); this.Handle.setRotationPoint(6F, 7F, -2F);
Handle.setTextureSize(64, 64); this.Handle.setTextureSize(64, 64);
Handle.mirror = true; this.Handle.mirror = true;
setRotation(Handle, 0F, 0F, -0.2268928F); setRotation(this.Handle, 0F, 0F, -0.2268928F);
HandleBack = new ModelRenderer(this, 20, 46); this.HandleBack = new ModelRenderer(this, 20, 46);
HandleBack.addBox(5.5F, 0F, 0F, 1, 15, 3); this.HandleBack.addBox(5.5F, 0F, 0F, 1, 15, 3);
HandleBack.setRotationPoint(6F, 7F, -1.5F); this.HandleBack.setRotationPoint(6F, 7F, -1.5F);
HandleBack.setTextureSize(64, 64); this.HandleBack.setTextureSize(64, 64);
HandleBack.mirror = true; this.HandleBack.mirror = true;
setRotation(HandleBack, 0F, 0F, -0.2268928F); setRotation(this.HandleBack, 0F, 0F, -0.2268928F);
Frame1 = new ModelRenderer(this, 28, 57); this.Frame1 = new ModelRenderer(this, 28, 57);
Frame1.addBox(0F, 0F, 0F, 7, 1, 2); this.Frame1.addBox(0F, 0F, 0F, 7, 1, 2);
Frame1.setRotationPoint(0.5F, 11F, -1F); this.Frame1.setRotationPoint(0.5F, 11F, -1F);
Frame1.setTextureSize(64, 64); this.Frame1.setTextureSize(64, 64);
Frame1.mirror = true; this.Frame1.mirror = true;
setRotation(Frame1, 0F, 0F, 0F); setRotation(this.Frame1, 0F, 0F, 0F);
Frame2 = new ModelRenderer(this, 28, 51); this.Frame2 = new ModelRenderer(this, 28, 51);
Frame2.addBox(0F, 0F, 0F, 2, 4, 2); this.Frame2.addBox(0F, 0F, 0F, 2, 4, 2);
Frame2.setRotationPoint(-2F, 6.5F, -1F); this.Frame2.setRotationPoint(-2F, 6.5F, -1F);
Frame2.setTextureSize(64, 64); this.Frame2.setTextureSize(64, 64);
Frame2.mirror = true; this.Frame2.mirror = true;
setRotation(Frame2, 0F, 0F, 0F); setRotation(this.Frame2, 0F, 0F, 0F);
Frame3 = new ModelRenderer(this, 46, 57); this.Frame3 = new ModelRenderer(this, 46, 57);
Frame3.addBox(0F, -1F, 0F, 3, 1, 2); this.Frame3.addBox(0F, -1F, 0F, 3, 1, 2);
Frame3.setRotationPoint(-2F, 10.5F, -1F); this.Frame3.setRotationPoint(-2F, 10.5F, -1F);
Frame3.setTextureSize(64, 64); this.Frame3.setTextureSize(64, 64);
Frame3.mirror = true; this.Frame3.mirror = true;
setRotation(Frame3, 0F, 0F, 0.5235988F); setRotation(this.Frame3, 0F, 0F, 0.5235988F);
Trigger = new ModelRenderer(this, 36, 53); this.Trigger = new ModelRenderer(this, 36, 53);
Trigger.addBox(0F, 0F, 0F, 2, 3, 1); this.Trigger.addBox(0F, 0F, 0F, 2, 3, 1);
Trigger.setRotationPoint(4F, 7F, -0.5F); this.Trigger.setRotationPoint(4F, 7F, -0.5F);
Trigger.setTextureSize(64, 64); this.Trigger.setTextureSize(64, 64);
Trigger.mirror = true; this.Trigger.mirror = true;
setRotation(Trigger, 0F, 0F, 0.1919862F); setRotation(this.Trigger, 0F, 0F, 0.1919862F);
BackPlate1 = new ModelRenderer(this, 56, 53); this.BackPlate1 = new ModelRenderer(this, 56, 53);
BackPlate1.addBox(-1F, 0F, 0F, 1, 4, 3); this.BackPlate1.addBox(-1F, 0F, 0F, 1, 4, 3);
BackPlate1.setRotationPoint(15F, 0F, -1.5F); this.BackPlate1.setRotationPoint(15F, 0F, -1.5F);
BackPlate1.setTextureSize(64, 64); this.BackPlate1.setTextureSize(64, 64);
BackPlate1.mirror = true; this.BackPlate1.mirror = true;
setRotation(BackPlate1, 0F, 0F, -0.5235988F); setRotation(this.BackPlate1, 0F, 0F, -0.5235988F);
Back = new ModelRenderer(this, 42, 49); this.Back = new ModelRenderer(this, 42, 49);
Back.addBox(0F, 0F, 0F, 2, 4, 4); this.Back.addBox(0F, 0F, 0F, 2, 4, 4);
Back.setRotationPoint(15F, 3.5F, -2F); this.Back.setRotationPoint(15F, 3.5F, -2F);
Back.setTextureSize(64, 64); this.Back.setTextureSize(64, 64);
Back.mirror = true; this.Back.mirror = true;
setRotation(Back, 0F, 0F, 0F); setRotation(this.Back, 0F, 0F, 0F);
BackPlate2 = new ModelRenderer(this, 48, 5); this.BackPlate2 = new ModelRenderer(this, 48, 5);
BackPlate2.addBox(-2F, 0F, 0F, 2, 4, 4); this.BackPlate2.addBox(-2F, 0F, 0F, 2, 4, 4);
BackPlate2.setRotationPoint(15F, 0.5F, -2F); this.BackPlate2.setRotationPoint(15F, 0.5F, -2F);
BackPlate2.setTextureSize(64, 64); this.BackPlate2.setTextureSize(64, 64);
BackPlate2.mirror = true; this.BackPlate2.mirror = true;
setRotation(BackPlate2, 0F, 0F, -0.4886922F); setRotation(this.BackPlate2, 0F, 0F, -0.4886922F);
Pump1 = new ModelRenderer(this, 46, 29); this.Pump1 = new ModelRenderer(this, 46, 29);
Pump1.addBox(0F, 0F, 0F, 7, 2, 2); this.Pump1.addBox(0F, 0F, 0F, 7, 2, 2);
Pump1.setRotationPoint(10F, 1F, -1F); this.Pump1.setRotationPoint(10F, 1F, -1F);
Pump1.setTextureSize(64, 64); this.Pump1.setTextureSize(64, 64);
Pump1.mirror = true; this.Pump1.mirror = true;
setRotation(Pump1, 0F, 0F, 0F); setRotation(this.Pump1, 0F, 0F, 0F);
Pump2 = new ModelRenderer(this, 44, 33); this.Pump2 = new ModelRenderer(this, 44, 33);
Pump2.addBox(0F, 0F, 0F, 3, 3, 7); this.Pump2.addBox(0F, 0F, 0F, 3, 3, 7);
Pump2.setRotationPoint(17F, 0.5F, -3.5F); this.Pump2.setRotationPoint(17F, 0.5F, -3.5F);
Pump2.setTextureSize(64, 64); this.Pump2.setTextureSize(64, 64);
Pump2.mirror = true; this.Pump2.mirror = true;
setRotation(Pump2, 0F, 0F, 0F); setRotation(this.Pump2, 0F, 0F, 0F);
BodyPlate = new ModelRenderer(this, 0, 26); this.BodyPlate = new ModelRenderer(this, 0, 26);
BodyPlate.addBox(0F, 0F, 0F, 14, 5, 5); this.BodyPlate.addBox(0F, 0F, 0F, 14, 5, 5);
BodyPlate.setRotationPoint(1.5F, 2F, -2.5F); this.BodyPlate.setRotationPoint(1.5F, 2F, -2.5F);
BodyPlate.setTextureSize(64, 64); this.BodyPlate.setTextureSize(64, 64);
BodyPlate.mirror = true; this.BodyPlate.mirror = true;
setRotation(BodyPlate, 0F, 0F, 0F); setRotation(this.BodyPlate, 0F, 0F, 0F);
} }
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { @Override
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) {
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
Muzzle1.render(f5); this.Muzzle1.render(scaleFactor);
Barrel1.render(f5); this.Barrel1.render(scaleFactor);
Barrel2.render(f5); this.Barrel2.render(scaleFactor);
Grip.render(f5); this.Grip.render(scaleFactor);
Front1.render(f5); this.Front1.render(scaleFactor);
Front2.render(f5); this.Front2.render(scaleFactor);
Body.render(f5); this.Body.render(scaleFactor);
Top.render(f5); this.Top.render(scaleFactor);
GripBottom.render(f5); this.GripBottom.render(scaleFactor);
Handle.render(f5); this.Handle.render(scaleFactor);
HandleBack.render(f5); this.HandleBack.render(scaleFactor);
Frame1.render(f5); this.Frame1.render(scaleFactor);
Frame2.render(f5); this.Frame2.render(scaleFactor);
Frame3.render(f5); this.Frame3.render(scaleFactor);
Trigger.render(f5); this.Trigger.render(scaleFactor);
BackPlate1.render(f5); this.BackPlate1.render(scaleFactor);
Back.render(f5); this.Back.render(scaleFactor);
BackPlate2.render(f5); this.BackPlate2.render(scaleFactor);
Pump1.render(f5); this.Pump1.render(scaleFactor);
Pump2.render(f5); this.Pump2.render(scaleFactor);
BodyPlate.render(f5); 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; this.Pump1.offsetX += tran;
Pump2.offsetX += tran; this.Pump2.offsetX += tran;
render(entity, f, f1, f2, f3, f4, f5); this.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
Pump1.offsetX -= tran; this.Pump1.offsetX -= tran;
Pump2.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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
} }

View File

@ -5,29 +5,27 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelBackTesla extends ModelArmorBase { public class ModelBackTesla extends ModelArmorBase {
public ModelBackTesla() { public ModelBackTesla() {
super(1); super(1);
body = new ModelRendererObj(ResourceManager.armor_mod_tesla); this.body = new ModelRendererObj(ResourceManager.armor_mod_tesla);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.mod_tesla); bindTexture(ResourceManager.mod_tesla);
body.render(par7); this.body.render(scaleFactor);
GL11.glShadeModel(GL11.GL_FLAT); GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -4,94 +4,78 @@
// Keep in mind that you still need to fill in some blanks // Keep in mind that you still need to fill in some blanks
// - ZeuX // - ZeuX
package com.hbm.render.model; package com.hbm.render.model;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelBigSword extends ModelBase 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);
}
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;
}
} }

View File

@ -13,30 +13,26 @@ import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
public class ModelBlockSpider extends ModelBase { public class ModelBlockSpider extends ModelBase {
private final RenderBlocks field_147920_a = new RenderBlocks();
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
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.glPushMatrix();
GL11.glRotatef(90, 0, -1, 0); GL11.glRotatef(90, 0, -1, 0);
GL11.glRotatef(180, 0, 0, 1); GL11.glRotatef(180, 0, 0, 1);
GL11.glTranslatef(0, -1.5F, 0); 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.glPushMatrix();
GL11.glTranslated(0, rot * 0.005, 0); GL11.glTranslated(0, rot * 0.005, 0);
GL11.glRotatef(rot, 0, 1, 0); GL11.glRotatef(rot, 0, 1, 0);
@ -54,16 +50,15 @@ public class ModelBlockSpider extends ModelBase {
ResourceManager.spider.renderPart("Leg6"); ResourceManager.spider.renderPart("Leg6");
ResourceManager.spider.renderPart("Leg8"); ResourceManager.spider.renderPart("Leg8");
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPushMatrix(); GL11.glPushMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
GL11.glTranslated(0, 0.75, 0); 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(); GL11.glPopMatrix();
//this.field_147920_a.setRenderBoundsFromBlock(block); //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); //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(); GL11.glPopMatrix();
} }
} }

View File

@ -11,66 +11,60 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelBroadcaster extends ModelBase { public class ModelBroadcaster extends ModelBase {
// fields
ModelRenderer Shape1; ModelRenderer Shape1;
ModelRenderer Shape2; ModelRenderer Shape2;
ModelRenderer Shape3; ModelRenderer Shape3;
ModelRenderer Shape4; ModelRenderer Shape4;
public ModelBroadcaster() { public ModelBroadcaster() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 32; this.textureHeight = 32;
Shape1 = new ModelRenderer(this, 0, 0); this.Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 14, 10, 8); this.Shape1.addBox(0F, 0F, 0F, 14, 10, 8);
Shape1.setRotationPoint(-7F, 14F, -4F); this.Shape1.setRotationPoint(-7F, 14F, -4F);
Shape1.setTextureSize(64, 32); this.Shape1.setTextureSize(64, 32);
Shape1.mirror = true; this.Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F); setRotation(this.Shape1, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 4, 21); this.Shape2 = new ModelRenderer(this, 4, 21);
Shape2.addBox(0F, 0F, 0F, 2, 3, 2); this.Shape2.addBox(0F, 0F, 0F, 2, 3, 2);
Shape2.setRotationPoint(-5F, 11F, -1F); this.Shape2.setRotationPoint(-5F, 11F, -1F);
Shape2.setTextureSize(64, 32); this.Shape2.setTextureSize(64, 32);
Shape2.mirror = true; this.Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F); setRotation(this.Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 0, 18); this.Shape3 = new ModelRenderer(this, 0, 18);
Shape3.addBox(0F, 0F, 0F, 1, 11, 1); this.Shape3.addBox(0F, 0F, 0F, 1, 11, 1);
Shape3.setRotationPoint(-4.5F, 0F, -0.5F); this.Shape3.setRotationPoint(-4.5F, 0F, -0.5F);
Shape3.setTextureSize(64, 32); this.Shape3.setTextureSize(64, 32);
Shape3.mirror = true; this.Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F); setRotation(this.Shape3, 0F, 0F, 0F);
Shape4 = new ModelRenderer(this, 4, 18); this.Shape4 = new ModelRenderer(this, 4, 18);
Shape4.addBox(0F, 0F, 0F, 3, 2, 1); this.Shape4.addBox(0F, 0F, 0F, 3, 2, 1);
Shape4.setRotationPoint(2F, 12F, -0.5F); this.Shape4.setRotationPoint(2F, 12F, -0.5F);
Shape4.setTextureSize(64, 32); this.Shape4.setTextureSize(64, 32);
Shape4.mirror = true; this.Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0F); setRotation(this.Shape4, 0F, 0F, 0F);
} }
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { @Override
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) {
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
Shape1.render(f5); this.renderModel(scaleFactor);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
} }
public void renderModel(float f) { public void renderModel(float scaleFactor) {
Shape1.render(f);
Shape2.render(f); this.Shape1.render(scaleFactor);
Shape3.render(f); this.Shape2.render(scaleFactor);
Shape4.render(f); 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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
} }

View File

@ -9,37 +9,32 @@ public class ModelBuckshot extends ModelBase {
ModelRenderer bullet; ModelRenderer bullet;
public ModelBuckshot() { public ModelBuckshot() {
textureWidth = 4; this.textureWidth = 4;
textureHeight = 4; this.textureHeight = 4;
bullet = new ModelRenderer(this, 0, 0); this.bullet = new ModelRenderer(this, 0, 0);
bullet.addBox(0F, 0F, 0F, 1, 1, 1); this.bullet.addBox(0F, 0F, 0F, 1, 1, 1);
bullet.setRotationPoint(1F, -0.5F, -0.5F); this.bullet.setRotationPoint(1F, -0.5F, -0.5F);
bullet.setTextureSize(4, 4); this.bullet.setTextureSize(4, 4);
bullet.mirror = true; this.bullet.mirror = true;
setRotation(bullet, 0F, 0F, 0F); setRotation(this.bullet, 0F, 0F, 0F);
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.renderAll(scaleFactor);
bullet.render(f5);
} }
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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
}

View File

@ -9,37 +9,32 @@ public class ModelBullet extends ModelBase {
ModelRenderer bullet; ModelRenderer bullet;
public ModelBullet() { public ModelBullet() {
textureWidth = 8; this.textureWidth = 8;
textureHeight = 4; this.textureHeight = 4;
bullet = new ModelRenderer(this, 0, 0); this.bullet = new ModelRenderer(this, 0, 0);
bullet.addBox(0F, 0F, 0F, 2, 1, 1); this.bullet.addBox(0F, 0F, 0F, 2, 1, 1);
bullet.setRotationPoint(1F, -0.5F, -0.5F); this.bullet.setRotationPoint(1F, -0.5F, -0.5F);
bullet.setTextureSize(8, 4); this.bullet.setTextureSize(8, 4);
bullet.mirror = true; this.bullet.mirror = true;
setRotation(bullet, 0F, 0F, 0F); setRotation(this.bullet, 0F, 0F, 0F);
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.renderAll(scaleFactor);
bullet.render(f5);
} }
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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
}

View File

@ -9,37 +9,32 @@ public class ModelChopperMine extends ModelBase {
ModelRenderer bullet; ModelRenderer bullet;
public ModelChopperMine() { public ModelChopperMine() {
textureWidth = 32; this.textureWidth = 32;
textureHeight = 16; this.textureHeight = 16;
bullet = new ModelRenderer(this, 0, 0); this.bullet = new ModelRenderer(this, 0, 0);
bullet.addBox(0F, 0F, 0F, 8, 8, 8); this.bullet.addBox(0F, 0F, 0F, 8, 8, 8);
bullet.setRotationPoint(-4F, -4F, -4F); this.bullet.setRotationPoint(-4F, -4F, -4F);
bullet.setTextureSize(32, 16); this.bullet.setTextureSize(32, 16);
bullet.mirror = true; this.bullet.mirror = true;
setRotation(bullet, 0F, 0F, 0F); setRotation(this.bullet, 0F, 0F, 0F);
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.renderAll(scaleFactor);
bullet.render(f5);
} }
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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
}

View File

@ -9,33 +9,32 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
public class ModelCloak extends ModelBiped { public class ModelCloak extends ModelBiped {
public ModelCloak() { public ModelCloak() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 32; this.textureHeight = 32;
} }
@Override @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; EntityPlayer player = (EntityPlayer) entity;
if(player.isSneaking()) { this.isSneak = player.isSneaking();
this.isSneak = true; super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
} else {
this.isSneak = false;
}
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
if(par1Entity instanceof AbstractClientPlayer) {
AbstractClientPlayer player = (AbstractClientPlayer) par1Entity; if(entity instanceof AbstractClientPlayer) {
AbstractClientPlayer player = (AbstractClientPlayer) entity;
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 0.0F, 0.125F); 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 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) * par7 - (player.prevPosY + (player.posY - player.prevPosY) * par7); 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) * par7 - (player.prevPosZ + (player.posZ - player.prevPosZ) * par7); 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) * par7; float f4 = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * scaleFactor;
double d1 = MathHelper.sin(f4 * (float) Math.PI / 180.0F); double d1 = MathHelper.sin(f4 * (float) Math.PI / 180.0F);
double d2 = (-MathHelper.cos(f4 * (float) Math.PI / 180.0F)); double d2 = (-MathHelper.cos(f4 * (float) Math.PI / 180.0F));
float f5 = (float) d4 * 10.0F; float f5 = (float) d4 * 10.0F;
@ -55,8 +54,8 @@ public class ModelCloak extends ModelBiped {
f6 = 0.0F; f6 = 0.0F;
} }
float f8 = player.prevCameraYaw + (player.cameraYaw - player.prevCameraYaw) * par7; float f8 = player.prevCameraYaw + (player.cameraYaw - player.prevCameraYaw) * scaleFactor;
f5 += MathHelper.sin((player.prevDistanceWalkedModified + (player.distanceWalkedModified - player.prevDistanceWalkedModified) * par7) * 6.0F) * 32.0F * f8; f5 += MathHelper.sin((player.prevDistanceWalkedModified + (player.distanceWalkedModified - player.prevDistanceWalkedModified) * scaleFactor) * 6.0F) * 32.0F * f8;
if(player.isSneaking()) { if(player.isSneaking()) {
f5 += 25.0F; 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, 0.0F, 1.0F);
GL11.glRotatef(-f7 / 2.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-f7 / 2.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(180.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(); GL11.glPopMatrix();
} }
} }

View File

@ -17,152 +17,133 @@ import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
public class ModelCrab extends ModelBase { public class ModelCrab extends ModelBase {
int textureX = 64;
int textureY = 32;
public ModelRenderer modelcrabModel[]; public ModelRenderer[] crabModel;
public ModelCrab() { public ModelCrab() {
this.textureWidth = this.textureX; this.textureWidth = 64;
this.textureHeight = this.textureY; this.textureHeight = 32;
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
modelcrabModel[0].addBox(0F, 0F, 0F, 4, 1, 4, 0F); // Box 1 this.crabModel = new ModelRenderer[20];
modelcrabModel[0].setRotationPoint(-2F, -3F, -2F); 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 this.crabModel[0].addBox(0F, 0F, 0F, 4, 1, 4, 0F); // Box 1
modelcrabModel[1].setRotationPoint(-2F, -4F, -3F); this.crabModel[0].setRotationPoint(-2F, -3F, -2F);
modelcrabModel[2].addBox(0F, 0F, 0F, 3, 1, 3, 0F); // Box 3 this.crabModel[1].addBox(0F, 0F, 0F, 4, 1, 6, 0F); // Box 2
modelcrabModel[2].setRotationPoint(-1.5F, -5F, -1.5F); this.crabModel[1].setRotationPoint(-2F, -4F, -3F);
modelcrabModel[3].addBox(0F, 0F, 0F, 4, 1, 2, 0F); // Box 4 this.crabModel[2].addBox(0F, 0F, 0F, 3, 1, 3, 0F); // Box 3
modelcrabModel[3].setRotationPoint(-2F, -4.5F, -1F); this.crabModel[2].setRotationPoint(-1.5F, -5F, -1.5F);
modelcrabModel[4].addBox(0F, 0F, 0F, 6, 1, 4, 0F); // Box 5 this.crabModel[3].addBox(0F, 0F, 0F, 4, 1, 2, 0F); // Box 4
modelcrabModel[4].setRotationPoint(-3F, -4F, -2F); this.crabModel[3].setRotationPoint(-2F, -4.5F, -1F);
modelcrabModel[5].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 6 this.crabModel[4].addBox(0F, 0F, 0F, 6, 1, 4, 0F); // Box 5
modelcrabModel[5].setRotationPoint(0F, -3F, 0F); this.crabModel[4].setRotationPoint(-3F, -4F, -2F);
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;
modelcrabModel[6].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 7 this.crabModel[5].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 6
modelcrabModel[6].setRotationPoint(0F, -3F, 0F); this.crabModel[5].setRotationPoint(0F, -3F, 0F);
modelcrabModel[6].rotateAngleX = -0.17453293F; this.crabModel[5].rotateAngleX = -0.17453293F;
modelcrabModel[6].rotateAngleY = -0.78539816F; this.crabModel[5].rotateAngleY = 0.78539816F;
modelcrabModel[9].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 10 this.crabModel[10].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 11
modelcrabModel[9].setRotationPoint(0F, -3F, 0F); this.crabModel[10].setRotationPoint(0F, -3F, 0F);
modelcrabModel[9].rotateAngleX = 0.17453293F; this.crabModel[10].rotateAngleX = 0.17453293F;
modelcrabModel[9].rotateAngleY = -0.78539816F; this.crabModel[10].rotateAngleY = 0.78539816F;
modelcrabModel[7].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 8 this.crabModel[6].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 7
modelcrabModel[7].setRotationPoint(0F, -3F, 0F); this.crabModel[6].setRotationPoint(0F, -3F, 0F);
modelcrabModel[7].rotateAngleX = -0.17453293F; this.crabModel[6].rotateAngleX = -0.17453293F;
modelcrabModel[7].rotateAngleY = -2.35619449F; this.crabModel[6].rotateAngleY = -0.78539816F;
modelcrabModel[11].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 12 this.crabModel[9].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 10
modelcrabModel[11].setRotationPoint(0F, -3F, 0F); this.crabModel[9].setRotationPoint(0F, -3F, 0F);
modelcrabModel[11].rotateAngleX = 0.17453293F; this.crabModel[9].rotateAngleX = 0.17453293F;
modelcrabModel[11].rotateAngleY = -2.35619449F; this.crabModel[9].rotateAngleY = -0.78539816F;
modelcrabModel[8].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 9 this.crabModel[7].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 8
modelcrabModel[8].setRotationPoint(0F, -3F, 0F); this.crabModel[7].setRotationPoint(0F, -3F, 0F);
modelcrabModel[8].rotateAngleX = -0.17453293F; this.crabModel[7].rotateAngleX = -0.17453293F;
modelcrabModel[8].rotateAngleY = 2.35619449F; this.crabModel[7].rotateAngleY = -2.35619449F;
modelcrabModel[12].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 13 this.crabModel[11].addBox(-0.5F, 1F, 4F, 1, 3, 1, 0F); // Foot 12
modelcrabModel[12].setRotationPoint(0F, -3F, 0F); this.crabModel[11].setRotationPoint(0F, -3F, 0F);
modelcrabModel[12].rotateAngleX = 0.17453293F; this.crabModel[11].rotateAngleX = 0.17453293F;
modelcrabModel[12].rotateAngleY = 2.35619449F; this.crabModel[11].rotateAngleY = -2.35619449F;
modelcrabModel[13].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 14 this.crabModel[8].addBox(-0.5F, 0F, 2F, 1, 1, 3, 0F); // Leg 9
modelcrabModel[13].setRotationPoint(0F, -3F, 0F); this.crabModel[8].setRotationPoint(0F, -3F, 0F);
modelcrabModel[13].rotateAngleX = -0.43633231F; this.crabModel[8].rotateAngleX = -0.17453293F;
modelcrabModel[13].rotateAngleY = -0.6981317F; 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 this.crabModel[13].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 14
modelcrabModel[14].setRotationPoint(0F, -3F, 0F); this.crabModel[13].setRotationPoint(0F, -3F, 0F);
modelcrabModel[14].rotateAngleX = -0.43633231F; this.crabModel[13].rotateAngleX = -0.43633231F;
modelcrabModel[14].rotateAngleY = 0.87266463F; this.crabModel[13].rotateAngleY = -0.6981317F;
modelcrabModel[15].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 16 this.crabModel[14].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 15
modelcrabModel[15].setRotationPoint(0F, -3F, 0F); this.crabModel[14].setRotationPoint(0F, -3F, 0F);
modelcrabModel[15].rotateAngleX = -0.43633231F; this.crabModel[14].rotateAngleX = -0.43633231F;
modelcrabModel[15].rotateAngleY = -2.26892803F; this.crabModel[14].rotateAngleY = 0.87266463F;
modelcrabModel[16].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 17 this.crabModel[15].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 16
modelcrabModel[16].setRotationPoint(0F, -3F, 0F); this.crabModel[15].setRotationPoint(0F, -3F, 0F);
modelcrabModel[16].rotateAngleX = -0.43633231F; this.crabModel[15].rotateAngleX = -0.43633231F;
modelcrabModel[16].rotateAngleY = 2.44346095F; this.crabModel[15].rotateAngleY = -2.26892803F;
modelcrabModel[17].addBox(0F, 0F, 0F, 2, 1, 4, 0F); // Box 18 this.crabModel[16].addBox(-0.5F, 0F, 1.5F, 1, 1, 1, 0F); // Fang 17
modelcrabModel[17].setRotationPoint(-1F, -4.5F, -2F); 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 this.crabModel[17].addBox(0F, 0F, 0F, 2, 1, 4, 0F); // Box 18
modelcrabModel[18].setRotationPoint(-2.5F, -3.5F, -1.5F); this.crabModel[17].setRotationPoint(-1F, -4.5F, -2F);
modelcrabModel[19].addBox(0F, 0F, 0F, 3, 1, 5, 0F); // Box 20 this.crabModel[18].addBox(0F, 0F, 0F, 5, 1, 3, 0F); // Box 19
modelcrabModel[19].setRotationPoint(-1.5F, -3.5F, -2.5F); 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++) { for (int i = 0; i < 20; i++) {
modelcrabModel[i].setTextureSize(textureX, textureY); this.crabModel[i].setTextureSize(this.textureWidth, this.textureHeight);
modelcrabModel[i].mirror = true; this.crabModel[i].mirror = true;
} }
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entity) {
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
renderAll(f5);
}
public void renderAll(float f5) { this.crabModel[10].rotateAngleY = 0.78539816F;
GL11.glPushMatrix(); this.crabModel[9].rotateAngleY = -0.78539816F;
GL11.glTranslatef(0, 1.5F, 0); this.crabModel[11].rotateAngleY = -2.35619449F;
GL11.glRotatef(-90, 0, 1, 0); this.crabModel[12].rotateAngleY = 2.35619449F;
for (int i = 0; i < 20; i++) { this.crabModel[5].rotateAngleY = this.crabModel[10].rotateAngleY;
modelcrabModel[i].render(f5); this.crabModel[6].rotateAngleY = this.crabModel[9].rotateAngleY;
} this.crabModel[7].rotateAngleY = this.crabModel[11].rotateAngleY;
GL11.glPopMatrix(); this.crabModel[8].rotateAngleY = this.crabModel[12].rotateAngleY;
} float f9 = (-(MathHelper.cos(limbSwing * 0.6662F * 2.0F + 0.0F) * 0.4F) * limbSwingAmount) * 1.5F;
@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;
//float f10 = -(MathHelper.cos(f * 0.6662F * 2.0F + (float) Math.PI) * 0.4F) * f1; //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 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; //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 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 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; //float f16 = Math.abs(MathHelper.sin(f * 0.6662F + ((float) Math.PI * 3F / 2F)) * 0.4F) * f1;
f9 *= 1.5; this.crabModel[10].rotateAngleY += f9;
modelcrabModel[10].rotateAngleY += f9; this.crabModel[9].rotateAngleY -= f9;
modelcrabModel[9].rotateAngleY -= f9; this.crabModel[11].rotateAngleY -= f9;
modelcrabModel[11].rotateAngleY -= f9; this.crabModel[12].rotateAngleY += f9;
modelcrabModel[12].rotateAngleY += f9; this.crabModel[5].rotateAngleY = this.crabModel[10].rotateAngleY;
modelcrabModel[5].rotateAngleY = modelcrabModel[10].rotateAngleY; this.crabModel[6].rotateAngleY = this.crabModel[9].rotateAngleY;
modelcrabModel[6].rotateAngleY = modelcrabModel[9].rotateAngleY; this.crabModel[7].rotateAngleY = this.crabModel[11].rotateAngleY;
modelcrabModel[7].rotateAngleY = modelcrabModel[11].rotateAngleY; this.crabModel[8].rotateAngleY = this.crabModel[12].rotateAngleY;
modelcrabModel[8].rotateAngleY = modelcrabModel[12].rotateAngleY;
} }
}
@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();
}
}

View File

@ -5,8 +5,9 @@ import net.minecraft.entity.Entity;
public class ModelFBI extends ModelBiped { 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_) { @Override
public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
super.render(p_78088_1_, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_);
super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
} }
} }

View File

@ -14,7 +14,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
public class ModelGasMask extends ModelBiped { public class ModelGasMask extends ModelBiped {
// fields
ModelRenderer mask; ModelRenderer mask;
ModelRenderer Shape1; ModelRenderer Shape1;
ModelRenderer Shape2; ModelRenderer Shape2;
@ -24,73 +24,64 @@ public class ModelGasMask extends ModelBiped {
ModelRenderer Shape6; ModelRenderer Shape6;
public ModelGasMask() { public ModelGasMask() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 32; this.textureHeight = 32;
mask = new ModelRenderer(this, 0, 0); this.mask = new ModelRenderer(this, 0, 0);
Shape1 = new ModelRenderer(this, 0, 0); this.Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 8, 8, 3); this.Shape1.addBox(0F, 0F, 0F, 8, 8, 3);
Shape1.setRotationPoint(0F - 4, 0F - 8 + 0.075F / 2, 0F - 4); this.Shape1.setRotationPoint(0F - 4, 0F - 8 + 0.075F / 2, 0F - 4);
Shape1.setTextureSize(64, 32); this.Shape1.setTextureSize(64, 32);
Shape1.mirror = true; this.Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F); setRotation(this.Shape1, 0F, 0F, 0F);
convertToChild(mask, Shape1); convertToChild(this.mask, this.Shape1);
Shape2 = new ModelRenderer(this, 22, 0); this.Shape2 = new ModelRenderer(this, 22, 0);
Shape2.addBox(0F, 0F, 0F, 2, 2, 1); this.Shape2.addBox(0F, 0F, 0F, 2, 2, 1);
Shape2.setRotationPoint(1F - 4, 3F - 8 + 0.075F / 2, -0.5333334F - 4); this.Shape2.setRotationPoint(1F - 4, 3F - 8 + 0.075F / 2, -0.5333334F - 4);
Shape2.setTextureSize(64, 32); this.Shape2.setTextureSize(64, 32);
Shape2.mirror = true; this.Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F); setRotation(this.Shape2, 0F, 0F, 0F);
convertToChild(mask, Shape2); convertToChild(this.mask, this.Shape2);
Shape3 = new ModelRenderer(this, 22, 0); this.Shape3 = new ModelRenderer(this, 22, 0);
Shape3.addBox(0F, 0F, 0F, 2, 2, 1); this.Shape3.addBox(0F, 0F, 0F, 2, 2, 1);
Shape3.setRotationPoint(5F - 4, 3F - 8 + 0.075F / 2, -0.5F - 4); this.Shape3.setRotationPoint(5F - 4, 3F - 8 + 0.075F / 2, -0.5F - 4);
Shape3.setTextureSize(64, 32); this.Shape3.setTextureSize(64, 32);
Shape3.mirror = true; this.Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F); setRotation(this.Shape3, 0F, 0F, 0F);
convertToChild(mask, Shape3); convertToChild(this.mask, this.Shape3);
Shape4 = new ModelRenderer(this, 0, 11); this.Shape4 = new ModelRenderer(this, 0, 11);
Shape4.addBox(0F, 0F, 0F, 2, 2, 2); this.Shape4.addBox(0F, 0F, 0F, 2, 2, 2);
Shape4.setRotationPoint(3F - 4, 5F - 8 + 0.075F / 2, 0F - 4); this.Shape4.setRotationPoint(3F - 4, 5F - 8 + 0.075F / 2, 0F - 4);
Shape4.setTextureSize(64, 32); this.Shape4.setTextureSize(64, 32);
Shape4.mirror = true; this.Shape4.mirror = true;
setRotation(Shape4, -0.7853982F, 0F, 0F); setRotation(this.Shape4, -0.7853982F, 0F, 0F);
convertToChild(mask, Shape4); convertToChild(this.mask, this.Shape4);
Shape5 = new ModelRenderer(this, 0, 15); this.Shape5 = new ModelRenderer(this, 0, 15);
Shape5.addBox(0F, 2F, -0.5F, 3, 4, 3); this.Shape5.addBox(0F, 2F, -0.5F, 3, 4, 3);
Shape5.setRotationPoint(2.5F - 4, 5F - 8 + 0.075F / 2, 0F - 4); this.Shape5.setRotationPoint(2.5F - 4, 5F - 8 + 0.075F / 2, 0F - 4);
Shape5.setTextureSize(64, 32); this.Shape5.setTextureSize(64, 32);
Shape5.mirror = true; this.Shape5.mirror = true;
setRotation(Shape5, -0.7853982F, 0F, 0F); setRotation(this.Shape5, -0.7853982F, 0F, 0F);
convertToChild(mask, Shape5); convertToChild(this.mask, this.Shape5);
Shape6 = new ModelRenderer(this, 0, 22); this.Shape6 = new ModelRenderer(this, 0, 22);
Shape6.addBox(0F, 0F, 0F, 8, 1, 5); this.Shape6.addBox(0F, 0F, 0F, 8, 1, 5);
Shape6.setRotationPoint(0F - 4, 3F - 8 + 0.075F / 2, 3F - 4); this.Shape6.setRotationPoint(0F - 4, 3F - 8 + 0.075F / 2, 3F - 4);
Shape6.setTextureSize(64, 32); this.Shape6.setTextureSize(64, 32);
Shape6.mirror = true; this.Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F); setRotation(this.Shape6, 0F, 0F, 0F);
convertToChild(mask, Shape6); convertToChild(this.mask, this.Shape6);
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
} }
@Override @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; EntityPlayer player = (EntityPlayer) entity;
if (player.isSneaking()) { this.isSneak = player.isSneaking();
this.isSneak = true;
} else {
this.isSneak = false;
}
} }
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.rotationPointX = this.bipedHead.rotationPointX;
this.mask.rotationPointY = this.bipedHead.rotationPointY; this.mask.rotationPointY = this.bipedHead.rotationPointY;
this.mask.rotateAngleY = this.bipedHead.rotateAngleY; this.mask.rotateAngleY = this.bipedHead.rotateAngleY;
@ -98,35 +89,41 @@ public class ModelGasMask extends ModelBiped {
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
if(this.isChild) { if(this.isChild) {
float f6 = 2.0F; float f6 = 2.0F;
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6); 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);
this.mask.render(par7);
GL11.glPopMatrix();
} else { } else {
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glScalef(1.15F, 1.15F, 1.15F); 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 // move child rotation point to be relative to parent
parChild.rotationPointX -= parParent.rotationPointX; child.rotationPointX -= parent.rotationPointX;
parChild.rotationPointY -= parParent.rotationPointY; child.rotationPointY -= parent.rotationPointY;
parChild.rotationPointZ -= parParent.rotationPointZ; child.rotationPointZ -= parent.rotationPointZ;
// make rotations relative to parent // make rotations relative to parent
parChild.rotateAngleX -= parParent.rotateAngleX; child.rotateAngleX -= parent.rotateAngleX;
parChild.rotateAngleY -= parParent.rotateAngleY; child.rotateAngleY -= parent.rotateAngleY;
parChild.rotateAngleZ -= parParent.rotateAngleZ; child.rotateAngleZ -= parent.rotateAngleZ;
// create relationship // 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;
}
} }

View File

@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelGeiger extends ModelBase { public class ModelGeiger extends ModelBase {
// fields
ModelRenderer Shape1; ModelRenderer Shape1;
ModelRenderer Shape2; ModelRenderer Shape2;
ModelRenderer Shape3; ModelRenderer Shape3;
@ -22,91 +22,81 @@ public class ModelGeiger extends ModelBase {
ModelRenderer Shape8; ModelRenderer Shape8;
public ModelGeiger() { public ModelGeiger() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 32; this.textureHeight = 32;
Shape1 = new ModelRenderer(this, 0, 0); this.Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 12, 7, 5); this.Shape1.addBox(0F, 0F, 0F, 12, 7, 5);
Shape1.setRotationPoint(-5F, 17F, 1F); this.Shape1.setRotationPoint(-5F, 17F, 1F);
Shape1.setTextureSize(64, 32); this.Shape1.setTextureSize(64, 32);
Shape1.mirror = true; this.Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F); setRotation(this.Shape1, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 0, 30); this.Shape2 = new ModelRenderer(this, 0, 30);
Shape2.addBox(0F, 0F, 0F, 7, 1, 1); this.Shape2.addBox(0F, 0F, 0F, 7, 1, 1);
Shape2.setRotationPoint(-2.5F, 15F, 3F); this.Shape2.setRotationPoint(-2.5F, 15F, 3F);
Shape2.setTextureSize(64, 32); this.Shape2.setTextureSize(64, 32);
Shape2.mirror = true; this.Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F); setRotation(this.Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 10, 18); this.Shape3 = new ModelRenderer(this, 10, 18);
Shape3.addBox(0F, 0F, 0F, 1, 2, 1); this.Shape3.addBox(0F, 0F, 0F, 1, 2, 1);
Shape3.setRotationPoint(-3F, 15.5F, 3F); this.Shape3.setRotationPoint(-3F, 15.5F, 3F);
Shape3.setTextureSize(64, 32); this.Shape3.setTextureSize(64, 32);
Shape3.mirror = true; this.Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F); setRotation(this.Shape3, 0F, 0F, 0F);
Shape4 = new ModelRenderer(this, 14, 18); this.Shape4 = new ModelRenderer(this, 14, 18);
Shape4.addBox(0F, 0F, 0F, 1, 2, 1); this.Shape4.addBox(0F, 0F, 0F, 1, 2, 1);
Shape4.setRotationPoint(4F, 15.5F, 3F); this.Shape4.setRotationPoint(4F, 15.5F, 3F);
Shape4.setTextureSize(64, 32); this.Shape4.setTextureSize(64, 32);
Shape4.mirror = true; this.Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0F); setRotation(this.Shape4, 0F, 0F, 0F);
Shape5 = new ModelRenderer(this, 0, 12); this.Shape5 = new ModelRenderer(this, 0, 12);
Shape5.addBox(0F, 0F, 0F, 7, 3, 3); this.Shape5.addBox(0F, 0F, 0F, 7, 3, 3);
Shape5.setRotationPoint(-4F, 21F, -6F); this.Shape5.setRotationPoint(-4F, 21F, -6F);
Shape5.setTextureSize(64, 32); this.Shape5.setTextureSize(64, 32);
Shape5.mirror = true; this.Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F); setRotation(this.Shape5, 0F, 0F, 0F);
Shape6 = new ModelRenderer(this, 20, 12); this.Shape6 = new ModelRenderer(this, 20, 12);
Shape6.addBox(0F, 0F, 0F, 2, 6, 2); this.Shape6.addBox(0F, 0F, 0F, 2, 6, 2);
Shape6.setRotationPoint(-7F, 18F, 2.5F); this.Shape6.setRotationPoint(-7F, 18F, 2.5F);
Shape6.setTextureSize(64, 32); this.Shape6.setTextureSize(64, 32);
Shape6.mirror = true; this.Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F); setRotation(this.Shape6, 0F, 0F, 0F);
Shape7 = new ModelRenderer(this, 0, 18); this.Shape7 = new ModelRenderer(this, 0, 18);
Shape7.addBox(0F, 0F, 0F, 3, 2, 2); this.Shape7.addBox(0F, 0F, 0F, 3, 2, 2);
Shape7.setRotationPoint(-7F, 22F, -5.5F); this.Shape7.setRotationPoint(-7F, 22F, -5.5F);
Shape7.setTextureSize(64, 32); this.Shape7.setTextureSize(64, 32);
Shape7.mirror = true; this.Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0F); setRotation(this.Shape7, 0F, 0F, 0F);
Shape8 = new ModelRenderer(this, 0, 22); this.Shape8 = new ModelRenderer(this, 0, 22);
Shape8.addBox(0F, 0F, 0F, 2, 2, 6); this.Shape8.addBox(0F, 0F, 0F, 2, 2, 6);
Shape8.setRotationPoint(-7F, 22F, -3.5F); this.Shape8.setRotationPoint(-7F, 22F, -3.5F);
Shape8.setTextureSize(64, 32); this.Shape8.setTextureSize(64, 32);
Shape8.mirror = true; this.Shape8.mirror = true;
setRotation(Shape8, 0F, 0F, 0F); setRotation(this.Shape8, 0F, 0F, 0F);
} }
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { @Override
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) {
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
Shape1.render(f5); this.renderModel(scaleFactor);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
} }
public void renderModel(float f) { public void renderModel(float scaleFactor) {
Shape1.render(f);
Shape2.render(f); this.Shape1.render(scaleFactor);
Shape3.render(f); this.Shape2.render(scaleFactor);
Shape4.render(f); this.Shape3.render(scaleFactor);
Shape5.render(f); this.Shape4.render(scaleFactor);
Shape6.render(f); this.Shape5.render(scaleFactor);
Shape7.render(f); this.Shape6.render(scaleFactor);
Shape8.render(f); 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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
} }

View File

@ -5,36 +5,35 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelGlasses extends ModelArmorBase { public class ModelGlasses extends ModelArmorBase {
public ModelGlasses(int type) { public ModelGlasses(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_goggles); this.head = new ModelRendererObj(ResourceManager.armor_goggles);
body = new ModelRendererObj(ResourceManager.armor_bj, "Body"); this.body = new ModelRendererObj(ResourceManager.armor_bj, "Body");
leftArm = new ModelRendererObj(ResourceManager.armor_bj, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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); this.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); this.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.rightFoot = new ModelRendererObj(ResourceManager.armor_bj, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
if(type == 0) { if(this.type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.goggles); bindTexture(ResourceManager.goggles);
head.render(par7); this.head.render(scaleFactor);
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -14,7 +14,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
public class ModelGoggles extends ModelBiped { public class ModelGoggles extends ModelBiped {
// fields
ModelRenderer Shape1; ModelRenderer Shape1;
ModelRenderer Shape2; ModelRenderer Shape2;
ModelRenderer Shape5; ModelRenderer Shape5;
@ -23,74 +23,56 @@ public class ModelGoggles extends ModelBiped {
ModelRenderer google; ModelRenderer google;
public ModelGoggles() { public ModelGoggles() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 32; this.textureHeight = 32;
google = new ModelRenderer(this, 0, 0); this.google = new ModelRenderer(this, 0, 0);
Shape1 = new ModelRenderer(this, 0, 0); this.Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 9, 3, 1); this.Shape1.addBox(0F, 0F, 0F, 9, 3, 1);
Shape1.setRotationPoint(-4.5F, -3F - 2, -4.5F); this.Shape1.setRotationPoint(-4.5F, -3F - 2, -4.5F);
Shape1.setTextureSize(64, 32); this.Shape1.setTextureSize(64, 32);
Shape1.mirror = true; this.Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F); setRotation(this.Shape1, 0F, 0F, 0F);
convertToChild(google, Shape1); convertToChild(this.google, this.Shape1);
Shape2 = new ModelRenderer(this, 0, 4); this.Shape2 = new ModelRenderer(this, 0, 4);
Shape2.addBox(0F, 0F, 0F, 9, 2, 5); this.Shape2.addBox(0F, 0F, 0F, 9, 2, 5);
Shape2.setRotationPoint(-4.5F, -3F - 2, -3.5F); this.Shape2.setRotationPoint(-4.5F, -3F - 2, -3.5F);
Shape2.setTextureSize(64, 32); this.Shape2.setTextureSize(64, 32);
Shape2.mirror = true; this.Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F); setRotation(this.Shape2, 0F, 0F, 0F);
convertToChild(google, Shape2); convertToChild(this.google, this.Shape2);
Shape5 = new ModelRenderer(this, 26, 0); this.Shape5 = new ModelRenderer(this, 26, 0);
Shape5.addBox(0F, 0F, 0F, 2, 2, 1); this.Shape5.addBox(0F, 0F, 0F, 2, 2, 1);
Shape5.setRotationPoint(1F, -2.5F - 2, -5F); this.Shape5.setRotationPoint(1F, -2.5F - 2, -5F);
Shape5.setTextureSize(64, 32); this.Shape5.setTextureSize(64, 32);
Shape5.mirror = true; this.Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F); setRotation(this.Shape5, 0F, 0F, 0F);
convertToChild(google, Shape5); convertToChild(this.google, this.Shape5);
Shape6 = new ModelRenderer(this, 20, 0); this.Shape6 = new ModelRenderer(this, 20, 0);
Shape6.addBox(0F, 0F, 0F, 2, 2, 1); this.Shape6.addBox(0F, 0F, 0F, 2, 2, 1);
Shape6.setRotationPoint(-3F, -2.5F - 2, -5F); this.Shape6.setRotationPoint(-3F, -2.5F - 2, -5F);
Shape6.setTextureSize(64, 32); this.Shape6.setTextureSize(64, 32);
Shape6.mirror = true; this.Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F); setRotation(this.Shape6, 0F, 0F, 0F);
convertToChild(google, Shape6); convertToChild(this.google, this.Shape6);
Shape7 = new ModelRenderer(this, 0, 11); this.Shape7 = new ModelRenderer(this, 0, 11);
Shape7.addBox(0F, 0F, 0F, 9, 1, 4); this.Shape7.addBox(0F, 0F, 0F, 9, 1, 4);
Shape7.setRotationPoint(-4.5F, -3F - 2, 0.5F); this.Shape7.setRotationPoint(-4.5F, -3F - 2, 0.5F);
Shape7.setTextureSize(64, 32); this.Shape7.setTextureSize(64, 32);
Shape7.mirror = true; this.Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0F); setRotation(this.Shape7, 0F, 0F, 0F);
convertToChild(google, Shape7); convertToChild(this.google, this.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;
} }
@Override @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; EntityPlayer player = (EntityPlayer) entity;
if (player.isSneaking()) { this.isSneak = player.isSneaking();
this.isSneak = true;
} else {
this.isSneak = false;
}
} }
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.rotationPointX = this.bipedHead.rotationPointX;
this.google.rotationPointY = this.bipedHead.rotationPointY; this.google.rotationPointY = this.bipedHead.rotationPointY;
this.google.rotateAngleY = this.bipedHead.rotateAngleY; this.google.rotateAngleY = this.bipedHead.rotateAngleY;
@ -98,24 +80,32 @@ public class ModelGoggles extends ModelBiped {
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
this.google.render(par7); this.google.render(scaleFactor);
GL11.glPopMatrix(); 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 // move child rotation point to be relative to parent
parChild.rotationPointX -= parParent.rotationPointX; child.rotationPointX -= parent.rotationPointX;
parChild.rotationPointY -= parParent.rotationPointY; child.rotationPointY -= parent.rotationPointY;
parChild.rotationPointZ -= parParent.rotationPointZ; child.rotationPointZ -= parent.rotationPointZ;
// make rotations relative to parent // make rotations relative to parent
parChild.rotateAngleX -= parParent.rotateAngleX; child.rotateAngleX -= parent.rotateAngleX;
parChild.rotateAngleY -= parParent.rotateAngleY; child.rotateAngleY -= parent.rotateAngleY;
parChild.rotateAngleZ -= parParent.rotateAngleZ; child.rotateAngleZ -= parent.rotateAngleZ;
// create relationship // 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;
}
}

View File

@ -4,195 +4,165 @@
// Keep in mind that you still need to fill in some blanks // Keep in mind that you still need to fill in some blanks
// - ZeuX // - ZeuX
package com.hbm.render.model; package com.hbm.render.model;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelGun extends ModelBase 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);
}
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;
}
} }

View File

@ -5,36 +5,35 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelHat extends ModelArmorBase { public class ModelHat extends ModelArmorBase {
public ModelHat(int type) { public ModelHat(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_hat); this.head = new ModelRendererObj(ResourceManager.armor_hat);
body = new ModelRendererObj(null); this.body = new ModelRendererObj(null);
leftArm = new ModelRendererObj(null).setRotationPoint(-5.0F, 2.0F, 0.0F); this.leftArm = new ModelRendererObj(null).setRotationPoint(-5.0F, 2.0F, 0.0F);
rightArm = new ModelRendererObj(null).setRotationPoint(5.0F, 2.0F, 0.0F); this.rightArm = new ModelRendererObj(null).setRotationPoint(5.0F, 2.0F, 0.0F);
leftLeg = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); this.leftLeg = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F);
rightLeg = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); this.rightLeg = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F);
leftFoot = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); this.leftFoot = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F);
rightFoot = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); this.rightFoot = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
if(type == 0) { if(this.type == 0) {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.hat); bindTexture(ResourceManager.hat);
head.render(par7); this.head.render(scaleFactor);
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelHunterChopper extends ModelBase { public class ModelHunterChopper extends ModelBase {
// fields
ModelRenderer RotorPivotStem; ModelRenderer RotorPivotStem;
ModelRenderer RotorPivotTop; ModelRenderer RotorPivotTop;
ModelRenderer RotorPivotPlate; ModelRenderer RotorPivotPlate;
@ -65,433 +65,380 @@ public class ModelHunterChopper extends ModelBase {
float f = 0.1F; float f = 0.1F;
public ModelHunterChopper() { public ModelHunterChopper() {
textureWidth = 256; this.textureWidth = 256;
textureHeight = 128; this.textureHeight = 128;
RotorPivotStem = new ModelRenderer(this, 40, 22); this.RotorPivotStem = new ModelRenderer(this, 40, 22);
RotorPivotStem.addBox(0F, 0F, 0F, 1, 4, 1); this.RotorPivotStem.addBox(0F, 0F, 0F, 1, 4, 1);
RotorPivotStem.setRotationPoint(-0.5F, 0F, -0.5F); this.RotorPivotStem.setRotationPoint(-0.5F, 0F, -0.5F);
RotorPivotStem.setTextureSize(256, 128); this.RotorPivotStem.setTextureSize(256, 128);
RotorPivotStem.mirror = true; this.RotorPivotStem.mirror = true;
setRotation(RotorPivotStem, 0F, 0F, 0F); setRotation(this.RotorPivotStem, 0F, 0F, 0F);
RotorPivotTop = new ModelRenderer(this, 40, 27); this.RotorPivotTop = new ModelRenderer(this, 40, 27);
RotorPivotTop.addBox(0F, 0F, 0F, 3, 1, 3); this.RotorPivotTop.addBox(0F, 0F, 0F, 3, 1, 3);
RotorPivotTop.setRotationPoint(-1.5F, -1F, -1.5F); this.RotorPivotTop.setRotationPoint(-1.5F, -1F, -1.5F);
RotorPivotTop.setTextureSize(256, 128); this.RotorPivotTop.setTextureSize(256, 128);
RotorPivotTop.mirror = true; this.RotorPivotTop.mirror = true;
setRotation(RotorPivotTop, 0F, 0F, 0F); setRotation(this.RotorPivotTop, 0F, 0F, 0F);
RotorPivotPlate = new ModelRenderer(this, 40, 31); this.RotorPivotPlate = new ModelRenderer(this, 40, 31);
RotorPivotPlate.addBox(0F, 0F, 0F, 6, 1, 6); this.RotorPivotPlate.addBox(0F, 0F, 0F, 6, 1, 6);
RotorPivotPlate.setRotationPoint(-3F, 1.5F, -3F); this.RotorPivotPlate.setRotationPoint(-3F, 1.5F, -3F);
RotorPivotPlate.setTextureSize(256, 128); this.RotorPivotPlate.setTextureSize(256, 128);
RotorPivotPlate.mirror = true; this.RotorPivotPlate.mirror = true;
setRotation(RotorPivotPlate, 0F, 0F, 0F); setRotation(this.RotorPivotPlate, 0F, 0F, 0F);
TorsoBaseCenter = new ModelRenderer(this, 70, 0); this.TorsoBaseCenter = new ModelRenderer(this, 70, 0);
TorsoBaseCenter.addBox(0F, 0F, 0F, 14, 4, 2); this.TorsoBaseCenter.addBox(0F, 0F, 0F, 14, 4, 2);
TorsoBaseCenter.setRotationPoint(-8F, 4F, -1F); this.TorsoBaseCenter.setRotationPoint(-8F, 4F, -1F);
TorsoBaseCenter.setTextureSize(256, 128); this.TorsoBaseCenter.setTextureSize(256, 128);
TorsoBaseCenter.mirror = true; this.TorsoBaseCenter.mirror = true;
setRotation(TorsoBaseCenter, 0F, 0F, 0F); setRotation(this.TorsoBaseCenter, 0F, 0F, 0F);
TorsoPlateLeft = new ModelRenderer(this, 70, 6); this.TorsoPlateLeft = new ModelRenderer(this, 70, 6);
TorsoPlateLeft.addBox(0F, -4F, 0F, 14, 4, 1); this.TorsoPlateLeft.addBox(0F, -4F, 0F, 14, 4, 1);
TorsoPlateLeft.setRotationPoint(-8F, 8F, -2F); this.TorsoPlateLeft.setRotationPoint(-8F, 8F, -2F);
TorsoPlateLeft.setTextureSize(256, 128); this.TorsoPlateLeft.setTextureSize(256, 128);
TorsoPlateLeft.mirror = true; this.TorsoPlateLeft.mirror = true;
setRotation(TorsoPlateLeft, -0.2268928F, 0F, 0F); setRotation(this.TorsoPlateLeft, -0.2268928F, 0F, 0F);
TorsoBaseBottom = new ModelRenderer(this, 70, 11); this.TorsoBaseBottom = new ModelRenderer(this, 70, 11);
TorsoBaseBottom.addBox(0F, 0F, 0F, 7, 2, 4); this.TorsoBaseBottom.addBox(0F, 0F, 0F, 7, 2, 4);
TorsoBaseBottom.setRotationPoint(-4F, 8F, -2F); this.TorsoBaseBottom.setRotationPoint(-4F, 8F, -2F);
TorsoBaseBottom.setTextureSize(256, 128); this.TorsoBaseBottom.setTextureSize(256, 128);
TorsoBaseBottom.mirror = true; this.TorsoBaseBottom.mirror = true;
setRotation(TorsoBaseBottom, 0F, 0F, 0F); setRotation(this.TorsoBaseBottom, 0F, 0F, 0F);
TorsoPlateRight = new ModelRenderer(this, 70, 17); this.TorsoPlateRight = new ModelRenderer(this, 70, 17);
TorsoPlateRight.addBox(0F, -4F, -1F, 14, 4, 1); this.TorsoPlateRight.addBox(0F, -4F, -1F, 14, 4, 1);
TorsoPlateRight.setRotationPoint(-8F, 8F, 2F); this.TorsoPlateRight.setRotationPoint(-8F, 8F, 2F);
TorsoPlateRight.setTextureSize(256, 128); this.TorsoPlateRight.setTextureSize(256, 128);
TorsoPlateRight.mirror = true; this.TorsoPlateRight.mirror = true;
setRotation(TorsoPlateRight, 0.2268928F, 0F, 0F); setRotation(this.TorsoPlateRight, 0.2268928F, 0F, 0F);
TorsoPlateBottom = new ModelRenderer(this, 70, 22); this.TorsoPlateBottom = new ModelRenderer(this, 70, 22);
TorsoPlateBottom.addBox(-5F, -2F, 0F, 5, 2, 4); this.TorsoPlateBottom.addBox(-5F, -2F, 0F, 5, 2, 4);
TorsoPlateBottom.setRotationPoint(-4F, 10F, -2F); this.TorsoPlateBottom.setRotationPoint(-4F, 10F, -2F);
TorsoPlateBottom.setTextureSize(256, 128); this.TorsoPlateBottom.setTextureSize(256, 128);
TorsoPlateBottom.mirror = true; this.TorsoPlateBottom.mirror = true;
setRotation(TorsoPlateBottom, 0F, 0F, 0.2094395F); setRotation(this.TorsoPlateBottom, 0F, 0F, 0.2094395F);
WingLeftPlate = new ModelRenderer(this, 110, 0); this.WingLeftPlate = new ModelRenderer(this, 110, 0);
WingLeftPlate.addBox(0F, -3F, 0F, 9, 3, 1); this.WingLeftPlate.addBox(0F, -3F, 0F, 9, 3, 1);
WingLeftPlate.setRotationPoint(-8F, 9F, -3F); this.WingLeftPlate.setRotationPoint(-8F, 9F, -3F);
WingLeftPlate.setTextureSize(256, 128); this.WingLeftPlate.setTextureSize(256, 128);
WingLeftPlate.mirror = true; this.WingLeftPlate.mirror = true;
setRotation(WingLeftPlate, -0.2268928F, 0F, 0F); setRotation(this.WingLeftPlate, -0.2268928F, 0F, 0F);
WingRightPlate = new ModelRenderer(this, 130, 0); this.WingRightPlate = new ModelRenderer(this, 130, 0);
WingRightPlate.addBox(0F, -3F, 0F, 9, 3, 1); this.WingRightPlate.addBox(0F, -3F, 0F, 9, 3, 1);
WingRightPlate.setRotationPoint(-8F, 9F, 2F); this.WingRightPlate.setRotationPoint(-8F, 9F, 2F);
WingRightPlate.setTextureSize(256, 128); this.WingRightPlate.setTextureSize(256, 128);
WingRightPlate.mirror = true; this.WingRightPlate.mirror = true;
setRotation(WingRightPlate, 0.2268928F, 0F, 0F); setRotation(this.WingRightPlate, 0.2268928F, 0F, 0F);
WingLeft = new ModelRenderer(this, 110, 4); this.WingLeft = new ModelRenderer(this, 110, 4);
WingLeft.addBox(0F, 0F, 0F, 3, 1, 6); this.WingLeft.addBox(0F, 0F, 0F, 3, 1, 6);
WingLeft.setRotationPoint(-3F, 10F, -8F); this.WingLeft.setRotationPoint(-3F, 10F, -8F);
WingLeft.setTextureSize(256, 128); this.WingLeft.setTextureSize(256, 128);
WingLeft.mirror = true; this.WingLeft.mirror = true;
setRotation(WingLeft, 0.3490659F, 0F, 0F); setRotation(this.WingLeft, 0.3490659F, 0F, 0F);
WingLeftFront = new ModelRenderer(this, 110, 11); this.WingLeftFront = new ModelRenderer(this, 110, 11);
WingLeftFront.addBox(0F, 0F, 0F, 2, 1, 7); this.WingLeftFront.addBox(0F, 0F, 0F, 2, 1, 7);
WingLeftFront.setRotationPoint(-3F, 10F, -8F); this.WingLeftFront.setRotationPoint(-3F, 10F, -8F);
WingLeftFront.setTextureSize(256, 128); this.WingLeftFront.setTextureSize(256, 128);
WingLeftFront.mirror = true; this.WingLeftFront.mirror = true;
setRotation(WingLeftFront, 0.3490659F, -0.3490659F, -0.1745329F); setRotation(this.WingLeftFront, 0.3490659F, -0.3490659F, -0.1745329F);
WingLeftTip = new ModelRenderer(this, 110, 19); this.WingLeftTip = new ModelRenderer(this, 110, 19);
WingLeftTip.addBox(0F, 0F, 0F, 5, 2, 1); this.WingLeftTip.addBox(0F, 0F, 0F, 5, 2, 1);
WingLeftTip.setRotationPoint(-4F, 9F, -8F); this.WingLeftTip.setRotationPoint(-4F, 9F, -8F);
WingLeftTip.setTextureSize(256, 128); this.WingLeftTip.setTextureSize(256, 128);
WingLeftTip.mirror = true; this.WingLeftTip.mirror = true;
setRotation(WingLeftTip, 0F, 0F, 0F); setRotation(this.WingLeftTip, 0F, 0F, 0F);
WingRight = new ModelRenderer(this, 130, 4); this.WingRight = new ModelRenderer(this, 130, 4);
WingRight.addBox(0F, 0F, -6F, 3, 1, 6); this.WingRight.addBox(0F, 0F, -6F, 3, 1, 6);
WingRight.setRotationPoint(-3F, 10F, 8F); this.WingRight.setRotationPoint(-3F, 10F, 8F);
WingRight.setTextureSize(256, 128); this.WingRight.setTextureSize(256, 128);
WingRight.mirror = true; this.WingRight.mirror = true;
setRotation(WingRight, -0.3490659F, 0F, 0F); setRotation(this.WingRight, -0.3490659F, 0F, 0F);
WingRightFront = new ModelRenderer(this, 130, 11); this.WingRightFront = new ModelRenderer(this, 130, 11);
WingRightFront.addBox(0F, 0F, -7F, 2, 1, 7); this.WingRightFront.addBox(0F, 0F, -7F, 2, 1, 7);
WingRightFront.setRotationPoint(-3F, 10F, 8F); this.WingRightFront.setRotationPoint(-3F, 10F, 8F);
WingRightFront.setTextureSize(256, 128); this.WingRightFront.setTextureSize(256, 128);
WingRightFront.mirror = true; this.WingRightFront.mirror = true;
setRotation(WingRightFront, -0.3490659F, 0.3490659F, -0.1745329F); setRotation(this.WingRightFront, -0.3490659F, 0.3490659F, -0.1745329F);
WingRightTip = new ModelRenderer(this, 130, 19); this.WingRightTip = new ModelRenderer(this, 130, 19);
WingRightTip.addBox(0F, 0F, 0F, 5, 2, 1); this.WingRightTip.addBox(0F, 0F, 0F, 5, 2, 1);
WingRightTip.setRotationPoint(-4F, 9F, 7F); this.WingRightTip.setRotationPoint(-4F, 9F, 7F);
WingRightTip.setTextureSize(256, 128); this.WingRightTip.setTextureSize(256, 128);
WingRightTip.mirror = true; this.WingRightTip.mirror = true;
setRotation(WingRightTip, 0F, 0F, 0F); setRotation(this.WingRightTip, 0F, 0F, 0F);
TorsoBaseBack = new ModelRenderer(this, 70, 28); this.TorsoBaseBack = new ModelRenderer(this, 70, 28);
TorsoBaseBack.addBox(0F, 0F, 0F, 3, 2, 3); this.TorsoBaseBack.addBox(0F, 0F, 0F, 3, 2, 3);
TorsoBaseBack.setRotationPoint(3F, 7.5F, -1.5F); this.TorsoBaseBack.setRotationPoint(3F, 7.5F, -1.5F);
TorsoBaseBack.setTextureSize(256, 128); this.TorsoBaseBack.setTextureSize(256, 128);
TorsoBaseBack.mirror = true; this.TorsoBaseBack.mirror = true;
setRotation(TorsoBaseBack, 0F, 0F, 0F); setRotation(this.TorsoBaseBack, 0F, 0F, 0F);
TorsoBoxBottom = new ModelRenderer(this, 70, 33); this.TorsoBoxBottom = new ModelRenderer(this, 70, 33);
TorsoBoxBottom.addBox(0F, -2F, 0F, 7, 2, 2); this.TorsoBoxBottom.addBox(0F, -2F, 0F, 7, 2, 2);
TorsoBoxBottom.setRotationPoint(-3F, 10F, -1F); this.TorsoBoxBottom.setRotationPoint(-3F, 10F, -1F);
TorsoBoxBottom.setTextureSize(256, 128); this.TorsoBoxBottom.setTextureSize(256, 128);
TorsoBoxBottom.mirror = true; this.TorsoBoxBottom.mirror = true;
setRotation(TorsoBoxBottom, 0F, 0F, 0.1570796F); setRotation(this.TorsoBoxBottom, 0F, 0F, 0.1570796F);
TorsoPlateBack = new ModelRenderer(this, 70, 37); this.TorsoPlateBack = new ModelRenderer(this, 70, 37);
TorsoPlateBack.addBox(0F, 0F, 0F, 3, 1, 2); this.TorsoPlateBack.addBox(0F, 0F, 0F, 3, 1, 2);
TorsoPlateBack.setRotationPoint(6F, 4F, -1F); this.TorsoPlateBack.setRotationPoint(6F, 4F, -1F);
TorsoPlateBack.setTextureSize(256, 128); this.TorsoPlateBack.setTextureSize(256, 128);
TorsoPlateBack.mirror = true; this.TorsoPlateBack.mirror = true;
setRotation(TorsoPlateBack, 0F, 0F, 0.2268928F); setRotation(this.TorsoPlateBack, 0F, 0F, 0.2268928F);
TorsoBoxBack = new ModelRenderer(this, 70, 40); this.TorsoBoxBack = new ModelRenderer(this, 70, 40);
TorsoBoxBack.addBox(0F, 0F, 0F, 2, 4, 2); this.TorsoBoxBack.addBox(0F, 0F, 0F, 2, 4, 2);
TorsoBoxBack.setRotationPoint(6F, 5F, -1F); this.TorsoBoxBack.setRotationPoint(6F, 5F, -1F);
TorsoBoxBack.setTextureSize(256, 128); this.TorsoBoxBack.setTextureSize(256, 128);
TorsoBoxBack.mirror = true; this.TorsoBoxBack.mirror = true;
setRotation(TorsoBoxBack, 0F, 0F, 0F); setRotation(this.TorsoBoxBack, 0F, 0F, 0F);
TorsoPlateLeftBack = new ModelRenderer(this, 70, 46); this.TorsoPlateLeftBack = new ModelRenderer(this, 70, 46);
TorsoPlateLeftBack.addBox(0F, -4F, -1F, 3, 4, 1); this.TorsoPlateLeftBack.addBox(0F, -4F, -1F, 3, 4, 1);
TorsoPlateLeftBack.setRotationPoint(6F, 8.5F, -1F); this.TorsoPlateLeftBack.setRotationPoint(6F, 8.5F, -1F);
TorsoPlateLeftBack.setTextureSize(256, 128); this.TorsoPlateLeftBack.setTextureSize(256, 128);
TorsoPlateLeftBack.mirror = true; this.TorsoPlateLeftBack.mirror = true;
setRotation(TorsoPlateLeftBack, -0.2268928F, 0F, 0F); setRotation(this.TorsoPlateLeftBack, -0.2268928F, 0F, 0F);
TorsoPlateRightBack = new ModelRenderer(this, 70, 51); this.TorsoPlateRightBack = new ModelRenderer(this, 70, 51);
TorsoPlateRightBack.addBox(0F, -4F, 0F, 3, 4, 1); this.TorsoPlateRightBack.addBox(0F, -4F, 0F, 3, 4, 1);
TorsoPlateRightBack.setRotationPoint(6F, 8.5F, 1F); this.TorsoPlateRightBack.setRotationPoint(6F, 8.5F, 1F);
TorsoPlateRightBack.setTextureSize(256, 128); this.TorsoPlateRightBack.setTextureSize(256, 128);
TorsoPlateRightBack.mirror = true; this.TorsoPlateRightBack.mirror = true;
setRotation(TorsoPlateRightBack, 0.2268928F, 0F, 0F); setRotation(this.TorsoPlateRightBack, 0.2268928F, 0F, 0F);
TailFrontBase = new ModelRenderer(this, 24, 54); this.TailFrontBase = new ModelRenderer(this, 24, 54);
TailFrontBase.addBox(0F, 0F, 0F, 5, 2, 2); this.TailFrontBase.addBox(0F, 0F, 0F, 5, 2, 2);
TailFrontBase.setRotationPoint(8F, 6F, -1F); this.TailFrontBase.setRotationPoint(8F, 6F, -1F);
TailFrontBase.setTextureSize(256, 128); this.TailFrontBase.setTextureSize(256, 128);
TailFrontBase.mirror = true; this.TailFrontBase.mirror = true;
setRotation(TailFrontBase, 0F, 0F, 0F); setRotation(this.TailFrontBase, 0F, 0F, 0F);
TailFrontPlate = new ModelRenderer(this, 24, 58); this.TailFrontPlate = new ModelRenderer(this, 24, 58);
TailFrontPlate.addBox(-5F, 0F, 0F, 5, 1, 2); this.TailFrontPlate.addBox(-5F, 0F, 0F, 5, 1, 2);
TailFrontPlate.setRotationPoint(13F, 6F, -1F); this.TailFrontPlate.setRotationPoint(13F, 6F, -1F);
TailFrontPlate.setTextureSize(256, 128); this.TailFrontPlate.setTextureSize(256, 128);
TailFrontPlate.mirror = true; this.TailFrontPlate.mirror = true;
setRotation(TailFrontPlate, 0F, 0F, 0.2268928F); setRotation(this.TailFrontPlate, 0F, 0F, 0.2268928F);
TailBackBase = new ModelRenderer(this, 24, 61); this.TailBackBase = new ModelRenderer(this, 24, 61);
TailBackBase.addBox(0F, 0F, 0F, 4, 2, 1); this.TailBackBase.addBox(0F, 0F, 0F, 4, 2, 1);
TailBackBase.setRotationPoint(13F, 6F, -0.5F); this.TailBackBase.setRotationPoint(13F, 6F, -0.5F);
TailBackBase.setTextureSize(256, 128); this.TailBackBase.setTextureSize(256, 128);
TailBackBase.mirror = true; this.TailBackBase.mirror = true;
setRotation(TailBackBase, 0F, 0F, 0F); setRotation(this.TailBackBase, 0F, 0F, 0F);
TailRotorFront = new ModelRenderer(this, 24, 64); this.TailRotorFront = new ModelRenderer(this, 24, 64);
TailRotorFront.addBox(0F, 0F, 0F, 1, 3, 1); this.TailRotorFront.addBox(0F, 0F, 0F, 1, 3, 1);
TailRotorFront.setRotationPoint(15.5F, 8F, -0.5F); this.TailRotorFront.setRotationPoint(15.5F, 8F, -0.5F);
TailRotorFront.setTextureSize(256, 128); this.TailRotorFront.setTextureSize(256, 128);
TailRotorFront.mirror = true; this.TailRotorFront.mirror = true;
setRotation(TailRotorFront, 0F, 0F, -0.2268928F); setRotation(this.TailRotorFront, 0F, 0F, -0.2268928F);
TailRotorTop = new ModelRenderer(this, 24, 68); this.TailRotorTop = new ModelRenderer(this, 24, 68);
TailRotorTop.addBox(0F, 0F, 0F, 3, 1, 1); this.TailRotorTop.addBox(0F, 0F, 0F, 3, 1, 1);
TailRotorTop.setRotationPoint(17F, 6F, -0.5F); this.TailRotorTop.setRotationPoint(17F, 6F, -0.5F);
TailRotorTop.setTextureSize(256, 128); this.TailRotorTop.setTextureSize(256, 128);
TailRotorTop.mirror = true; this.TailRotorTop.mirror = true;
setRotation(TailRotorTop, 0F, 0F, 0F); setRotation(this.TailRotorTop, 0F, 0F, 0F);
TailRotorBack = new ModelRenderer(this, 24, 70); this.TailRotorBack = new ModelRenderer(this, 24, 70);
TailRotorBack.addBox(0F, 0F, 0F, 1, 4, 1); this.TailRotorBack.addBox(0F, 0F, 0F, 1, 4, 1);
TailRotorBack.setRotationPoint(20F, 6F, -0.5F); this.TailRotorBack.setRotationPoint(20F, 6F, -0.5F);
TailRotorBack.setTextureSize(256, 128); this.TailRotorBack.setTextureSize(256, 128);
TailRotorBack.mirror = true; this.TailRotorBack.mirror = true;
setRotation(TailRotorBack, 0F, 0F, 0F); setRotation(this.TailRotorBack, 0F, 0F, 0F);
TailRotorBottom = new ModelRenderer(this, 24, 75); this.TailRotorBottom = new ModelRenderer(this, 24, 75);
TailRotorBottom.addBox(0F, 0F, 0F, 3, 1, 1); this.TailRotorBottom.addBox(0F, 0F, 0F, 3, 1, 1);
TailRotorBottom.setRotationPoint(18F, 10F, -0.5F); this.TailRotorBottom.setRotationPoint(18F, 10F, -0.5F);
TailRotorBottom.setTextureSize(256, 128); this.TailRotorBottom.setTextureSize(256, 128);
TailRotorBottom.mirror = true; this.TailRotorBottom.mirror = true;
setRotation(TailRotorBottom, 0F, 0F, 0F); setRotation(TailRotorBottom, 0F, 0F, 0F);
TailRotorBlades = new ModelRenderer(this, 120, 120); this.TailRotorBlades = new ModelRenderer(this, 120, 120);
TailRotorBlades.addBox(-1.5F, -1.5F, 0F, 3, 3, 0); this.TailRotorBlades.addBox(-1.5F, -1.5F, 0F, 3, 3, 0);
TailRotorBlades.setRotationPoint(17F + 1.5F, 7F + 1.5F, 0F); this.TailRotorBlades.setRotationPoint(17F + 1.5F, 7F + 1.5F, 0F);
TailRotorBlades.setTextureSize(256, 128); this.TailRotorBlades.setTextureSize(256, 128);
TailRotorBlades.mirror = true; this.TailRotorBlades.mirror = true;
setRotation(TailRotorBlades, 0F, 0F, 0F); setRotation(this.TailRotorBlades, 0F, 0F, 0F);
TailRotorPivot = new ModelRenderer(this, 24, 77); this.TailRotorPivot = new ModelRenderer(this, 24, 77);
TailRotorPivot.addBox(0F, 0F, 0F, 1, 2, 1); this.TailRotorPivot.addBox(0F, 0F, 0F, 1, 2, 1);
TailRotorPivot.setRotationPoint(18F, 8F, -0.5F); this.TailRotorPivot.setRotationPoint(18F, 8F, -0.5F);
TailRotorPivot.setTextureSize(256, 128); this.TailRotorPivot.setTextureSize(256, 128);
TailRotorPivot.mirror = true; this.TailRotorPivot.mirror = true;
setRotation(TailRotorPivot, 0F, 0F, 0F); setRotation(this.TailRotorPivot, 0F, 0F, 0F);
HeadNeck = new ModelRenderer(this, 0, 40); this.HeadNeck = new ModelRenderer(this, 0, 40);
HeadNeck.addBox(-1F, 0F, 0F, 1, 6, 3); this.HeadNeck.addBox(-1F, 0F, 0F, 1, 6, 3);
HeadNeck.setRotationPoint(-7F, 4F, -1.5F); this.HeadNeck.setRotationPoint(-7F, 4F, -1.5F);
HeadNeck.setTextureSize(256, 128); this.HeadNeck.setTextureSize(256, 128);
HeadNeck.mirror = true; this.HeadNeck.mirror = true;
setRotation(HeadNeck, 0F, 0F, 0.2268928F); setRotation(this.HeadNeck, 0F, 0F, 0.2268928F);
HeadBack = new ModelRenderer(this, 0, 49); this.HeadBack = new ModelRenderer(this, 0, 49);
HeadBack.addBox(0F, 0F, 0F, 1, 7, 4); this.HeadBack.addBox(0F, 0F, 0F, 1, 7, 4);
HeadBack.setRotationPoint(-8.5F, 3.5F, -2F); this.HeadBack.setRotationPoint(-8.5F, 3.5F, -2F);
HeadBack.setTextureSize(256, 128); this.HeadBack.setTextureSize(256, 128);
HeadBack.mirror = true; this.HeadBack.mirror = true;
setRotation(HeadBack, 0F, 0F, 0.2268928F); setRotation(this.HeadBack, 0F, 0F, 0.2268928F);
HeadBase = new ModelRenderer(this, 0, 60); this.HeadBase = new ModelRenderer(this, 0, 60);
HeadBase.addBox(-2F, 1F, 0F, 2, 6, 4); this.HeadBase.addBox(-2F, 1F, 0F, 2, 6, 4);
HeadBase.setRotationPoint(-8.5F, 3.5F, -2F); this.HeadBase.setRotationPoint(-8.5F, 3.5F, -2F);
HeadBase.setTextureSize(256, 128); this.HeadBase.setTextureSize(256, 128);
HeadBase.mirror = true; this.HeadBase.mirror = true;
setRotation(HeadBase, 0F, 0F, 0.2268928F); setRotation(this.HeadBase, 0F, 0F, 0.2268928F);
HeadTop = new ModelRenderer(this, 0, 70); this.HeadTop = new ModelRenderer(this, 0, 70);
HeadTop.addBox(-2F, 0F, 0F, 2, 2, 4); this.HeadTop.addBox(-2F, 0F, 0F, 2, 2, 4);
HeadTop.setRotationPoint(-8.5F, 3.5F, -2F); this.HeadTop.setRotationPoint(-8.5F, 3.5F, -2F);
HeadTop.setTextureSize(256, 128); this.HeadTop.setTextureSize(256, 128);
HeadTop.mirror = true; this.HeadTop.mirror = true;
setRotation(HeadTop, 0F, 0F, -0.2268928F); setRotation(this.HeadTop, 0F, 0F, -0.2268928F);
HeadFront = new ModelRenderer(this, 0, 76); this.HeadFront = new ModelRenderer(this, 0, 76);
HeadFront.addBox(0F, 0F, 0F, 2, 4, 2); this.HeadFront.addBox(0F, 0F, 0F, 2, 4, 2);
HeadFront.setRotationPoint(-13F, 5F, -1F); this.HeadFront.setRotationPoint(-13F, 5F, -1F);
HeadFront.setTextureSize(256, 128); this.HeadFront.setTextureSize(256, 128);
HeadFront.mirror = true; this.HeadFront.mirror = true;
setRotation(HeadFront, 0F, 0F, 0F); setRotation(this.HeadFront, 0F, 0F, 0F);
HeadLeft = new ModelRenderer(this, 0, 82); this.HeadLeft = new ModelRenderer(this, 0, 82);
HeadLeft.addBox(-3F, 0F, 0F, 3, 4, 1); this.HeadLeft.addBox(-3F, 0F, 0F, 3, 4, 1);
HeadLeft.setRotationPoint(-10F, 5F, -2F); this.HeadLeft.setRotationPoint(-10F, 5F, -2F);
HeadLeft.setTextureSize(256, 128); this.HeadLeft.setTextureSize(256, 128);
HeadLeft.mirror = true; this.HeadLeft.mirror = true;
setRotation(HeadLeft, 0F, 0.3490659F, 0F); setRotation(this.HeadLeft, 0F, 0.3490659F, 0F);
HeadRight = new ModelRenderer(this, 0, 87); this.HeadRight = new ModelRenderer(this, 0, 87);
HeadRight.addBox(-3F, 0F, -1F, 3, 4, 1); this.HeadRight.addBox(-3F, 0F, -1F, 3, 4, 1);
HeadRight.setRotationPoint(-10F, 5F, 2F); this.HeadRight.setRotationPoint(-10F, 5F, 2F);
HeadRight.setTextureSize(256, 128); this.HeadRight.setTextureSize(256, 128);
HeadRight.mirror = true; this.HeadRight.mirror = true;
setRotation(HeadRight, 0F, -0.3490659F, 0F); setRotation(this.HeadRight, 0F, -0.3490659F, 0F);
HeadFrontTop = new ModelRenderer(this, 0, 92); this.HeadFrontTop = new ModelRenderer(this, 0, 92);
HeadFrontTop.addBox(-3F, 0F, 0F, 3, 1, 2); this.HeadFrontTop.addBox(-3F, 0F, 0F, 3, 1, 2);
HeadFrontTop.setRotationPoint(-10.5F, 4F, -1F); this.HeadFrontTop.setRotationPoint(-10.5F, 4F, -1F);
HeadFrontTop.setTextureSize(256, 128); this.HeadFrontTop.setTextureSize(256, 128);
HeadFrontTop.mirror = true; this.HeadFrontTop.mirror = true;
setRotation(HeadFrontTop, 0F, 0F, -0.3490659F); setRotation(this.HeadFrontTop, 0F, 0F, -0.3490659F);
TorsoRotorBottom = new ModelRenderer(this, 0, 0); this.TorsoRotorBottom = new ModelRenderer(this, 0, 0);
TorsoRotorBottom.addBox(0F, 0F, 0F, 3, 1, 1); this.TorsoRotorBottom.addBox(0F, 0F, 0F, 3, 1, 1);
TorsoRotorBottom.setRotationPoint(-7F, 11.5F, -0.5F); this.TorsoRotorBottom.setRotationPoint(-7F, 11.5F, -0.5F);
TorsoRotorBottom.setTextureSize(256, 128); this.TorsoRotorBottom.setTextureSize(256, 128);
TorsoRotorBottom.mirror = true; this.TorsoRotorBottom.mirror = true;
setRotation(TorsoRotorBottom, 0F, 0F, 0F); setRotation(this.TorsoRotorBottom, 0F, 0F, 0F);
TorsoRotorFront = new ModelRenderer(this, 0, 2); this.TorsoRotorFront = new ModelRenderer(this, 0, 2);
TorsoRotorFront.addBox(0F, 0F, 0F, 1, 3, 1); this.TorsoRotorFront.addBox(0F, 0F, 0F, 1, 3, 1);
TorsoRotorFront.setRotationPoint(-8F, 9F, -0.5F); this.TorsoRotorFront.setRotationPoint(-8F, 9F, -0.5F);
TorsoRotorFront.setTextureSize(256, 128); this.TorsoRotorFront.setTextureSize(256, 128);
TorsoRotorFront.mirror = true; this.TorsoRotorFront.mirror = true;
setRotation(TorsoRotorFront, 0F, 0F, 0F); setRotation(this.TorsoRotorFront, 0F, 0F, 0F);
TorsoRotorBack = new ModelRenderer(this, 0, 6); this.TorsoRotorBack = new ModelRenderer(this, 0, 6);
TorsoRotorBack.addBox(0F, 0F, 0F, 1, 2, 1); this.TorsoRotorBack.addBox(0F, 0F, 0F, 1, 2, 1);
TorsoRotorBack.setRotationPoint(-4F, 10F, -0.5F); this.TorsoRotorBack.setRotationPoint(-4F, 10F, -0.5F);
TorsoRotorBack.setTextureSize(256, 128); this.TorsoRotorBack.setTextureSize(256, 128);
TorsoRotorBack.mirror = true; this.TorsoRotorBack.mirror = true;
setRotation(TorsoRotorBack, 0F, 0F, 0F); setRotation(this.TorsoRotorBack, 0F, 0F, 0F);
TorsoRotorBlades = new ModelRenderer(this, 112, 120); this.TorsoRotorBlades = new ModelRenderer(this, 112, 120);
TorsoRotorBlades.addBox(-1.5F, -1.5F, 0F, 3, 3, 0); this.TorsoRotorBlades.addBox(-1.5F, -1.5F, 0F, 3, 3, 0);
TorsoRotorBlades.setRotationPoint(-7F + 1.5F, 8.5F + 1.5F, 0F); this.TorsoRotorBlades.setRotationPoint(-7F + 1.5F, 8.5F + 1.5F, 0F);
TorsoRotorBlades.setTextureSize(256, 128); this.TorsoRotorBlades.setTextureSize(256, 128);
TorsoRotorBlades.mirror = true; this.TorsoRotorBlades.mirror = true;
setRotation(TorsoRotorBlades, 0F, 0F, 0F); setRotation(this.TorsoRotorBlades, 0F, 0F, 0F);
TorsoRotorPivot = new ModelRenderer(this, 0, 9); this.TorsoRotorPivot = new ModelRenderer(this, 0, 9);
TorsoRotorPivot.addBox(0F, 0F, 0F, 1, 2, 1); this.TorsoRotorPivot.addBox(0F, 0F, 0F, 1, 2, 1);
TorsoRotorPivot.setRotationPoint(-6F, 8.5F, -0.5F); this.TorsoRotorPivot.setRotationPoint(-6F, 8.5F, -0.5F);
TorsoRotorPivot.setTextureSize(256, 128); this.TorsoRotorPivot.setTextureSize(256, 128);
TorsoRotorPivot.mirror = true; this.TorsoRotorPivot.mirror = true;
setRotation(TorsoRotorPivot, 0F, 0F, 0F); setRotation(this.TorsoRotorPivot, 0F, 0F, 0F);
RotorBlades = new ModelRenderer(this, 76, 68); this.RotorBlades = new ModelRenderer(this, 76, 68);
RotorBlades.addBox(-30F, 0F, -30F, 60, 0, 60); this.RotorBlades.addBox(-30F, 0F, -30F, 60, 0, 60);
RotorBlades.setRotationPoint(0F, 1.5F, 0F); this.RotorBlades.setRotationPoint(0F, 1.5F, 0F);
RotorBlades.setTextureSize(256, 128); this.RotorBlades.setTextureSize(256, 128);
RotorBlades.mirror = true; this.RotorBlades.mirror = true;
setRotation(RotorBlades, 0F, 0F, 0F); setRotation(this.RotorBlades, 0F, 0F, 0F);
Antenna1 = new ModelRenderer(this, 0, 95); this.Antenna1 = new ModelRenderer(this, 0, 95);
Antenna1.addBox(0F, 0F, 0F, 4, 1, 1); this.Antenna1.addBox(0F, 0F, 0F, 4, 1, 1);
Antenna1.setRotationPoint(-14F, 4F, 0.5F); this.Antenna1.setRotationPoint(-14F, 4F, 0.5F);
Antenna1.setTextureSize(256, 128); this.Antenna1.setTextureSize(256, 128);
Antenna1.mirror = true; this.Antenna1.mirror = true;
setRotation(Antenna1, 0F, 0F, 0F); setRotation(this.Antenna1, 0F, 0F, 0F);
Antenna2 = new ModelRenderer(this, 0, 97); this.Antenna2 = new ModelRenderer(this, 0, 97);
Antenna2.addBox(0F, 0F, 0F, 2, 1, 1); this.Antenna2.addBox(0F, 0F, 0F, 2, 1, 1);
Antenna2.setRotationPoint(-15F, 7F, 0F); this.Antenna2.setRotationPoint(-15F, 7F, 0F);
Antenna2.setTextureSize(256, 128); this.Antenna2.setTextureSize(256, 128);
Antenna2.mirror = true; this.Antenna2.mirror = true;
setRotation(Antenna2, 0F, 0F, 0F); setRotation(this.Antenna2, 0F, 0F, 0F);
GunPivot = new ModelRenderer(this, 0, 106); this.GunPivot = new ModelRenderer(this, 0, 106);
GunPivot.addBox(0F, 0F, 0F, 1, 2, 2); this.GunPivot.addBox(0F, 0F, 0F, 1, 2, 2);
GunPivot.setRotationPoint(-11F, 10F, -1F); this.GunPivot.setRotationPoint(-11F, 10F, -1F);
GunPivot.setTextureSize(256, 128); this.GunPivot.setTextureSize(256, 128);
GunPivot.mirror = true; this.GunPivot.mirror = true;
setRotation(GunPivot, 0F, 0F, 0F); setRotation(this.GunPivot, 0F, 0F, 0F);
GunBarrel = new ModelRenderer(this, 0, 110); this.GunBarrel = new ModelRenderer(this, 0, 110);
GunBarrel.addBox(-6F, 0F, -0.5F, 6, 1, 1); this.GunBarrel.addBox(-6F, 0F, -0.5F, 6, 1, 1);
GunBarrel.setRotationPoint(-10.5F, 11.5F, 0F); this.GunBarrel.setRotationPoint(-10.5F, 11.5F, 0F);
GunBarrel.setTextureSize(256, 128); this.GunBarrel.setTextureSize(256, 128);
GunBarrel.mirror = true; this.GunBarrel.mirror = true;
setRotation(GunBarrel, 0F, 0, 0F); setRotation(this.GunBarrel, 0F, 0, 0F);
GunBack = new ModelRenderer(this, 0, 112); this.GunBack = new ModelRenderer(this, 0, 112);
GunBack.addBox(0F, -1F, -1F, 2, 2, 2); this.GunBack.addBox(0F, -1F, -1F, 2, 2, 2);
GunBack.setRotationPoint(-10.5F, 12F, 0F); this.GunBack.setRotationPoint(-10.5F, 12F, 0F);
GunBack.setTextureSize(256, 128); this.GunBack.setTextureSize(256, 128);
GunBack.mirror = true; this.GunBack.mirror = true;
setRotation(GunBack, 0F, 0, 0F); setRotation(this.GunBack, 0F, 0, 0F);
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.renderAll(scaleFactor);
RotorPivotStem.render(f5); }
RotorPivotTop.render(f5);
RotorPivotPlate.render(f5); public void renderAll(float scaleFactor) {
TorsoBaseCenter.render(f5); float time = (System.currentTimeMillis() % 360000L) / (1000F / 60F);
TorsoPlateLeft.render(f5);
TorsoBaseBottom.render(f5); this.RotorBlades.rotateAngleY = time * (f * 5);
TorsoPlateRight.render(f5); this.TorsoRotorBlades.rotateAngleZ = time * (f * 5);
TorsoPlateBottom.render(f5); this.TailRotorBlades.rotateAngleZ = time * (f * 5);
WingLeftPlate.render(f5);
WingRightPlate.render(f5); this.RotorPivotStem.render(scaleFactor);
WingLeft.render(f5); this.RotorPivotTop.render(scaleFactor);
WingLeftFront.render(f5); this.RotorPivotPlate.render(scaleFactor);
WingLeftTip.render(f5); this.TorsoBaseCenter.render(scaleFactor);
WingRight.render(f5); this.TorsoPlateLeft.render(scaleFactor);
WingRightFront.render(f5); this.TorsoBaseBottom.render(scaleFactor);
WingRightTip.render(f5); this.TorsoPlateRight.render(scaleFactor);
TorsoBaseBack.render(f5); this.TorsoPlateBottom.render(scaleFactor);
TorsoBoxBottom.render(f5); this.WingLeftPlate.render(scaleFactor);
TorsoPlateBack.render(f5); this.WingRightPlate.render(scaleFactor);
TorsoBoxBack.render(f5); this.WingLeft.render(scaleFactor);
TorsoPlateLeftBack.render(f5); this.WingLeftFront.render(scaleFactor);
TorsoPlateRightBack.render(f5); this.WingLeftTip.render(scaleFactor);
TailFrontBase.render(f5); this.WingRight.render(scaleFactor);
TailFrontPlate.render(f5); this.WingRightFront.render(scaleFactor);
TailBackBase.render(f5); this.WingRightTip.render(scaleFactor);
TailRotorFront.render(f5); this.TorsoBaseBack.render(scaleFactor);
TailRotorTop.render(f5); this.TorsoBoxBottom.render(scaleFactor);
TailRotorBack.render(f5); this.TorsoPlateBack.render(scaleFactor);
TailRotorBottom.render(f5); this.TorsoBoxBack.render(scaleFactor);
TailRotorBlades.render(f5); this.TorsoPlateLeftBack.render(scaleFactor);
TailRotorPivot.render(f5); this.TorsoPlateRightBack.render(scaleFactor);
HeadNeck.render(f5); this.TailFrontBase.render(scaleFactor);
HeadBack.render(f5); this.TailFrontPlate.render(scaleFactor);
HeadBase.render(f5); this.TailBackBase.render(scaleFactor);
HeadTop.render(f5); this.TailRotorFront.render(scaleFactor);
HeadFront.render(f5); this.TailRotorTop.render(scaleFactor);
HeadLeft.render(f5); this.TailRotorBack.render(scaleFactor);
HeadRight.render(f5); this.TailRotorBottom.render(scaleFactor);
HeadFrontTop.render(f5); this.TailRotorBlades.render(scaleFactor);
TorsoRotorBottom.render(f5); this.TailRotorPivot.render(scaleFactor);
TorsoRotorFront.render(f5); this.HeadNeck.render(scaleFactor);
TorsoRotorBack.render(f5); this.HeadBack.render(scaleFactor);
TorsoRotorBlades.render(f5); this.HeadBase.render(scaleFactor);
TorsoRotorPivot.render(f5); this.HeadTop.render(scaleFactor);
RotorBlades.render(f5); this.HeadFront.render(scaleFactor);
Antenna1.render(f5); this.HeadLeft.render(scaleFactor);
Antenna2.render(f5); 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); //GunPivot.render(f5);
//GunBarrel.render(f5); //GunBarrel.render(f5);
//GunBack.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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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;
}
} }

View File

@ -14,7 +14,7 @@ import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class ModelJetPack extends ModelBiped { public class ModelJetPack extends ModelBiped {
// fields
ModelRenderer Tank1; ModelRenderer Tank1;
ModelRenderer Tank2; ModelRenderer Tank2;
ModelRenderer Tip1; ModelRenderer Tip1;
@ -27,111 +27,87 @@ public class ModelJetPack extends ModelBiped {
ModelRenderer JetPack; ModelRenderer JetPack;
public ModelJetPack() { public ModelJetPack() {
textureWidth = 32; this.textureWidth = 32;
textureHeight = 32; this.textureHeight = 32;
float x = 0F; float x = 0F;
float y = 0F; float y = 0F;
float z = -2F; 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) { this.JetPack = new ModelRenderer(this, 0, 0);
//super.render(entity, f, f1, f2, f3, f4, f5); this.JetPack.setRotationPoint(x, y, z);
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);
}
private void setRotation(ModelRenderer model, float x, float y, float z) { this.Pack = new ModelRenderer(this, 12, 10);
model.rotateAngleX = x; this.Pack.addBox(0F, 0F, 0F, 4, 6, 1);
model.rotateAngleY = y; this.Pack.setRotationPoint(-2F, 3F, 0F);
model.rotateAngleZ = z; 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 @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; EntityPlayer player = (EntityPlayer) entity;
if (player.isSneaking()) { this.isSneak = player.isSneaking();
this.isSneak = true;
} else {
this.isSneak = false;
}
ItemStack itemstack = player.inventory.getCurrentItem(); ItemStack itemstack = player.inventory.getCurrentItem();
this.heldItemRight = itemstack != null ? 1 : 0; 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.rotationPointX = this.bipedBody.rotationPointX;
this.JetPack.rotationPointY = this.bipedBody.rotationPointY; this.JetPack.rotationPointY = this.bipedBody.rotationPointY;
this.JetPack.rotationPointZ = this.bipedBody.rotationPointZ; this.JetPack.rotationPointZ = this.bipedBody.rotationPointZ;
@ -154,14 +132,38 @@ public class ModelJetPack extends ModelBiped {
this.JetPack.rotateAngleZ = this.bipedBody.rotateAngleZ; this.JetPack.rotateAngleZ = this.bipedBody.rotateAngleZ;
} }
protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) { @Override
parChild.rotationPointX -= parParent.rotationPointX; public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
parChild.rotationPointY -= parParent.rotationPointY;
parChild.rotationPointZ -= parParent.rotationPointZ; //super.render(entity, f, f1, f2, f3, f4, f5);
parChild.rotateAngleX -= parParent.rotateAngleX; this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
parChild.rotateAngleY -= parParent.rotateAngleY;
parChild.rotateAngleZ -= parParent.rotateAngleZ; /*Tank1.render(f5);
parParent.addChild(parChild); 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;
}
} }

View File

@ -17,102 +17,100 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
public class ModelM65 extends ModelBiped { public class ModelM65 extends ModelBiped {
// fields
public ModelRenderer mask; public ModelRenderer mask;
public ModelRenderer filter; public ModelRenderer filter;
public ModelM65() { public ModelM65() {
textureWidth = 32; this.textureWidth = 32;
textureHeight = 32; this.textureHeight = 32;
float yOffset = 0.5F; float yOffset = 0.5F;
mask = new ModelRenderer(this, 0, 0); this.mask = new ModelRenderer(this, 0, 0);
filter = new ModelRenderer(this, 0, 0); this.filter = new ModelRenderer(this, 0, 0);
ModelRenderer maskHead = new ModelRenderer(this, 0, 0); ModelRenderer maskHead = new ModelRenderer(this, 0, 0);
maskHead.addBox(0F, 0F, 0F, 8, 8, 8); maskHead.addBox(0F, 0F, 0F, 8, 8, 8);
maskHead.setRotationPoint(-4F, -8F + yOffset, -4F); maskHead.setRotationPoint(-4F, -8F + yOffset, -4F);
maskHead.setTextureSize(32, 32); maskHead.setTextureSize(32, 32);
maskHead.mirror = true; maskHead.mirror = true;
setRotation(maskHead, 0F, 0F, 0F); setRotation(maskHead, 0F, 0F, 0F);
convertToChild(mask, maskHead); convertToChild(this.mask, maskHead);
ModelRenderer nose = new ModelRenderer(this, 0, 16); ModelRenderer nose = new ModelRenderer(this, 0, 16);
nose.addBox(0F, 0F, 0F, 3, 3, 1); nose.addBox(0F, 0F, 0F, 3, 3, 1);
nose.setRotationPoint(-1.5F, -3.5F + yOffset, -5F); nose.setRotationPoint(-1.5F, -3.5F + yOffset, -5F);
nose.setTextureSize(32, 32); nose.setTextureSize(32, 32);
nose.mirror = true; nose.mirror = true;
setRotation(nose, 0F, 0F, 0F); setRotation(nose, 0F, 0F, 0F);
convertToChild(mask, nose); convertToChild(this.mask, nose);
ModelRenderer outlet = new ModelRenderer(this, 0, 20); ModelRenderer outlet = new ModelRenderer(this, 0, 20);
outlet.addBox(0F, -2F, 0F, 2, 2, 1); outlet.addBox(0F, -2F, 0F, 2, 2, 1);
outlet.setRotationPoint(-1F, -3.5F + yOffset, -5F); outlet.setRotationPoint(-1F, -3.5F + yOffset, -5F);
outlet.setTextureSize(32, 32); outlet.setTextureSize(32, 32);
outlet.mirror = true; outlet.mirror = true;
setRotation(outlet, -0.4799655F, 0F, 0F); setRotation(outlet, -0.4799655F, 0F, 0F);
convertToChild(mask, outlet); convertToChild(this.mask, outlet);
ModelRenderer noseSlope = new ModelRenderer(this, 8, 16); ModelRenderer noseSlope = new ModelRenderer(this, 8, 16);
noseSlope.addBox(0F, 0F, -2F, 3, 2, 2); noseSlope.addBox(0F, 0F, -2F, 3, 2, 2);
noseSlope.setRotationPoint(-1.5F, -2F + yOffset, -4F); noseSlope.setRotationPoint(-1.5F, -2F + yOffset, -4F);
noseSlope.setTextureSize(32, 32); noseSlope.setTextureSize(32, 32);
noseSlope.mirror = true; noseSlope.mirror = true;
setRotation(noseSlope, 0.6108652F, 0F, 0F); setRotation(noseSlope, 0.6108652F, 0F, 0F);
convertToChild(mask, noseSlope); convertToChild(this.mask, noseSlope);
ModelRenderer eye1 = new ModelRenderer(this, 0, 23); ModelRenderer eye1 = new ModelRenderer(this, 0, 23);
eye1.addBox(0F, 0F, 0F, 3, 3, 0); eye1.addBox(0F, 0F, 0F, 3, 3, 0);
eye1.setRotationPoint(-3.5F, -6F + yOffset, -4.2F); eye1.setRotationPoint(-3.5F, -6F + yOffset, -4.2F);
eye1.setTextureSize(32, 32); eye1.setTextureSize(32, 32);
eye1.mirror = true; eye1.mirror = true;
setRotation(eye1, 0F, 0F, 0F); setRotation(eye1, 0F, 0F, 0F);
convertToChild(mask, eye1); convertToChild(this.mask, eye1);
ModelRenderer eye2 = new ModelRenderer(this, 0, 26); ModelRenderer eye2 = new ModelRenderer(this, 0, 26);
eye2.addBox(0F, 0F, 0F, 3, 3, 0); eye2.addBox(0F, 0F, 0F, 3, 3, 0);
eye2.setRotationPoint(0.5F, -6F + yOffset, -4.2F); eye2.setRotationPoint(0.5F, -6F + yOffset, -4.2F);
eye2.setTextureSize(32, 32); eye2.setTextureSize(32, 32);
eye2.mirror = true; eye2.mirror = true;
setRotation(eye2, 0F, 0F, 0F); setRotation(eye2, 0F, 0F, 0F);
convertToChild(mask, eye2); convertToChild(this.mask, eye2);
ModelRenderer iForgot = new ModelRenderer(this, 6, 20); ModelRenderer iForgot = new ModelRenderer(this, 6, 20);
iForgot.addBox(0F, 0F, 0F, 2, 2, 1); iForgot.addBox(0F, 0F, 0F, 2, 2, 1);
iForgot.setRotationPoint(-1F, -3.2F + yOffset, -6F); iForgot.setRotationPoint(-1F, -3.2F + yOffset, -6F);
iForgot.setTextureSize(32, 32); iForgot.setTextureSize(32, 32);
iForgot.mirror = true; iForgot.mirror = true;
setRotation(iForgot, 0F, 0F, 0F); setRotation(iForgot, 0F, 0F, 0F);
convertToChild(mask, iForgot); convertToChild(this.mask, iForgot);
ModelRenderer filterConnector = new ModelRenderer(this, 6, 23); ModelRenderer filterConnector = new ModelRenderer(this, 6, 23);
filterConnector.addBox(0F, 0F, -3F, 2, 2, 1); filterConnector.addBox(0F, 0F, -3F, 2, 2, 1);
filterConnector.setRotationPoint(-1F, -2F + yOffset, -4F); filterConnector.setRotationPoint(-1F, -2F + yOffset, -4F);
filterConnector.setTextureSize(32, 32); filterConnector.setTextureSize(32, 32);
filterConnector.mirror = true; filterConnector.mirror = true;
setRotation(filterConnector, 0.6108652F, 0F, 0F); setRotation(filterConnector, 0.6108652F, 0F, 0F);
convertToChild(filter, filterConnector); convertToChild(this.filter, filterConnector);
ModelRenderer filter1 = new ModelRenderer(this, 18, 21); ModelRenderer filter1 = new ModelRenderer(this, 18, 21);
filter1.addBox(0F, -1F, -5F, 3, 4, 2); filter1.addBox(0F, -1F, -5F, 3, 4, 2);
filter1.setRotationPoint(-1.5F, -2F + yOffset, -4F); filter1.setRotationPoint(-1.5F, -2F + yOffset, -4F);
filter1.setTextureSize(32, 32); filter1.setTextureSize(32, 32);
filter1.mirror = true; filter1.mirror = true;
setRotation(filter1, 0.6108652F, 0F, 0F); setRotation(filter1, 0.6108652F, 0F, 0F);
convertToChild(filter, filter1); convertToChild(this.filter, filter1);
ModelRenderer filter2 = new ModelRenderer(this, 18, 16); ModelRenderer filter2 = new ModelRenderer(this, 18, 16);
filter2.addBox(0F, -0.5F, -5F, 4, 3, 2); filter2.addBox(0F, -0.5F, -5F, 4, 3, 2);
filter2.setRotationPoint(-2F, -2F + yOffset, -4F); filter2.setRotationPoint(-2F, -2F + yOffset, -4F);
filter2.setTextureSize(32, 32); filter2.setTextureSize(32, 32);
filter2.mirror = true; filter2.mirror = true;
setRotation(filter2, 0.6108652F, 0F, 0F); setRotation(filter2, 0.6108652F, 0F, 0F);
convertToChild(filter, filter2); convertToChild(this.filter, filter2);
} }
@Override @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; EntityPlayer player = (EntityPlayer) entity;
if (player.isSneaking()) { this.isSneak = player.isSneaking();
this.isSneak = true;
} else {
this.isSneak = false;
}
} }
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.rotationPointX = this.bipedHead.rotationPointX;
this.mask.rotationPointY = this.bipedHead.rotationPointY; this.mask.rotationPointY = this.bipedHead.rotationPointY;
this.mask.rotateAngleY = this.bipedHead.rotateAngleY; this.mask.rotateAngleY = this.bipedHead.rotateAngleY;
@ -124,54 +122,48 @@ public class ModelM65 extends ModelBiped {
} }
@Override @Override
public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, entity);
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix();
if(this.isChild) { if(this.isChild) {
float f6 = 2.0F; float f6 = 2.0F;
GL11.glPushMatrix();
GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6); 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; double d = 1D / 16D * 18D;
GL11.glScaled(d, d, d); 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 { } else {
GL11.glPushMatrix();
double d = 1D / 16D * 18D; double d = 1D / 16D * 18D;
GL11.glScaled(d, d, d); 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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
} }

View File

@ -14,7 +14,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
public class ModelM65Blaze extends ModelBiped { public class ModelM65Blaze extends ModelBiped {
// fields
public ModelRenderer mask; public ModelRenderer mask;
public ModelRenderer Shape1; public ModelRenderer Shape1;
public ModelRenderer Shape2; public ModelRenderer Shape2;
@ -28,96 +28,94 @@ public class ModelM65Blaze extends ModelBiped {
public ModelRenderer Shape10; public ModelRenderer Shape10;
public ModelM65Blaze() { public ModelM65Blaze() {
textureWidth = 32; this.textureWidth = 32;
textureHeight = 32; this.textureHeight = 32;
float yOffset = 4F; float yOffset = 4F;
mask = new ModelRenderer(this, 0, 0); this.mask = new ModelRenderer(this, 0, 0);
Shape1 = new ModelRenderer(this, 0, 0); this.Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 8, 8, 8); this.Shape1.addBox(0F, 0F, 0F, 8, 8, 8);
Shape1.setRotationPoint(-4F, -8F + yOffset, -4F); this.Shape1.setRotationPoint(-4F, -8F + yOffset, -4F);
Shape1.setTextureSize(32, 32); this.Shape1.setTextureSize(32, 32);
Shape1.mirror = true; this.Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F); setRotation(this.Shape1, 0F, 0F, 0F);
convertToChild(mask, Shape1); convertToChild(this.mask, this.Shape1);
Shape2 = new ModelRenderer(this, 0, 16); this.Shape2 = new ModelRenderer(this, 0, 16);
Shape2.addBox(0F, 0F, 0F, 3, 3, 1); this.Shape2.addBox(0F, 0F, 0F, 3, 3, 1);
Shape2.setRotationPoint(-1.5F, -3.5F + yOffset, -5F); this.Shape2.setRotationPoint(-1.5F, -3.5F + yOffset, -5F);
Shape2.setTextureSize(32, 32); this.Shape2.setTextureSize(32, 32);
Shape2.mirror = true; this.Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F); setRotation(this.Shape2, 0F, 0F, 0F);
convertToChild(mask, Shape2); convertToChild(this.mask, this.Shape2);
Shape3 = new ModelRenderer(this, 0, 20); this.Shape3 = new ModelRenderer(this, 0, 20);
Shape3.addBox(0F, -2F, 0F, 2, 2, 1); this.Shape3.addBox(0F, -2F, 0F, 2, 2, 1);
Shape3.setRotationPoint(-1F, -3.5F + yOffset, -5F); this.Shape3.setRotationPoint(-1F, -3.5F + yOffset, -5F);
Shape3.setTextureSize(32, 32); this.Shape3.setTextureSize(32, 32);
Shape3.mirror = true; this.Shape3.mirror = true;
setRotation(Shape3, -0.4799655F, 0F, 0F); setRotation(this.Shape3, -0.4799655F, 0F, 0F);
convertToChild(mask, Shape3); convertToChild(this.mask, this.Shape3);
Shape4 = new ModelRenderer(this, 8, 16); this.Shape4 = new ModelRenderer(this, 8, 16);
Shape4.addBox(0F, 0F, -2F, 3, 2, 2); this.Shape4.addBox(0F, 0F, -2F, 3, 2, 2);
Shape4.setRotationPoint(-1.5F, -2F + yOffset, -4F); this.Shape4.setRotationPoint(-1.5F, -2F + yOffset, -4F);
Shape4.setTextureSize(32, 32); this.Shape4.setTextureSize(32, 32);
Shape4.mirror = true; this.Shape4.mirror = true;
setRotation(Shape4, 0.6108652F, 0F, 0F); setRotation(this.Shape4, 0.6108652F, 0F, 0F);
convertToChild(mask, Shape4); convertToChild(this.mask, this.Shape4);
Shape5 = new ModelRenderer(this, 0, 23); this.Shape5 = new ModelRenderer(this, 0, 23);
Shape5.addBox(0F, 0F, 0F, 3, 3, 0); this.Shape5.addBox(0F, 0F, 0F, 3, 3, 0);
Shape5.setRotationPoint(-3.5F, -6F + yOffset, -4.2F); this.Shape5.setRotationPoint(-3.5F, -6F + yOffset, -4.2F);
Shape5.setTextureSize(32, 32); this.Shape5.setTextureSize(32, 32);
Shape5.mirror = true; this.Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F); setRotation(this.Shape5, 0F, 0F, 0F);
convertToChild(mask, Shape5); convertToChild(this.mask, this.Shape5);
Shape6 = new ModelRenderer(this, 0, 26); this.Shape6 = new ModelRenderer(this, 0, 26);
Shape6.addBox(0F, 0F, 0F, 3, 3, 0); this.Shape6.addBox(0F, 0F, 0F, 3, 3, 0);
Shape6.setRotationPoint(0.5F, -6F + yOffset, -4.2F); this.Shape6.setRotationPoint(0.5F, -6F + yOffset, -4.2F);
Shape6.setTextureSize(32, 32); this.Shape6.setTextureSize(32, 32);
Shape6.mirror = true; this.Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F); setRotation(this.Shape6, 0F, 0F, 0F);
convertToChild(mask, Shape6); convertToChild(this.mask, this.Shape6);
Shape7 = new ModelRenderer(this, 6, 20); this.Shape7 = new ModelRenderer(this, 6, 20);
Shape7.addBox(0F, 0F, 0F, 2, 2, 1); this.Shape7.addBox(0F, 0F, 0F, 2, 2, 1);
Shape7.setRotationPoint(-1F, -3.2F + yOffset, -6F); this.Shape7.setRotationPoint(-1F, -3.2F + yOffset, -6F);
Shape7.setTextureSize(32, 32); this.Shape7.setTextureSize(32, 32);
Shape7.mirror = true; this.Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0F); setRotation(this.Shape7, 0F, 0F, 0F);
convertToChild(mask, Shape7); convertToChild(this.mask, this.Shape7);
Shape8 = new ModelRenderer(this, 6, 23); this.Shape8 = new ModelRenderer(this, 6, 23);
Shape8.addBox(0F, 0F, -3F, 2, 2, 1); this.Shape8.addBox(0F, 0F, -3F, 2, 2, 1);
Shape8.setRotationPoint(-1F, -2F + yOffset, -4F); this.Shape8.setRotationPoint(-1F, -2F + yOffset, -4F);
Shape8.setTextureSize(32, 32); this.Shape8.setTextureSize(32, 32);
Shape8.mirror = true; this.Shape8.mirror = true;
setRotation(Shape8, 0.6108652F, 0F, 0F); setRotation(this.Shape8, 0.6108652F, 0F, 0F);
convertToChild(mask, Shape8); convertToChild(this.mask, this.Shape8);
Shape9 = new ModelRenderer(this, 18, 21); this.Shape9 = new ModelRenderer(this, 18, 21);
Shape9.addBox(0F, -1F, -5F, 3, 4, 2); this.Shape9.addBox(0F, -1F, -5F, 3, 4, 2);
Shape9.setRotationPoint(-1.5F, -2F + yOffset, -4F); this.Shape9.setRotationPoint(-1.5F, -2F + yOffset, -4F);
Shape9.setTextureSize(32, 32); this.Shape9.setTextureSize(32, 32);
Shape9.mirror = true; this.Shape9.mirror = true;
setRotation(Shape9, 0.6108652F, 0F, 0F); setRotation(this.Shape9, 0.6108652F, 0F, 0F);
convertToChild(mask, Shape9); convertToChild(this.mask, this.Shape9);
Shape10 = new ModelRenderer(this, 18, 16); this.Shape10 = new ModelRenderer(this, 18, 16);
Shape10.addBox(0F, -0.5F, -5F, 4, 3, 2); this.Shape10.addBox(0F, -0.5F, -5F, 4, 3, 2);
Shape10.setRotationPoint(-2F, -2F + yOffset, -4F); this.Shape10.setRotationPoint(-2F, -2F + yOffset, -4F);
Shape10.setTextureSize(32, 32); this.Shape10.setTextureSize(32, 32);
Shape10.mirror = true; this.Shape10.mirror = true;
setRotation(Shape10, 0.6108652F, 0F, 0F); setRotation(this.Shape10, 0.6108652F, 0F, 0F);
convertToChild(mask, Shape10); convertToChild(this.mask, this.Shape10);
} }
@Override @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; EntityPlayer player = (EntityPlayer) entity;
if (player.isSneaking()) { this.isSneak = player.isSneaking();
this.isSneak = true;
} else {
this.isSneak = false;
}
} }
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.rotationPointX = this.bipedHead.rotationPointX;
this.mask.rotationPointY = this.bipedHead.rotationPointY; this.mask.rotationPointY = this.bipedHead.rotationPointY;
this.mask.rotateAngleY = this.bipedHead.rotateAngleY; this.mask.rotateAngleY = this.bipedHead.rotateAngleY;
@ -125,34 +123,36 @@ public class ModelM65Blaze extends ModelBiped {
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
double d = 1D / 16D * 18D; double d = 1D / 16D * 18D;
//GL11.glTranslated(0, 1/16D, 0); //GL11.glTranslated(0, 1/16D, 0);
GL11.glScaled(d, d, d); GL11.glScaled(d, d, d);
GL11.glScaled(1.01D, 1.01D, 1.01D); GL11.glScaled(1.01D, 1.01D, 1.01D);
this.mask.render(par7); this.mask.render(scaleFactor);
GL11.glPopMatrix(); 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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
} }

View File

@ -13,50 +13,51 @@ public class ModelMan extends ModelArmorBase {
public ModelMan() { public ModelMan() {
super(0); super(0);
head = new ModelRendererObj(ResourceManager.player_manly_af, "Head"); this.head = new ModelRendererObj(ResourceManager.player_manly_af, "Head");
body = new ModelRendererObj(ResourceManager.player_manly_af, "Body"); this.body = new ModelRendererObj(ResourceManager.player_manly_af, "Body");
leftArm = new ModelRendererObj(ResourceManager.player_manly_af, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F); this.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); this.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); this.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.rightLeg = new ModelRendererObj(ResourceManager.player_manly_af, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHTING);
bindTexture(ResourceManager.player_manly_tex); bindTexture(ResourceManager.player_manly_tex);
head.render(0.0625F); this.head.render(scaleFactor);
body.render(0.0625F); this.body.render(scaleFactor);
leftArm.render(0.0625F); this.leftArm.render(scaleFactor);
rightArm.render(0.0625F); this.rightArm.render(scaleFactor);
leftLeg.render(0.0625F); this.leftLeg.render(scaleFactor);
rightLeg.render(0.0625F); this.rightLeg.render(scaleFactor);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7, RenderPlayer render) { public void render(Entity par1Entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, RenderPlayer render) {
this.isSneak = par1Entity.isSneaking();
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); 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.glPushMatrix();
GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHTING);
bindTexture(ResourceManager.player_manly_tex); bindTexture(ResourceManager.player_manly_tex);
head.render(0.0625F); this.head.render(scaleFactor);
body.render(0.0625F); this.body.render(scaleFactor);
leftArm.render(0.0625F); this.leftArm.render(scaleFactor);
rightArm.render(0.0625F); this.rightArm.render(scaleFactor);
leftLeg.render(0.0625F); this.leftLeg.render(scaleFactor);
rightLeg.render(0.0625F); this.rightLeg.render(scaleFactor);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -13,60 +13,59 @@ import net.minecraft.util.MathHelper;
public class ModelMaskMan extends ModelBase { public class ModelMaskMan extends ModelBase {
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glRotatef(180, 1, 0, 0); GL11.glRotatef(180, 1, 0, 0);
GL11.glTranslatef(0, -1.5F, 0); GL11.glTranslatef(0, -1.5F, 0);
GL11.glRotatef(-90, 0, 1, 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; //boolean target = entity.worldObj.getEntityByID(man.getDataWatcher().getWatchableObjectInt(man.dwTargetPlayer)) != null;
//if(target) //if(target)
// GL11.glRotated(-f3, 0, 1, 0); // GL11.glRotated(-f3, 0, 1, 0);
float f7 = man.limbSwing - man.limbSwingAmount * (1.0F - f5); float f7 = maskManEntity.limbSwing - maskManEntity.limbSwingAmount * (1.0F - scaleFactor);
float f6 = (man.prevLimbSwingAmount + (man.limbSwingAmount - man.prevLimbSwingAmount) * f5) * 0.5F; 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); double swing = Math.toDegrees(MathHelper.cos(f7 / 2F + (float)Math.PI) * 1.4F * f6);
GL11.glRotated(swing * -0.1, 1, 0, 0); GL11.glRotated(swing * -0.1, 1, 0, 0);
ResourceManager.maskman.renderPart("Torso"); ResourceManager.maskman.renderPart("Torso");
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(-0.5F, 1.75F, -0.5F); GL11.glTranslatef(-0.5F, 1.75F, -0.5F);
GL11.glRotated(swing, 0, 0, 1); GL11.glRotated(swing, 0, 0, 1);
ResourceManager.maskman.renderPart("LLeg"); ResourceManager.maskman.renderPart("LLeg");
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(-0.5F, 1.75F, 0.5F); GL11.glTranslatef(-0.5F, 1.75F, 0.5F);
GL11.glRotated(swing * -1, 0, 0, 1); GL11.glRotated(swing * -1, 0, 0, 1);
ResourceManager.maskman.renderPart("RLeg"); ResourceManager.maskman.renderPart("RLeg");
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(-0.5F, 3.75F, -1.5F); GL11.glTranslatef(-0.5F, 3.75F, -1.5F);
GL11.glRotated(swing * 0.25, 0, 0, 1); GL11.glRotated(swing * 0.25, 0, 0, 1);
ResourceManager.maskman.renderPart("LArm"); ResourceManager.maskman.renderPart("LArm");
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(-0.5F, 3.75F, 1.5F); GL11.glTranslatef(-0.5F, 3.75F, 1.5F);
GL11.glRotated(swing * -0.25, 0, 0, 1); GL11.glRotated(swing * -0.25, 0, 0, 1);
ResourceManager.maskman.renderPart("RArm"); ResourceManager.maskman.renderPart("RArm");
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(0.5F, 4F, 0); GL11.glTranslatef(0.5F, 4F, 0);
GL11.glRotated(-f3, 0, 1, 0); GL11.glRotated(-netHeadYaw, 0, 1, 0);
if(man.getHealth() >= man.getMaxHealth() / 2) { if(maskManEntity.getHealth() >= maskManEntity.getMaxHealth() / 2) {
ResourceManager.maskman.renderPart("Head"); ResourceManager.maskman.renderPart("Head");
} else { } else {
ResourceManager.maskman.renderPart("Skull"); ResourceManager.maskman.renderPart("Skull");
@ -74,7 +73,7 @@ public class ModelMaskMan extends ModelBase {
ResourceManager.maskman.renderPart("IOU"); ResourceManager.maskman.renderPart("IOU");
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelMultitoolClaw extends ModelBase { public class ModelMultitoolClaw extends ModelBase {
// fields
ModelRenderer Base; ModelRenderer Base;
ModelRenderer BTop; ModelRenderer BTop;
ModelRenderer BBottom; ModelRenderer BBottom;
@ -45,243 +45,237 @@ public class ModelMultitoolClaw extends ModelBase {
ModelRenderer WireB; ModelRenderer WireB;
public ModelMultitoolClaw() { public ModelMultitoolClaw() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 64; this.textureHeight = 64;
Base = new ModelRenderer(this, 0, 0); this.Base = new ModelRenderer(this, 0, 0);
Base.addBox(0F, 0F, 0F, 3, 8, 8); this.Base.addBox(0F, 0F, 0F, 3, 8, 8);
Base.setRotationPoint(-3F, -4F, -4F); this.Base.setRotationPoint(-3F, -4F, -4F);
Base.setTextureSize(64, 64); this.Base.setTextureSize(64, 64);
Base.mirror = true; this.Base.mirror = true;
setRotation(Base, 0F, 0F, 0F); setRotation(this.Base, 0F, 0F, 0F);
BTop = new ModelRenderer(this, 0, 16); this.BTop = new ModelRenderer(this, 0, 16);
BTop.addBox(0F, 0F, 0F, 4, 2, 8); this.BTop.addBox(0F, 0F, 0F, 4, 2, 8);
BTop.setRotationPoint(-3F, -4F, -4F); this.BTop.setRotationPoint(-3F, -4F, -4F);
BTop.setTextureSize(64, 64); this.BTop.setTextureSize(64, 64);
BTop.mirror = true; this.BTop.mirror = true;
setRotation(BTop, 0F, 0F, -0.2617994F); setRotation(this.BTop, 0F, 0F, -0.2617994F);
BBottom = new ModelRenderer(this, 0, 26); this.BBottom = new ModelRenderer(this, 0, 26);
BBottom.addBox(0F, -2F, 0F, 4, 2, 8); this.BBottom.addBox(0F, -2F, 0F, 4, 2, 8);
BBottom.setRotationPoint(-3F, 4F, -4F); this.BBottom.setRotationPoint(-3F, 4F, -4F);
BBottom.setTextureSize(64, 64); this.BBottom.setTextureSize(64, 64);
BBottom.mirror = true; this.BBottom.mirror = true;
setRotation(BBottom, 0F, 0F, 0.2617994F); setRotation(this.BBottom, 0F, 0F, 0.2617994F);
BLeft = new ModelRenderer(this, 0, 36); this.BLeft = new ModelRenderer(this, 0, 36);
BLeft.addBox(0F, 0F, 0F, 4, 8, 2); this.BLeft.addBox(0F, 0F, 0F, 4, 8, 2);
BLeft.setRotationPoint(-3F, -4F, -4F); this.BLeft.setRotationPoint(-3F, -4F, -4F);
BLeft.setTextureSize(64, 64); this.BLeft.setTextureSize(64, 64);
BLeft.mirror = true; this.BLeft.mirror = true;
setRotation(BLeft, 0F, 0.2617994F, 0F); setRotation(this.BLeft, 0F, 0.2617994F, 0F);
BRight = new ModelRenderer(this, 12, 36); this.BRight = new ModelRenderer(this, 12, 36);
BRight.addBox(0F, 0F, -2F, 4, 8, 2); this.BRight.addBox(0F, 0F, -2F, 4, 8, 2);
BRight.setRotationPoint(-3F, -4F, 4F); this.BRight.setRotationPoint(-3F, -4F, 4F);
BRight.setTextureSize(64, 64); this.BRight.setTextureSize(64, 64);
BRight.mirror = true; this.BRight.mirror = true;
setRotation(BRight, 0F, -0.2617994F, 0F); setRotation(this.BRight, 0F, -0.2617994F, 0F);
RTop = new ModelRenderer(this, 24, 0); this.RTop = new ModelRenderer(this, 24, 0);
RTop.addBox(0F, 0F, 0F, 3, 2, 10); this.RTop.addBox(0F, 0F, 0F, 3, 2, 10);
RTop.setRotationPoint(4F, -6F, -6F); this.RTop.setRotationPoint(4F, -6F, -6F);
RTop.setTextureSize(64, 64); this.RTop.setTextureSize(64, 64);
RTop.mirror = true; this.RTop.mirror = true;
setRotation(RTop, 0F, 0F, 0F); setRotation(this.RTop, 0F, 0F, 0F);
RBottom = new ModelRenderer(this, 24, 12); this.RBottom = new ModelRenderer(this, 24, 12);
RBottom.addBox(0F, 0F, 0F, 3, 2, 10); this.RBottom.addBox(0F, 0F, 0F, 3, 2, 10);
RBottom.setRotationPoint(4F, 4F, -4F); this.RBottom.setRotationPoint(4F, 4F, -4F);
RBottom.setTextureSize(64, 64); this.RBottom.setTextureSize(64, 64);
RBottom.mirror = true; this.RBottom.mirror = true;
setRotation(RBottom, 0F, 0F, 0F); setRotation(this.RBottom, 0F, 0F, 0F);
RLeft = new ModelRenderer(this, 0, 46); this.RLeft = new ModelRenderer(this, 0, 46);
RLeft.addBox(0F, 0F, 0F, 3, 10, 2); this.RLeft.addBox(0F, 0F, 0F, 3, 10, 2);
RLeft.setRotationPoint(4F, -4F, -6F); this.RLeft.setRotationPoint(4F, -4F, -6F);
RLeft.setTextureSize(64, 64); this.RLeft.setTextureSize(64, 64);
RLeft.mirror = true; this.RLeft.mirror = true;
setRotation(RLeft, 0F, 0F, 0F); setRotation(this.RLeft, 0F, 0F, 0F);
RRight = new ModelRenderer(this, 10, 46); this.RRight = new ModelRenderer(this, 10, 46);
RRight.addBox(0F, 0F, 0F, 3, 10, 2); this.RRight.addBox(0F, 0F, 0F, 3, 10, 2);
RRight.setRotationPoint(4F, -6F, 4F); this.RRight.setRotationPoint(4F, -6F, 4F);
RRight.setTextureSize(64, 64); this.RRight.setTextureSize(64, 64);
RRight.mirror = true; this.RRight.mirror = true;
setRotation(RRight, 0F, 0F, 0F); setRotation(this.RRight, 0F, 0F, 0F);
GPivot = new ModelRenderer(this, 24, 24); this.GPivot = new ModelRenderer(this, 24, 24);
GPivot.addBox(0F, 0F, 0F, 3, 4, 4); this.GPivot.addBox(0F, 0F, 0F, 3, 4, 4);
GPivot.setRotationPoint(-6F, -2F, -2F); this.GPivot.setRotationPoint(-6F, -2F, -2F);
GPivot.setTextureSize(64, 64); this.GPivot.setTextureSize(64, 64);
GPivot.mirror = true; this.GPivot.mirror = true;
setRotation(GPivot, 0F, 0F, 0F); setRotation(this.GPivot, 0F, 0F, 0F);
GBase = new ModelRenderer(this, 24, 32); this.GBase = new ModelRenderer(this, 24, 32);
GBase.addBox(-2F, -3F, -4F, 4, 3, 8); this.GBase.addBox(-2F, -3F, -4F, 4, 3, 8);
GBase.setRotationPoint(-6F, 0F, 1F); this.GBase.setRotationPoint(-6F, 0F, 1F);
GBase.setTextureSize(64, 64); this.GBase.setTextureSize(64, 64);
GBase.mirror = true; this.GBase.mirror = true;
setRotation(GBase, 0F, 0F, 1.047198F); setRotation(this.GBase, 0F, 0F, 1.047198F);
F31 = new ModelRenderer(this, 20, 52); this.F31 = new ModelRenderer(this, 20, 52);
F31.addBox(-3F, -1F, 0F, 3, 2, 2); this.F31.addBox(-3F, -1F, 0F, 3, 2, 2);
F31.setRotationPoint(-5.5F, -2F, -1F); this.F31.setRotationPoint(-5.5F, -2F, -1F);
F31.setTextureSize(64, 64); this.F31.setTextureSize(64, 64);
F31.mirror = true; this.F31.mirror = true;
setRotation(F31, 0F, 0F, 0.6981317F); setRotation(this.F31, 0F, 0F, 0.6981317F);
F21 = new ModelRenderer(this, 30, 52); this.F21 = new ModelRenderer(this, 30, 52);
F21.addBox(-3F, -1F, -2F, 3, 2, 2); this.F21.addBox(-3F, -1F, -2F, 3, 2, 2);
F21.setRotationPoint(-5.5F, -2F, -1.2F); this.F21.setRotationPoint(-5.5F, -2F, -1.2F);
F21.setTextureSize(64, 64); this.F21.setTextureSize(64, 64);
F21.mirror = true; this.F21.mirror = true;
setRotation(F21, 0F, 0F, 0.6981317F); setRotation(this.F21, 0F, 0F, 0.6981317F);
F41 = new ModelRenderer(this, 40, 52); this.F41 = new ModelRenderer(this, 40, 52);
F41.addBox(-3F, -1F, 0F, 3, 2, 2); this.F41.addBox(-3F, -1F, 0F, 3, 2, 2);
F41.setRotationPoint(-5.5F, -2F, 1.2F); this.F41.setRotationPoint(-5.5F, -2F, 1.2F);
F41.setTextureSize(64, 64); this.F41.setTextureSize(64, 64);
F41.mirror = true; this.F41.mirror = true;
setRotation(F41, 0F, 0F, 0.6981317F); setRotation(this.F41, 0F, 0F, 0.6981317F);
F51 = new ModelRenderer(this, 50, 52); this.F51 = new ModelRenderer(this, 50, 52);
F51.addBox(-3F, -1F, 0F, 3, 2, 2); this.F51.addBox(-3F, -1F, 0F, 3, 2, 2);
F51.setRotationPoint(-5.5F, -2F, 3.4F); this.F51.setRotationPoint(-5.5F, -2F, 3.4F);
F51.setTextureSize(64, 64); this.F51.setTextureSize(64, 64);
F51.mirror = true; this.F51.mirror = true;
setRotation(F51, 0F, 0F, 0.6981317F); setRotation(this.F51, 0F, 0F, 0.6981317F);
F11 = new ModelRenderer(this, 48, 38); this.F11 = new ModelRenderer(this, 48, 38);
F11.addBox(0F, -1F, -3F, 2, 2, 3); this.F11.addBox(0F, -1F, -3F, 2, 2, 3);
F11.setRotationPoint(-5.5F, -2F, -3F); this.F11.setRotationPoint(-5.5F, -2F, -3F);
F11.setTextureSize(64, 64); this.F11.setTextureSize(64, 64);
F11.mirror = true; this.F11.mirror = true;
setRotation(F11, 0F, 0F, 1.047198F); setRotation(this.F11, 0F, 0F, 1.047198F);
F22 = new ModelRenderer(this, 20, 56); this.F22 = new ModelRenderer(this, 20, 56);
F22.addBox(-3F, -1F, -1F, 3, 2, 2); this.F22.addBox(-3F, -1F, -1F, 3, 2, 2);
F22.setRotationPoint(-7.6F, -3.7F, -2.2F); this.F22.setRotationPoint(-7.6F, -3.7F, -2.2F);
F22.setTextureSize(64, 64); this.F22.setTextureSize(64, 64);
F22.mirror = true; this.F22.mirror = true;
setRotation(F22, 0F, 0F, 0.3490659F); setRotation(this.F22, 0F, 0F, 0.3490659F);
F32 = new ModelRenderer(this, 30, 56); this.F32 = new ModelRenderer(this, 30, 56);
F32.addBox(-3F, -1F, -1F, 3, 2, 2); this.F32.addBox(-3F, -1F, -1F, 3, 2, 2);
F32.setRotationPoint(-7.6F, -3.7F, 0F); this.F32.setRotationPoint(-7.6F, -3.7F, 0F);
F32.setTextureSize(64, 64); this.F32.setTextureSize(64, 64);
F32.mirror = true; this.F32.mirror = true;
setRotation(F32, 0F, 0F, 0.3490659F); setRotation(this.F32, 0F, 0F, 0.3490659F);
F42 = new ModelRenderer(this, 40, 56); this.F42 = new ModelRenderer(this, 40, 56);
F42.addBox(-3F, -1F, -1F, 3, 2, 2); this.F42.addBox(-3F, -1F, -1F, 3, 2, 2);
F42.setRotationPoint(-7.6F, -3.7F, 2.2F); this.F42.setRotationPoint(-7.6F, -3.7F, 2.2F);
F42.setTextureSize(64, 64); this.F42.setTextureSize(64, 64);
F42.mirror = true; this.F42.mirror = true;
setRotation(F42, 0F, 0F, 0.3490659F); setRotation(this.F42, 0F, 0F, 0.3490659F);
F52 = new ModelRenderer(this, 50, 56); this.F52 = new ModelRenderer(this, 50, 56);
F52.addBox(-3F, -1F, -1F, 3, 2, 2); this.F52.addBox(-3F, -1F, -1F, 3, 2, 2);
F52.setRotationPoint(-7.6F, -3.7F, 4.4F); this.F52.setRotationPoint(-7.6F, -3.7F, 4.4F);
F52.setTextureSize(64, 64); this.F52.setTextureSize(64, 64);
F52.mirror = true; this.F52.mirror = true;
setRotation(F52, 0F, 0F, 0.3490659F); setRotation(this.F52, 0F, 0F, 0.3490659F);
F12 = new ModelRenderer(this, 48, 34); this.F12 = new ModelRenderer(this, 48, 34);
F12.addBox(-1F, -1F, -2F, 2, 2, 2); this.F12.addBox(-1F, -1F, -2F, 2, 2, 2);
F12.setRotationPoint(-5F, -1F, -5.8F); this.F12.setRotationPoint(-5F, -1F, -5.8F);
F12.setTextureSize(64, 64); this.F12.setTextureSize(64, 64);
F12.mirror = true; this.F12.mirror = true;
setRotation(F12, 0F, 0.7853982F, 1.047198F); setRotation(this.F12, 0F, 0.7853982F, 1.047198F);
F23 = new ModelRenderer(this, 20, 60); this.F23 = new ModelRenderer(this, 20, 60);
F23.addBox(-3F, -1F, -1F, 3, 2, 2); this.F23.addBox(-3F, -1F, -1F, 3, 2, 2);
F23.setRotationPoint(-10F, -4.6F, -2.2F); this.F23.setRotationPoint(-10F, -4.6F, -2.2F);
F23.setTextureSize(64, 64); this.F23.setTextureSize(64, 64);
F23.mirror = true; this.F23.mirror = true;
setRotation(F23, 0F, 0F, -0.1745329F); setRotation(this.F23, 0F, 0F, -0.1745329F);
F33 = new ModelRenderer(this, 30, 60); this.F33 = new ModelRenderer(this, 30, 60);
F33.addBox(-3F, -1F, -1F, 3, 2, 2); this.F33.addBox(-3F, -1F, -1F, 3, 2, 2);
F33.setRotationPoint(-10F, -4.6F, 0F); this.F33.setRotationPoint(-10F, -4.6F, 0F);
F33.setTextureSize(64, 64); this.F33.setTextureSize(64, 64);
F33.mirror = true; this.F33.mirror = true;
setRotation(F33, 0F, 0F, -0.1745329F); setRotation(this.F33, 0F, 0F, -0.1745329F);
F43 = new ModelRenderer(this, 40, 60); this.F43 = new ModelRenderer(this, 40, 60);
F43.addBox(-3F, -1F, -1F, 3, 2, 2); this.F43.addBox(-3F, -1F, -1F, 3, 2, 2);
F43.setRotationPoint(-10F, -4.6F, 2.2F); this.F43.setRotationPoint(-10F, -4.6F, 2.2F);
F43.setTextureSize(64, 64); this.F43.setTextureSize(64, 64);
F43.mirror = true; this.F43.mirror = true;
setRotation(F43, 0F, 0F, -0.1745329F); setRotation(this.F43, 0F, 0F, -0.1745329F);
F53 = new ModelRenderer(this, 50, 60); this.F53 = new ModelRenderer(this, 50, 60);
F53.addBox(-3F, -1F, -1F, 3, 2, 2); this.F53.addBox(-3F, -1F, -1F, 3, 2, 2);
F53.setRotationPoint(-10F, -4.6F, 4.4F); this.F53.setRotationPoint(-10F, -4.6F, 4.4F);
F53.setTextureSize(64, 64); this.F53.setTextureSize(64, 64);
F53.mirror = true; this.F53.mirror = true;
setRotation(F53, 0F, 0F, -0.1745329F); setRotation(this.F53, 0F, 0F, -0.1745329F);
F13 = new ModelRenderer(this, 48, 30); this.F13 = new ModelRenderer(this, 48, 30);
F13.addBox(-1F, -1F, -2F, 2, 2, 2); this.F13.addBox(-1F, -1F, -2F, 2, 2, 2);
F13.setRotationPoint(-5.5F, -1F, -7.2F); this.F13.setRotationPoint(-5.5F, -1F, -7.2F);
F13.setTextureSize(64, 64); this.F13.setTextureSize(64, 64);
F13.mirror = true; this.F13.mirror = true;
setRotation(F13, 0.6981317F, 1.047198F, 1.047198F); setRotation(this.F13, 0.6981317F, 1.047198F, 1.047198F);
WireL = new ModelRenderer(this, 38, 30); this.WireL = new ModelRenderer(this, 38, 30);
WireL.addBox(0F, 0F, 0F, 4, 1, 1); this.WireL.addBox(0F, 0F, 0F, 4, 1, 1);
WireL.setRotationPoint(0F, -5.5F, 0F); this.WireL.setRotationPoint(0F, -5.5F, 0F);
WireL.setTextureSize(64, 64); this.WireL.setTextureSize(64, 64);
WireL.mirror = true; this.WireL.mirror = true;
setRotation(WireL, 0F, 0F, 0F); setRotation(this.WireL, 0F, 0F, 0F);
WireR = new ModelRenderer(this, 38, 28); this.WireR = new ModelRenderer(this, 38, 28);
WireR.addBox(0F, 0F, 0F, 4, 1, 1); this.WireR.addBox(0F, 0F, 0F, 4, 1, 1);
WireR.setRotationPoint(0F, -5.5F, 2F); this.WireR.setRotationPoint(0F, -5.5F, 2F);
WireR.setTextureSize(64, 64); this.WireR.setTextureSize(64, 64);
WireR.mirror = true; this.WireR.mirror = true;
setRotation(WireR, 0F, 0F, 0F); setRotation(this.WireR, 0F, 0F, 0F);
Gauge1 = new ModelRenderer(this, 20, 47); this.Gauge1 = new ModelRenderer(this, 20, 47);
Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4); this.Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4);
Gauge1.setRotationPoint(-1F, -4F, 4F); this.Gauge1.setRotationPoint(-1F, -4F, 4F);
Gauge1.setTextureSize(64, 64); this.Gauge1.setTextureSize(64, 64);
Gauge1.mirror = true; this.Gauge1.mirror = true;
setRotation(Gauge1, -0.7853982F, 0F, 0F); setRotation(this.Gauge1, -0.7853982F, 0F, 0F);
Gauge2 = new ModelRenderer(this, 34, 48); this.Gauge2 = new ModelRenderer(this, 34, 48);
Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3); this.Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3);
Gauge2.setRotationPoint(-1F, -4F, 4F); this.Gauge2.setRotationPoint(-1F, -4F, 4F);
Gauge2.setTextureSize(64, 64); this.Gauge2.setTextureSize(64, 64);
Gauge2.mirror = true; this.Gauge2.mirror = true;
setRotation(Gauge2, -0.7853982F, 0F, 0F); setRotation(this.Gauge2, -0.7853982F, 0F, 0F);
WireB = new ModelRenderer(this, 48, 49); this.WireB = new ModelRenderer(this, 48, 49);
WireB.addBox(0F, 0F, 0F, 4, 2, 1); this.WireB.addBox(0F, 0F, 0F, 4, 2, 1);
WireB.setRotationPoint(0F, -1F, -5.5F); this.WireB.setRotationPoint(0F, -1F, -5.5F);
WireB.setTextureSize(64, 64); this.WireB.setTextureSize(64, 64);
WireB.mirror = true; this.WireB.mirror = true;
setRotation(WireB, 0F, 0F, 0F); setRotation(this.WireB, 0F, 0F, 0F);
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.Base.render(scaleFactor);
Base.render(f5); this.BTop.render(scaleFactor);
BTop.render(f5); this.BBottom.render(scaleFactor);
BBottom.render(f5); this.BLeft.render(scaleFactor);
BLeft.render(f5); this.BRight.render(scaleFactor);
BRight.render(f5); this.RTop.render(scaleFactor);
RTop.render(f5); this.RBottom.render(scaleFactor);
RBottom.render(f5); this.RLeft.render(scaleFactor);
RLeft.render(f5); this.RRight.render(scaleFactor);
RRight.render(f5); this.GPivot.render(scaleFactor);
GPivot.render(f5); this.GBase.render(scaleFactor);
GBase.render(f5); this.F31.render(scaleFactor);
F31.render(f5); this.F21.render(scaleFactor);
F21.render(f5); this.F41.render(scaleFactor);
F41.render(f5); this.F51.render(scaleFactor);
F51.render(f5); this.F11.render(scaleFactor);
F11.render(f5); this.F22.render(scaleFactor);
F22.render(f5); this.F32.render(scaleFactor);
F32.render(f5); this.F42.render(scaleFactor);
F42.render(f5); this.F52.render(scaleFactor);
F52.render(f5); this.F12.render(scaleFactor);
F12.render(f5); this.F23.render(scaleFactor);
F23.render(f5); this.F33.render(scaleFactor);
F33.render(f5); this.F43.render(scaleFactor);
F43.render(f5); this.F53.render(scaleFactor);
F53.render(f5); this.F13.render(scaleFactor);
F13.render(f5); this.WireL.render(scaleFactor);
WireL.render(f5); this.WireR.render(scaleFactor);
WireR.render(f5); this.Gauge1.render(scaleFactor);
Gauge1.render(f5); this.Gauge2.render(scaleFactor);
Gauge2.render(f5); this.WireB.render(scaleFactor);
WireB.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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
} }

View File

@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelMultitoolFist extends ModelBase { public class ModelMultitoolFist extends ModelBase {
// fields
ModelRenderer Base; ModelRenderer Base;
ModelRenderer BTop; ModelRenderer BTop;
ModelRenderer BBottom; ModelRenderer BBottom;
@ -45,243 +45,236 @@ public class ModelMultitoolFist extends ModelBase {
ModelRenderer WireB; ModelRenderer WireB;
public ModelMultitoolFist() { public ModelMultitoolFist() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 64; this.textureHeight = 64;
Base = new ModelRenderer(this, 0, 0); this.Base = new ModelRenderer(this, 0, 0);
Base.addBox(0F, 0F, 0F, 3, 8, 8); this.Base.addBox(0F, 0F, 0F, 3, 8, 8);
Base.setRotationPoint(-3F, -4F, -4F); this.Base.setRotationPoint(-3F, -4F, -4F);
Base.setTextureSize(64, 64); this.Base.setTextureSize(64, 64);
Base.mirror = true; this.Base.mirror = true;
setRotation(Base, 0F, 0F, 0F); setRotation(this.Base, 0F, 0F, 0F);
BTop = new ModelRenderer(this, 0, 16); this.BTop = new ModelRenderer(this, 0, 16);
BTop.addBox(0F, 0F, 0F, 4, 2, 8); this.BTop.addBox(0F, 0F, 0F, 4, 2, 8);
BTop.setRotationPoint(-3F, -4F, -4F); this.BTop.setRotationPoint(-3F, -4F, -4F);
BTop.setTextureSize(64, 64); this.BTop.setTextureSize(64, 64);
BTop.mirror = true; this.BTop.mirror = true;
setRotation(BTop, 0F, 0F, -0.2617994F); setRotation(this.BTop, 0F, 0F, -0.2617994F);
BBottom = new ModelRenderer(this, 0, 26); this.BBottom = new ModelRenderer(this, 0, 26);
BBottom.addBox(0F, -2F, 0F, 4, 2, 8); this.BBottom.addBox(0F, -2F, 0F, 4, 2, 8);
BBottom.setRotationPoint(-3F, 4F, -4F); this.BBottom.setRotationPoint(-3F, 4F, -4F);
BBottom.setTextureSize(64, 64); this.BBottom.setTextureSize(64, 64);
BBottom.mirror = true; this.BBottom.mirror = true;
setRotation(BBottom, 0F, 0F, 0.2617994F); setRotation(this.BBottom, 0F, 0F, 0.2617994F);
BLeft = new ModelRenderer(this, 0, 36); this.BLeft = new ModelRenderer(this, 0, 36);
BLeft.addBox(0F, 0F, 0F, 4, 8, 2); this.BLeft.addBox(0F, 0F, 0F, 4, 8, 2);
BLeft.setRotationPoint(-3F, -4F, -4F); this.BLeft.setRotationPoint(-3F, -4F, -4F);
BLeft.setTextureSize(64, 64); this.BLeft.setTextureSize(64, 64);
BLeft.mirror = true; this.BLeft.mirror = true;
setRotation(BLeft, 0F, 0.2617994F, 0F); setRotation(this.BLeft, 0F, 0.2617994F, 0F);
BRight = new ModelRenderer(this, 12, 36); this.BRight = new ModelRenderer(this, 12, 36);
BRight.addBox(0F, 0F, -2F, 4, 8, 2); this.BRight.addBox(0F, 0F, -2F, 4, 8, 2);
BRight.setRotationPoint(-3F, -4F, 4F); this.BRight.setRotationPoint(-3F, -4F, 4F);
BRight.setTextureSize(64, 64); this.BRight.setTextureSize(64, 64);
BRight.mirror = true; this.BRight.mirror = true;
setRotation(BRight, 0F, -0.2617994F, 0F); setRotation(this.BRight, 0F, -0.2617994F, 0F);
RTop = new ModelRenderer(this, 24, 0); this.RTop = new ModelRenderer(this, 24, 0);
RTop.addBox(0F, 0F, 0F, 3, 2, 10); this.RTop.addBox(0F, 0F, 0F, 3, 2, 10);
RTop.setRotationPoint(4F, -6F, -6F); this.RTop.setRotationPoint(4F, -6F, -6F);
RTop.setTextureSize(64, 64); this.RTop.setTextureSize(64, 64);
RTop.mirror = true; this.RTop.mirror = true;
setRotation(RTop, 0F, 0F, 0F); setRotation(this.RTop, 0F, 0F, 0F);
RBottom = new ModelRenderer(this, 24, 12); this.RBottom = new ModelRenderer(this, 24, 12);
RBottom.addBox(0F, 0F, 0F, 3, 2, 10); this.RBottom.addBox(0F, 0F, 0F, 3, 2, 10);
RBottom.setRotationPoint(4F, 4F, -4F); this.RBottom.setRotationPoint(4F, 4F, -4F);
RBottom.setTextureSize(64, 64); this.RBottom.setTextureSize(64, 64);
RBottom.mirror = true; this.RBottom.mirror = true;
setRotation(RBottom, 0F, 0F, 0F); setRotation(this.RBottom, 0F, 0F, 0F);
RLeft = new ModelRenderer(this, 0, 46); this.RLeft = new ModelRenderer(this, 0, 46);
RLeft.addBox(0F, 0F, 0F, 3, 10, 2); this.RLeft.addBox(0F, 0F, 0F, 3, 10, 2);
RLeft.setRotationPoint(4F, -4F, -6F); this.RLeft.setRotationPoint(4F, -4F, -6F);
RLeft.setTextureSize(64, 64); this.RLeft.setTextureSize(64, 64);
RLeft.mirror = true; this.RLeft.mirror = true;
setRotation(RLeft, 0F, 0F, 0F); setRotation(this.RLeft, 0F, 0F, 0F);
RRight = new ModelRenderer(this, 10, 46); this.RRight = new ModelRenderer(this, 10, 46);
RRight.addBox(0F, 0F, 0F, 3, 10, 2); this.RRight.addBox(0F, 0F, 0F, 3, 10, 2);
RRight.setRotationPoint(4F, -6F, 4F); this.RRight.setRotationPoint(4F, -6F, 4F);
RRight.setTextureSize(64, 64); this.RRight.setTextureSize(64, 64);
RRight.mirror = true; this.RRight.mirror = true;
setRotation(RRight, 0F, 0F, 0F); setRotation(this.RRight, 0F, 0F, 0F);
GPivot = new ModelRenderer(this, 24, 24); this.GPivot = new ModelRenderer(this, 24, 24);
GPivot.addBox(0F, 0F, 0F, 3, 4, 4); this.GPivot.addBox(0F, 0F, 0F, 3, 4, 4);
GPivot.setRotationPoint(-6F, -2F, -2F); this.GPivot.setRotationPoint(-6F, -2F, -2F);
GPivot.setTextureSize(64, 64); this.GPivot.setTextureSize(64, 64);
GPivot.mirror = true; this.GPivot.mirror = true;
setRotation(GPivot, 0F, 0F, 0F); setRotation(this.GPivot, 0F, 0F, 0F);
GBase = new ModelRenderer(this, 24, 32); this.GBase = new ModelRenderer(this, 24, 32);
GBase.addBox(-2F, -3F, -4F, 4, 3, 8); this.GBase.addBox(-2F, -3F, -4F, 4, 3, 8);
GBase.setRotationPoint(-6F, 0F, 1F); this.GBase.setRotationPoint(-6F, 0F, 1F);
GBase.setTextureSize(64, 64); this.GBase.setTextureSize(64, 64);
GBase.mirror = true; this.GBase.mirror = true;
setRotation(GBase, 0F, 0F, 0.6108652F); setRotation(this.GBase, 0F, 0F, 0.6108652F);
F31 = new ModelRenderer(this, 20, 52); this.F31 = new ModelRenderer(this, 20, 52);
F31.addBox(-3F, -1F, 0F, 3, 2, 2); this.F31.addBox(-3F, -1F, 0F, 3, 2, 2);
F31.setRotationPoint(-6F, -2.8F, -1F); this.F31.setRotationPoint(-6F, -2.8F, -1F);
F31.setTextureSize(64, 64); this.F31.setTextureSize(64, 64);
F31.mirror = true; this.F31.mirror = true;
setRotation(F31, 0F, 0F, -0.5235988F); setRotation(this.F31, 0F, 0F, -0.5235988F);
F21 = new ModelRenderer(this, 30, 52); this.F21 = new ModelRenderer(this, 30, 52);
F21.addBox(-3F, -1F, -2F, 3, 2, 2); this.F21.addBox(-3F, -1F, -2F, 3, 2, 2);
F21.setRotationPoint(-6F, -2.8F, -1.2F); this.F21.setRotationPoint(-6F, -2.8F, -1.2F);
F21.setTextureSize(64, 64); this.F21.setTextureSize(64, 64);
F21.mirror = true; this.F21.mirror = true;
setRotation(F21, 0F, 0F, -0.5235988F); setRotation(this.F21, 0F, 0F, -0.5235988F);
F41 = new ModelRenderer(this, 40, 52); this.F41 = new ModelRenderer(this, 40, 52);
F41.addBox(-3F, -1F, 0F, 3, 2, 2); this.F41.addBox(-3F, -1F, 0F, 3, 2, 2);
F41.setRotationPoint(-6F, -2.8F, 1.2F); this.F41.setRotationPoint(-6F, -2.8F, 1.2F);
F41.setTextureSize(64, 64); this.F41.setTextureSize(64, 64);
F41.mirror = true; this.F41.mirror = true;
setRotation(F41, 0F, 0F, -0.5235988F); setRotation(this.F41, 0F, 0F, -0.5235988F);
F51 = new ModelRenderer(this, 50, 52); this.F51 = new ModelRenderer(this, 50, 52);
F51.addBox(-3F, -1F, 0F, 3, 2, 2); this.F51.addBox(-3F, -1F, 0F, 3, 2, 2);
F51.setRotationPoint(-6F, -2.8F, 3.4F); this.F51.setRotationPoint(-6F, -2.8F, 3.4F);
F51.setTextureSize(64, 64); this.F51.setTextureSize(64, 64);
F51.mirror = true; this.F51.mirror = true;
setRotation(F51, 0F, 0F, -0.5235988F); setRotation(this.F51, 0F, 0F, -0.5235988F);
F11 = new ModelRenderer(this, 48, 38); this.F11 = new ModelRenderer(this, 48, 38);
F11.addBox(-1F, -1F, -3F, 2, 2, 3); this.F11.addBox(-1F, -1F, -3F, 2, 2, 3);
F11.setRotationPoint(-5F, -1F, -2.5F); this.F11.setRotationPoint(-5F, -1F, -2.5F);
F11.setTextureSize(64, 64); this.F11.setTextureSize(64, 64);
F11.mirror = true; this.F11.mirror = true;
setRotation(F11, 1.22173F, 1.745329F, -1.047198F); setRotation(this.F11, 1.22173F, 1.745329F, -1.047198F);
F22 = new ModelRenderer(this, 20, 56); this.F22 = new ModelRenderer(this, 20, 56);
F22.addBox(-3F, -1F, -1F, 3, 2, 2); this.F22.addBox(-3F, -1F, -1F, 3, 2, 2);
F22.setRotationPoint(-8.5F, -2F, -2.2F); this.F22.setRotationPoint(-8.5F, -2F, -2.2F);
F22.setTextureSize(64, 64); this.F22.setTextureSize(64, 64);
F22.mirror = true; this.F22.mirror = true;
setRotation(F22, 0F, 0F, -1.919862F); setRotation(this.F22, 0F, 0F, -1.919862F);
F32 = new ModelRenderer(this, 30, 56); this.F32 = new ModelRenderer(this, 30, 56);
F32.addBox(-3F, -1F, -1F, 3, 2, 2); this.F32.addBox(-3F, -1F, -1F, 3, 2, 2);
F32.setRotationPoint(-8.5F, -2F, 0F); this.F32.setRotationPoint(-8.5F, -2F, 0F);
F32.setTextureSize(64, 64); this.F32.setTextureSize(64, 64);
F32.mirror = true; this.F32.mirror = true;
setRotation(F32, 0F, 0F, -1.919862F); setRotation(this.F32, 0F, 0F, -1.919862F);
F42 = new ModelRenderer(this, 40, 56); this.F42 = new ModelRenderer(this, 40, 56);
F42.addBox(-3F, -1F, -1F, 3, 2, 2); this.F42.addBox(-3F, -1F, -1F, 3, 2, 2);
F42.setRotationPoint(-8.5F, -2F, 2.2F); this.F42.setRotationPoint(-8.5F, -2F, 2.2F);
F42.setTextureSize(64, 64); this.F42.setTextureSize(64, 64);
F42.mirror = true; this.F42.mirror = true;
setRotation(F42, 0F, 0F, -1.919862F); setRotation(this.F42, 0F, 0F, -1.919862F);
F52 = new ModelRenderer(this, 50, 56); this.F52 = new ModelRenderer(this, 50, 56);
F52.addBox(-3F, -1F, -1F, 3, 2, 2); this.F52.addBox(-3F, -1F, -1F, 3, 2, 2);
F52.setRotationPoint(-8.5F, -2F, 4.4F); this.F52.setRotationPoint(-8.5F, -2F, 4.4F);
F52.setTextureSize(64, 64); this.F52.setTextureSize(64, 64);
F52.mirror = true; this.F52.mirror = true;
setRotation(F52, 0F, 0F, -1.919862F); setRotation(this.F52, 0F, 0F, -1.919862F);
F12 = new ModelRenderer(this, 48, 34); this.F12 = new ModelRenderer(this, 48, 34);
F12.addBox(-1F, -1F, -2F, 2, 2, 2); this.F12.addBox(-1F, -1F, -2F, 2, 2, 2);
F12.setRotationPoint(-6F, 0.5F, -4.5F); this.F12.setRotationPoint(-6F, 0.5F, -4.5F);
F12.setTextureSize(64, 64); this.F12.setTextureSize(64, 64);
F12.mirror = true; this.F12.mirror = true;
setRotation(F12, 1.22173F, 2.935045F, -1.047198F); setRotation(this.F12, 1.22173F, 2.935045F, -1.047198F);
F23 = new ModelRenderer(this, 20, 60); this.F23 = new ModelRenderer(this, 20, 60);
F23.addBox(-3F, -1F, -1F, 3, 2, 2); this.F23.addBox(-3F, -1F, -1F, 3, 2, 2);
F23.setRotationPoint(-8F, 0.5F, -2.2F); this.F23.setRotationPoint(-8F, 0.5F, -2.2F);
F23.setTextureSize(64, 64); this.F23.setTextureSize(64, 64);
F23.mirror = true; this.F23.mirror = true;
setRotation(F23, 0F, 0F, -2.879793F); setRotation(this.F23, 0F, 0F, -2.879793F);
F33 = new ModelRenderer(this, 30, 60); this.F33 = new ModelRenderer(this, 30, 60);
F33.addBox(-3F, -1F, -1F, 3, 2, 2); this.F33.addBox(-3F, -1F, -1F, 3, 2, 2);
F33.setRotationPoint(-8F, 0.5F, 0F); this.F33.setRotationPoint(-8F, 0.5F, 0F);
F33.setTextureSize(64, 64); this.F33.setTextureSize(64, 64);
F33.mirror = true; this.F33.mirror = true;
setRotation(F33, 0F, 0F, -2.879793F); setRotation(this.F33, 0F, 0F, -2.879793F);
F43 = new ModelRenderer(this, 40, 60); this.F43 = new ModelRenderer(this, 40, 60);
F43.addBox(-3F, -1F, -1F, 3, 2, 2); this.F43.addBox(-3F, -1F, -1F, 3, 2, 2);
F43.setRotationPoint(-8F, 0.5F, 2.2F); this.F43.setRotationPoint(-8F, 0.5F, 2.2F);
F43.setTextureSize(64, 64); this.F43.setTextureSize(64, 64);
F43.mirror = true; this.F43.mirror = true;
setRotation(F43, 0F, 0F, -2.879793F); setRotation(this.F43, 0F, 0F, -2.879793F);
F53 = new ModelRenderer(this, 50, 60); this.F53 = new ModelRenderer(this, 50, 60);
F53.addBox(-3F, -1F, -1F, 3, 2, 2); this.F53.addBox(-3F, -1F, -1F, 3, 2, 2);
F53.setRotationPoint(-8F, 0.5F, 4.4F); this.F53.setRotationPoint(-8F, 0.5F, 4.4F);
F53.setTextureSize(64, 64); this.F53.setTextureSize(64, 64);
F53.mirror = true; this.F53.mirror = true;
setRotation(F53, 0F, 0F, -2.879793F); setRotation(this.F53, 0F, 0F, -2.879793F);
F13 = new ModelRenderer(this, 48, 30); this.F13 = new ModelRenderer(this, 48, 30);
F13.addBox(-1F, -1F, -2F, 2, 2, 2); this.F13.addBox(-1F, -1F, -2F, 2, 2, 2);
F13.setRotationPoint(-7F, 1F, -4F); this.F13.setRotationPoint(-7F, 1F, -4F);
F13.setTextureSize(64, 64); this.F13.setTextureSize(64, 64);
F13.mirror = true; this.F13.mirror = true;
setRotation(F13, 0.5235988F, 2.617994F, -1.047198F); setRotation(this.F13, 0.5235988F, 2.617994F, -1.047198F);
WireL = new ModelRenderer(this, 38, 30); this.WireL = new ModelRenderer(this, 38, 30);
WireL.addBox(0F, 0F, 0F, 4, 1, 1); this.WireL.addBox(0F, 0F, 0F, 4, 1, 1);
WireL.setRotationPoint(0F, -5.5F, 0F); this.WireL.setRotationPoint(0F, -5.5F, 0F);
WireL.setTextureSize(64, 64); this.WireL.setTextureSize(64, 64);
WireL.mirror = true; this.WireL.mirror = true;
setRotation(WireL, 0F, 0F, 0F); setRotation(this.WireL, 0F, 0F, 0F);
WireR = new ModelRenderer(this, 38, 28); this.WireR = new ModelRenderer(this, 38, 28);
WireR.addBox(0F, 0F, 0F, 4, 1, 1); this.WireR.addBox(0F, 0F, 0F, 4, 1, 1);
WireR.setRotationPoint(0F, -5.5F, 2F); this.WireR.setRotationPoint(0F, -5.5F, 2F);
WireR.setTextureSize(64, 64); this.WireR.setTextureSize(64, 64);
WireR.mirror = true; this.WireR.mirror = true;
setRotation(WireR, 0F, 0F, 0F); setRotation(this.WireR, 0F, 0F, 0F);
Gauge1 = new ModelRenderer(this, 20, 47); this.Gauge1 = new ModelRenderer(this, 20, 47);
Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4); this.Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4);
Gauge1.setRotationPoint(-1F, -4F, 4F); this.Gauge1.setRotationPoint(-1F, -4F, 4F);
Gauge1.setTextureSize(64, 64); this.Gauge1.setTextureSize(64, 64);
Gauge1.mirror = true; this.Gauge1.mirror = true;
setRotation(Gauge1, -0.7853982F, 0F, 0F); setRotation(this.Gauge1, -0.7853982F, 0F, 0F);
Gauge2 = new ModelRenderer(this, 34, 48); this.Gauge2 = new ModelRenderer(this, 34, 48);
Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3); this.Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3);
Gauge2.setRotationPoint(-1F, -4F, 4F); this.Gauge2.setRotationPoint(-1F, -4F, 4F);
Gauge2.setTextureSize(64, 64); this.Gauge2.setTextureSize(64, 64);
Gauge2.mirror = true; this.Gauge2.mirror = true;
setRotation(Gauge2, -0.7853982F, 0F, 0F); setRotation(this.Gauge2, -0.7853982F, 0F, 0F);
WireB = new ModelRenderer(this, 48, 49); this.WireB = new ModelRenderer(this, 48, 49);
WireB.addBox(0F, 0F, 0F, 4, 2, 1); this.WireB.addBox(0F, 0F, 0F, 4, 2, 1);
WireB.setRotationPoint(0F, -1F, -5.5F); this.WireB.setRotationPoint(0F, -1F, -5.5F);
WireB.setTextureSize(64, 64); this.WireB.setTextureSize(64, 64);
WireB.mirror = true; this.WireB.mirror = true;
setRotation(WireB, 0F, 0F, 0F); setRotation(this.WireB, 0F, 0F, 0F);
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.Base.render(scaleFactor);
Base.render(f5); this.BTop.render(scaleFactor);
BTop.render(f5); this.BBottom.render(scaleFactor);
BBottom.render(f5); this.BLeft.render(scaleFactor);
BLeft.render(f5); this.BRight.render(scaleFactor);
BRight.render(f5); this.RTop.render(scaleFactor);
RTop.render(f5); this.RBottom.render(scaleFactor);
RBottom.render(f5); this.RLeft.render(scaleFactor);
RLeft.render(f5); this.RRight.render(scaleFactor);
RRight.render(f5); this.GPivot.render(scaleFactor);
GPivot.render(f5); this.GBase.render(scaleFactor);
GBase.render(f5); this.F31.render(scaleFactor);
F31.render(f5); this.F21.render(scaleFactor);
F21.render(f5); this.F41.render(scaleFactor);
F41.render(f5); this.F51.render(scaleFactor);
F51.render(f5); this.F11.render(scaleFactor);
F11.render(f5); this.F22.render(scaleFactor);
F22.render(f5); this.F32.render(scaleFactor);
F32.render(f5); this.F42.render(scaleFactor);
F42.render(f5); this.F52.render(scaleFactor);
F52.render(f5); this.F12.render(scaleFactor);
F12.render(f5); this.F23.render(scaleFactor);
F23.render(f5); this.F33.render(scaleFactor);
F33.render(f5); this.F43.render(scaleFactor);
F43.render(f5); this.F53.render(scaleFactor);
F53.render(f5); this.F13.render(scaleFactor);
F13.render(f5); this.WireL.render(scaleFactor);
WireL.render(f5); this.WireR.render(scaleFactor);
WireR.render(f5); this.Gauge1.render(scaleFactor);
Gauge1.render(f5); this.Gauge2.render(scaleFactor);
Gauge2.render(f5); this.WireB.render(scaleFactor);
WireB.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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
} }

View File

@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelMultitoolOpen extends ModelBase { public class ModelMultitoolOpen extends ModelBase {
// fields
ModelRenderer Base; ModelRenderer Base;
ModelRenderer BTop; ModelRenderer BTop;
ModelRenderer BBottom; ModelRenderer BBottom;
@ -45,243 +45,237 @@ public class ModelMultitoolOpen extends ModelBase {
ModelRenderer WireB; ModelRenderer WireB;
public ModelMultitoolOpen() { public ModelMultitoolOpen() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 64; this.textureHeight = 64;
Base = new ModelRenderer(this, 0, 0); this.Base = new ModelRenderer(this, 0, 0);
Base.addBox(0F, 0F, 0F, 3, 8, 8); this.Base.addBox(0F, 0F, 0F, 3, 8, 8);
Base.setRotationPoint(-3F, -4F, -4F); this.Base.setRotationPoint(-3F, -4F, -4F);
Base.setTextureSize(64, 64); this.Base.setTextureSize(64, 64);
Base.mirror = true; this.Base.mirror = true;
setRotation(Base, 0F, 0F, 0F); setRotation(this.Base, 0F, 0F, 0F);
BTop = new ModelRenderer(this, 0, 16); this.BTop = new ModelRenderer(this, 0, 16);
BTop.addBox(0F, 0F, 0F, 4, 2, 8); this.BTop.addBox(0F, 0F, 0F, 4, 2, 8);
BTop.setRotationPoint(-3F, -4F, -4F); this.BTop.setRotationPoint(-3F, -4F, -4F);
BTop.setTextureSize(64, 64); this.BTop.setTextureSize(64, 64);
BTop.mirror = true; this.BTop.mirror = true;
setRotation(BTop, 0F, 0F, -0.2617994F); setRotation(this.BTop, 0F, 0F, -0.2617994F);
BBottom = new ModelRenderer(this, 0, 26); this.BBottom = new ModelRenderer(this, 0, 26);
BBottom.addBox(0F, -2F, 0F, 4, 2, 8); this.BBottom.addBox(0F, -2F, 0F, 4, 2, 8);
BBottom.setRotationPoint(-3F, 4F, -4F); this.BBottom.setRotationPoint(-3F, 4F, -4F);
BBottom.setTextureSize(64, 64); this.BBottom.setTextureSize(64, 64);
BBottom.mirror = true; this.BBottom.mirror = true;
setRotation(BBottom, 0F, 0F, 0.2617994F); setRotation(this.BBottom, 0F, 0F, 0.2617994F);
BLeft = new ModelRenderer(this, 0, 36); this.BLeft = new ModelRenderer(this, 0, 36);
BLeft.addBox(0F, 0F, 0F, 4, 8, 2); this.BLeft.addBox(0F, 0F, 0F, 4, 8, 2);
BLeft.setRotationPoint(-3F, -4F, -4F); this.BLeft.setRotationPoint(-3F, -4F, -4F);
BLeft.setTextureSize(64, 64); this.BLeft.setTextureSize(64, 64);
BLeft.mirror = true; this.BLeft.mirror = true;
setRotation(BLeft, 0F, 0.2617994F, 0F); setRotation(this.BLeft, 0F, 0.2617994F, 0F);
BRight = new ModelRenderer(this, 12, 36); this.BRight = new ModelRenderer(this, 12, 36);
BRight.addBox(0F, 0F, -2F, 4, 8, 2); this.BRight.addBox(0F, 0F, -2F, 4, 8, 2);
BRight.setRotationPoint(-3F, -4F, 4F); this.BRight.setRotationPoint(-3F, -4F, 4F);
BRight.setTextureSize(64, 64); this.BRight.setTextureSize(64, 64);
BRight.mirror = true; this.BRight.mirror = true;
setRotation(BRight, 0F, -0.2617994F, 0F); setRotation(this.BRight, 0F, -0.2617994F, 0F);
RTop = new ModelRenderer(this, 24, 0); this.RTop = new ModelRenderer(this, 24, 0);
RTop.addBox(0F, 0F, 0F, 3, 2, 10); this.RTop.addBox(0F, 0F, 0F, 3, 2, 10);
RTop.setRotationPoint(4F, -6F, -6F); this.RTop.setRotationPoint(4F, -6F, -6F);
RTop.setTextureSize(64, 64); this.RTop.setTextureSize(64, 64);
RTop.mirror = true; this.RTop.mirror = true;
setRotation(RTop, 0F, 0F, 0F); setRotation(this.RTop, 0F, 0F, 0F);
RBottom = new ModelRenderer(this, 24, 12); this.RBottom = new ModelRenderer(this, 24, 12);
RBottom.addBox(0F, 0F, 0F, 3, 2, 10); this.RBottom.addBox(0F, 0F, 0F, 3, 2, 10);
RBottom.setRotationPoint(4F, 4F, -4F); this.RBottom.setRotationPoint(4F, 4F, -4F);
RBottom.setTextureSize(64, 64); this.RBottom.setTextureSize(64, 64);
RBottom.mirror = true; this.RBottom.mirror = true;
setRotation(RBottom, 0F, 0F, 0F); setRotation(this.RBottom, 0F, 0F, 0F);
RLeft = new ModelRenderer(this, 0, 46); this.RLeft = new ModelRenderer(this, 0, 46);
RLeft.addBox(0F, 0F, 0F, 3, 10, 2); this.RLeft.addBox(0F, 0F, 0F, 3, 10, 2);
RLeft.setRotationPoint(4F, -4F, -6F); this.RLeft.setRotationPoint(4F, -4F, -6F);
RLeft.setTextureSize(64, 64); this.RLeft.setTextureSize(64, 64);
RLeft.mirror = true; this.RLeft.mirror = true;
setRotation(RLeft, 0F, 0F, 0F); setRotation(this.RLeft, 0F, 0F, 0F);
RRight = new ModelRenderer(this, 10, 46); this.RRight = new ModelRenderer(this, 10, 46);
RRight.addBox(0F, 0F, 0F, 3, 10, 2); this.RRight.addBox(0F, 0F, 0F, 3, 10, 2);
RRight.setRotationPoint(4F, -6F, 4F); this.RRight.setRotationPoint(4F, -6F, 4F);
RRight.setTextureSize(64, 64); this.RRight.setTextureSize(64, 64);
RRight.mirror = true; this.RRight.mirror = true;
setRotation(RRight, 0F, 0F, 0F); setRotation(this.RRight, 0F, 0F, 0F);
GPivot = new ModelRenderer(this, 24, 24); this.GPivot = new ModelRenderer(this, 24, 24);
GPivot.addBox(0F, 0F, 0F, 3, 4, 4); this.GPivot.addBox(0F, 0F, 0F, 3, 4, 4);
GPivot.setRotationPoint(-6F, -2F, -2F); this.GPivot.setRotationPoint(-6F, -2F, -2F);
GPivot.setTextureSize(64, 64); this.GPivot.setTextureSize(64, 64);
GPivot.mirror = true; this.GPivot.mirror = true;
setRotation(GPivot, 0F, 0F, 0F); setRotation(this.GPivot, 0F, 0F, 0F);
GBase = new ModelRenderer(this, 24, 32); this.GBase = new ModelRenderer(this, 24, 32);
GBase.addBox(-2F, -3F, -4F, 4, 3, 8); this.GBase.addBox(-2F, -3F, -4F, 4, 3, 8);
GBase.setRotationPoint(-6F, 0F, 1F); this.GBase.setRotationPoint(-6F, 0F, 1F);
GBase.setTextureSize(64, 64); this.GBase.setTextureSize(64, 64);
GBase.mirror = true; this.GBase.mirror = true;
setRotation(GBase, 0F, 0F, 1.047198F); setRotation(this.GBase, 0F, 0F, 1.047198F);
F31 = new ModelRenderer(this, 20, 52); this.F31 = new ModelRenderer(this, 20, 52);
F31.addBox(-3F, -1F, 0F, 3, 2, 2); this.F31.addBox(-3F, -1F, 0F, 3, 2, 2);
F31.setRotationPoint(-5.5F, -2F, -1F); this.F31.setRotationPoint(-5.5F, -2F, -1F);
F31.setTextureSize(64, 64); this.F31.setTextureSize(64, 64);
F31.mirror = true; this.F31.mirror = true;
setRotation(F31, 0F, 0F, 1.48353F); setRotation(this.F31, 0F, 0F, 1.48353F);
F21 = new ModelRenderer(this, 30, 52); this.F21 = new ModelRenderer(this, 30, 52);
F21.addBox(-3F, -1F, -2F, 3, 2, 2); this.F21.addBox(-3F, -1F, -2F, 3, 2, 2);
F21.setRotationPoint(-5.5F, -2F, -1.2F); this.F21.setRotationPoint(-5.5F, -2F, -1.2F);
F21.setTextureSize(64, 64); this.F21.setTextureSize(64, 64);
F21.mirror = true; this.F21.mirror = true;
setRotation(F21, 0F, 0F, 1.48353F); setRotation(this.F21, 0F, 0F, 1.48353F);
F41 = new ModelRenderer(this, 40, 52); this.F41 = new ModelRenderer(this, 40, 52);
F41.addBox(-3F, -1F, 0F, 3, 2, 2); this.F41.addBox(-3F, -1F, 0F, 3, 2, 2);
F41.setRotationPoint(-5.5F, -2F, 1.2F); this.F41.setRotationPoint(-5.5F, -2F, 1.2F);
F41.setTextureSize(64, 64); this.F41.setTextureSize(64, 64);
F41.mirror = true; this.F41.mirror = true;
setRotation(F41, 0F, 0F, 1.48353F); setRotation(this.F41, 0F, 0F, 1.48353F);
F51 = new ModelRenderer(this, 50, 52); this.F51 = new ModelRenderer(this, 50, 52);
F51.addBox(-3F, -1F, 0F, 3, 2, 2); this.F51.addBox(-3F, -1F, 0F, 3, 2, 2);
F51.setRotationPoint(-5.5F, -2F, 3.4F); this.F51.setRotationPoint(-5.5F, -2F, 3.4F);
F51.setTextureSize(64, 64); this.F51.setTextureSize(64, 64);
F51.mirror = true; this.F51.mirror = true;
setRotation(F51, 0F, 0F, 1.48353F); setRotation(this.F51, 0F, 0F, 1.48353F);
F11 = new ModelRenderer(this, 48, 38); this.F11 = new ModelRenderer(this, 48, 38);
F11.addBox(0F, -1F, -3F, 2, 2, 3); this.F11.addBox(0F, -1F, -3F, 2, 2, 3);
F11.setRotationPoint(-5.5F, -2F, -3F); this.F11.setRotationPoint(-5.5F, -2F, -3F);
F11.setTextureSize(64, 64); this.F11.setTextureSize(64, 64);
F11.mirror = true; this.F11.mirror = true;
setRotation(F11, 0F, 0F, 1.047198F); setRotation(this.F11, 0F, 0F, 1.047198F);
F22 = new ModelRenderer(this, 20, 56); this.F22 = new ModelRenderer(this, 20, 56);
F22.addBox(-3F, -1F, -1F, 3, 2, 2); this.F22.addBox(-3F, -1F, -1F, 3, 2, 2);
F22.setRotationPoint(-5.6F, -4.5F, -2.2F); this.F22.setRotationPoint(-5.6F, -4.5F, -2.2F);
F22.setTextureSize(64, 64); this.F22.setTextureSize(64, 64);
F22.mirror = true; this.F22.mirror = true;
setRotation(F22, 0F, 0F, 1.134464F); setRotation(this.F22, 0F, 0F, 1.134464F);
F32 = new ModelRenderer(this, 30, 56); this.F32 = new ModelRenderer(this, 30, 56);
F32.addBox(-3F, -1F, -1F, 3, 2, 2); this.F32.addBox(-3F, -1F, -1F, 3, 2, 2);
F32.setRotationPoint(-5.6F, -4.5F, 0F); this.F32.setRotationPoint(-5.6F, -4.5F, 0F);
F32.setTextureSize(64, 64); this.F32.setTextureSize(64, 64);
F32.mirror = true; this.F32.mirror = true;
setRotation(F32, 0F, 0F, 1.134464F); setRotation(this.F32, 0F, 0F, 1.134464F);
F42 = new ModelRenderer(this, 40, 56); this.F42 = new ModelRenderer(this, 40, 56);
F42.addBox(-3F, -1F, -1F, 3, 2, 2); this.F42.addBox(-3F, -1F, -1F, 3, 2, 2);
F42.setRotationPoint(-5.6F, -4.5F, 2.2F); this.F42.setRotationPoint(-5.6F, -4.5F, 2.2F);
F42.setTextureSize(64, 64); this.F42.setTextureSize(64, 64);
F42.mirror = true; this.F42.mirror = true;
setRotation(F42, 0F, 0F, 1.134464F); setRotation(this.F42, 0F, 0F, 1.134464F);
F52 = new ModelRenderer(this, 50, 56); this.F52 = new ModelRenderer(this, 50, 56);
F52.addBox(-3F, -1F, -1F, 3, 2, 2); this.F52.addBox(-3F, -1F, -1F, 3, 2, 2);
F52.setRotationPoint(-5.6F, -4.5F, 4.4F); this.F52.setRotationPoint(-5.6F, -4.5F, 4.4F);
F52.setTextureSize(64, 64); this.F52.setTextureSize(64, 64);
F52.mirror = true; this.F52.mirror = true;
setRotation(F52, 0F, 0F, 1.134464F); setRotation(this.F52, 0F, 0F, 1.134464F);
F12 = new ModelRenderer(this, 48, 34); this.F12 = new ModelRenderer(this, 48, 34);
F12.addBox(-1F, -1F, -2F, 2, 2, 2); this.F12.addBox(-1F, -1F, -2F, 2, 2, 2);
F12.setRotationPoint(-5F, -1F, -5.8F); this.F12.setRotationPoint(-5F, -1F, -5.8F);
F12.setTextureSize(64, 64); this.F12.setTextureSize(64, 64);
F12.mirror = true; this.F12.mirror = true;
setRotation(F12, 0F, 0.3490659F, 1.047198F); setRotation(this.F12, 0F, 0.3490659F, 1.047198F);
F23 = new ModelRenderer(this, 20, 60); this.F23 = new ModelRenderer(this, 20, 60);
F23.addBox(-3F, -1F, -1F, 3, 2, 2); this.F23.addBox(-3F, -1F, -1F, 3, 2, 2);
F23.setRotationPoint(-6.6F, -6.8F, -2.2F); this.F23.setRotationPoint(-6.6F, -6.8F, -2.2F);
F23.setTextureSize(64, 64); this.F23.setTextureSize(64, 64);
F23.mirror = true; this.F23.mirror = true;
setRotation(F23, 0F, 0F, 0.5235988F); setRotation(this.F23, 0F, 0F, 0.5235988F);
F33 = new ModelRenderer(this, 30, 60); this.F33 = new ModelRenderer(this, 30, 60);
F33.addBox(-3F, -1F, -1F, 3, 2, 2); this.F33.addBox(-3F, -1F, -1F, 3, 2, 2);
F33.setRotationPoint(-6.6F, -6.8F, 0F); this.F33.setRotationPoint(-6.6F, -6.8F, 0F);
F33.setTextureSize(64, 64); this.F33.setTextureSize(64, 64);
F33.mirror = true; this.F33.mirror = true;
setRotation(F33, 0F, 0F, 0.5235988F); setRotation(this.F33, 0F, 0F, 0.5235988F);
F43 = new ModelRenderer(this, 40, 60); this.F43 = new ModelRenderer(this, 40, 60);
F43.addBox(-3F, -1F, -1F, 3, 2, 2); this.F43.addBox(-3F, -1F, -1F, 3, 2, 2);
F43.setRotationPoint(-6.6F, -6.8F, 2.2F); this.F43.setRotationPoint(-6.6F, -6.8F, 2.2F);
F43.setTextureSize(64, 64); this.F43.setTextureSize(64, 64);
F43.mirror = true; this.F43.mirror = true;
setRotation(F43, 0F, 0F, 0.5235988F); setRotation(this.F43, 0F, 0F, 0.5235988F);
F53 = new ModelRenderer(this, 50, 60); this.F53 = new ModelRenderer(this, 50, 60);
F53.addBox(-3F, -1F, -1F, 3, 2, 2); this.F53.addBox(-3F, -1F, -1F, 3, 2, 2);
F53.setRotationPoint(-6.6F, -6.8F, 4.4F); this.F53.setRotationPoint(-6.6F, -6.8F, 4.4F);
F53.setTextureSize(64, 64); this.F53.setTextureSize(64, 64);
F53.mirror = true; this.F53.mirror = true;
setRotation(F53, 0F, 0F, 0.5235988F); setRotation(this.F53, 0F, 0F, 0.5235988F);
F13 = new ModelRenderer(this, 48, 30); this.F13 = new ModelRenderer(this, 48, 30);
F13.addBox(-1F, -1F, -2F, 2, 2, 2); this.F13.addBox(-1F, -1F, -2F, 2, 2, 2);
F13.setRotationPoint(-5.5F, -1F, -7.2F); this.F13.setRotationPoint(-5.5F, -1F, -7.2F);
F13.setTextureSize(64, 64); this.F13.setTextureSize(64, 64);
F13.mirror = true; this.F13.mirror = true;
setRotation(F13, 0F, 1.047198F, 1.047198F); setRotation(this.F13, 0F, 1.047198F, 1.047198F);
WireL = new ModelRenderer(this, 38, 30); this.WireL = new ModelRenderer(this, 38, 30);
WireL.addBox(0F, 0F, 0F, 4, 1, 1); this.WireL.addBox(0F, 0F, 0F, 4, 1, 1);
WireL.setRotationPoint(0F, -5.5F, 0F); this.WireL.setRotationPoint(0F, -5.5F, 0F);
WireL.setTextureSize(64, 64); this.WireL.setTextureSize(64, 64);
WireL.mirror = true; this.WireL.mirror = true;
setRotation(WireL, 0F, 0F, 0F); setRotation(this.WireL, 0F, 0F, 0F);
WireR = new ModelRenderer(this, 38, 28); this.WireR = new ModelRenderer(this, 38, 28);
WireR.addBox(0F, 0F, 0F, 4, 1, 1); this.WireR.addBox(0F, 0F, 0F, 4, 1, 1);
WireR.setRotationPoint(0F, -5.5F, 2F); this.WireR.setRotationPoint(0F, -5.5F, 2F);
WireR.setTextureSize(64, 64); this.WireR.setTextureSize(64, 64);
WireR.mirror = true; this.WireR.mirror = true;
setRotation(WireR, 0F, 0F, 0F); setRotation(this.WireR, 0F, 0F, 0F);
Gauge1 = new ModelRenderer(this, 20, 47); this.Gauge1 = new ModelRenderer(this, 20, 47);
Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4); this.Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4);
Gauge1.setRotationPoint(-1F, -4F, 4F); this.Gauge1.setRotationPoint(-1F, -4F, 4F);
Gauge1.setTextureSize(64, 64); this.Gauge1.setTextureSize(64, 64);
Gauge1.mirror = true; this.Gauge1.mirror = true;
setRotation(Gauge1, -0.7853982F, 0F, 0F); setRotation(this.Gauge1, -0.7853982F, 0F, 0F);
Gauge2 = new ModelRenderer(this, 34, 48); this.Gauge2 = new ModelRenderer(this, 34, 48);
Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3); this.Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3);
Gauge2.setRotationPoint(-1F, -4F, 4F); this.Gauge2.setRotationPoint(-1F, -4F, 4F);
Gauge2.setTextureSize(64, 64); this.Gauge2.setTextureSize(64, 64);
Gauge2.mirror = true; this.Gauge2.mirror = true;
setRotation(Gauge2, -0.7853982F, 0F, 0F); setRotation(this.Gauge2, -0.7853982F, 0F, 0F);
WireB = new ModelRenderer(this, 48, 49); this.WireB = new ModelRenderer(this, 48, 49);
WireB.addBox(0F, 0F, 0F, 4, 2, 1); this.WireB.addBox(0F, 0F, 0F, 4, 2, 1);
WireB.setRotationPoint(0F, -1F, -5.5F); this.WireB.setRotationPoint(0F, -1F, -5.5F);
WireB.setTextureSize(64, 64); this.WireB.setTextureSize(64, 64);
WireB.mirror = true; this.WireB.mirror = true;
setRotation(WireB, 0F, 0F, 0F); setRotation(this.WireB, 0F, 0F, 0F);
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.Base.render(scaleFactor);
Base.render(f5); this.BTop.render(scaleFactor);
BTop.render(f5); this.BBottom.render(scaleFactor);
BBottom.render(f5); this.BLeft.render(scaleFactor);
BLeft.render(f5); this.BRight.render(scaleFactor);
BRight.render(f5); this.RTop.render(scaleFactor);
RTop.render(f5); this.RBottom.render(scaleFactor);
RBottom.render(f5); this.RLeft.render(scaleFactor);
RLeft.render(f5); this.RRight.render(scaleFactor);
RRight.render(f5); this.GPivot.render(scaleFactor);
GPivot.render(f5); this.GBase.render(scaleFactor);
GBase.render(f5); this.F31.render(scaleFactor);
F31.render(f5); this.F21.render(scaleFactor);
F21.render(f5); this.F41.render(scaleFactor);
F41.render(f5); this.F51.render(scaleFactor);
F51.render(f5); this.F11.render(scaleFactor);
F11.render(f5); this.F22.render(scaleFactor);
F22.render(f5); this.F32.render(scaleFactor);
F32.render(f5); this.F42.render(scaleFactor);
F42.render(f5); this.F52.render(scaleFactor);
F52.render(f5); this.F12.render(scaleFactor);
F12.render(f5); this.F23.render(scaleFactor);
F23.render(f5); this.F33.render(scaleFactor);
F33.render(f5); this.F43.render(scaleFactor);
F43.render(f5); this.F53.render(scaleFactor);
F53.render(f5); this.F13.render(scaleFactor);
F13.render(f5); this.WireL.render(scaleFactor);
WireL.render(f5); this.WireR.render(scaleFactor);
WireR.render(f5); this.Gauge1.render(scaleFactor);
Gauge1.render(f5); this.Gauge2.render(scaleFactor);
Gauge2.render(f5); this.WireB.render(scaleFactor);
WireB.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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
} }

View File

@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelMultitoolPointer extends ModelBase { public class ModelMultitoolPointer extends ModelBase {
// fields
ModelRenderer Base; ModelRenderer Base;
ModelRenderer BTop; ModelRenderer BTop;
ModelRenderer BBottom; ModelRenderer BBottom;
@ -45,243 +45,237 @@ public class ModelMultitoolPointer extends ModelBase {
ModelRenderer WireB; ModelRenderer WireB;
public ModelMultitoolPointer() { public ModelMultitoolPointer() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 64; this.textureHeight = 64;
Base = new ModelRenderer(this, 0, 0); this.Base = new ModelRenderer(this, 0, 0);
Base.addBox(0F, 0F, 0F, 3, 8, 8); this.Base.addBox(0F, 0F, 0F, 3, 8, 8);
Base.setRotationPoint(-3F, -4F, -4F); this.Base.setRotationPoint(-3F, -4F, -4F);
Base.setTextureSize(64, 64); this.Base.setTextureSize(64, 64);
Base.mirror = true; this.Base.mirror = true;
setRotation(Base, 0F, 0F, 0F); setRotation(this.Base, 0F, 0F, 0F);
BTop = new ModelRenderer(this, 0, 16); this.BTop = new ModelRenderer(this, 0, 16);
BTop.addBox(0F, 0F, 0F, 4, 2, 8); this.BTop.addBox(0F, 0F, 0F, 4, 2, 8);
BTop.setRotationPoint(-3F, -4F, -4F); this.BTop.setRotationPoint(-3F, -4F, -4F);
BTop.setTextureSize(64, 64); this.BTop.setTextureSize(64, 64);
BTop.mirror = true; this.BTop.mirror = true;
setRotation(BTop, 0F, 0F, -0.2617994F); setRotation(this.BTop, 0F, 0F, -0.2617994F);
BBottom = new ModelRenderer(this, 0, 26); this.BBottom = new ModelRenderer(this, 0, 26);
BBottom.addBox(0F, -2F, 0F, 4, 2, 8); this.BBottom.addBox(0F, -2F, 0F, 4, 2, 8);
BBottom.setRotationPoint(-3F, 4F, -4F); this.BBottom.setRotationPoint(-3F, 4F, -4F);
BBottom.setTextureSize(64, 64); this.BBottom.setTextureSize(64, 64);
BBottom.mirror = true; this.BBottom.mirror = true;
setRotation(BBottom, 0F, 0F, 0.2617994F); setRotation(this.BBottom, 0F, 0F, 0.2617994F);
BLeft = new ModelRenderer(this, 0, 36); this.BLeft = new ModelRenderer(this, 0, 36);
BLeft.addBox(0F, 0F, 0F, 4, 8, 2); this.BLeft.addBox(0F, 0F, 0F, 4, 8, 2);
BLeft.setRotationPoint(-3F, -4F, -4F); this.BLeft.setRotationPoint(-3F, -4F, -4F);
BLeft.setTextureSize(64, 64); this.BLeft.setTextureSize(64, 64);
BLeft.mirror = true; this.BLeft.mirror = true;
setRotation(BLeft, 0F, 0.2617994F, 0F); setRotation(this.BLeft, 0F, 0.2617994F, 0F);
BRight = new ModelRenderer(this, 12, 36); this.BRight = new ModelRenderer(this, 12, 36);
BRight.addBox(0F, 0F, -2F, 4, 8, 2); this.BRight.addBox(0F, 0F, -2F, 4, 8, 2);
BRight.setRotationPoint(-3F, -4F, 4F); this.BRight.setRotationPoint(-3F, -4F, 4F);
BRight.setTextureSize(64, 64); this.BRight.setTextureSize(64, 64);
BRight.mirror = true; this.BRight.mirror = true;
setRotation(BRight, 0F, -0.2617994F, 0F); setRotation(this.BRight, 0F, -0.2617994F, 0F);
RTop = new ModelRenderer(this, 24, 0); this.RTop = new ModelRenderer(this, 24, 0);
RTop.addBox(0F, 0F, 0F, 3, 2, 10); this.RTop.addBox(0F, 0F, 0F, 3, 2, 10);
RTop.setRotationPoint(4F, -6F, -6F); this.RTop.setRotationPoint(4F, -6F, -6F);
RTop.setTextureSize(64, 64); this.RTop.setTextureSize(64, 64);
RTop.mirror = true; this.RTop.mirror = true;
setRotation(RTop, 0F, 0F, 0F); setRotation(this.RTop, 0F, 0F, 0F);
RBottom = new ModelRenderer(this, 24, 12); this.RBottom = new ModelRenderer(this, 24, 12);
RBottom.addBox(0F, 0F, 0F, 3, 2, 10); this.RBottom.addBox(0F, 0F, 0F, 3, 2, 10);
RBottom.setRotationPoint(4F, 4F, -4F); this.RBottom.setRotationPoint(4F, 4F, -4F);
RBottom.setTextureSize(64, 64); this.RBottom.setTextureSize(64, 64);
RBottom.mirror = true; this.RBottom.mirror = true;
setRotation(RBottom, 0F, 0F, 0F); setRotation(this.RBottom, 0F, 0F, 0F);
RLeft = new ModelRenderer(this, 0, 46); this.RLeft = new ModelRenderer(this, 0, 46);
RLeft.addBox(0F, 0F, 0F, 3, 10, 2); this.RLeft.addBox(0F, 0F, 0F, 3, 10, 2);
RLeft.setRotationPoint(4F, -4F, -6F); this.RLeft.setRotationPoint(4F, -4F, -6F);
RLeft.setTextureSize(64, 64); this.RLeft.setTextureSize(64, 64);
RLeft.mirror = true; this.RLeft.mirror = true;
setRotation(RLeft, 0F, 0F, 0F); setRotation(this.RLeft, 0F, 0F, 0F);
RRight = new ModelRenderer(this, 10, 46); this.RRight = new ModelRenderer(this, 10, 46);
RRight.addBox(0F, 0F, 0F, 3, 10, 2); this.RRight.addBox(0F, 0F, 0F, 3, 10, 2);
RRight.setRotationPoint(4F, -6F, 4F); this.RRight.setRotationPoint(4F, -6F, 4F);
RRight.setTextureSize(64, 64); this.RRight.setTextureSize(64, 64);
RRight.mirror = true; this.RRight.mirror = true;
setRotation(RRight, 0F, 0F, 0F); setRotation(this.RRight, 0F, 0F, 0F);
GPivot = new ModelRenderer(this, 24, 24); this.GPivot = new ModelRenderer(this, 24, 24);
GPivot.addBox(0F, 0F, 0F, 3, 4, 4); this.GPivot.addBox(0F, 0F, 0F, 3, 4, 4);
GPivot.setRotationPoint(-6F, -2F, -2F); this.GPivot.setRotationPoint(-6F, -2F, -2F);
GPivot.setTextureSize(64, 64); this.GPivot.setTextureSize(64, 64);
GPivot.mirror = true; this.GPivot.mirror = true;
setRotation(GPivot, 0F, 0F, 0F); setRotation(this.GPivot, 0F, 0F, 0F);
GBase = new ModelRenderer(this, 24, 32); this.GBase = new ModelRenderer(this, 24, 32);
GBase.addBox(-2F, -3F, -4F, 4, 3, 8); this.GBase.addBox(-2F, -3F, -4F, 4, 3, 8);
GBase.setRotationPoint(-6F, 0F, 1F); this.GBase.setRotationPoint(-6F, 0F, 1F);
GBase.setTextureSize(64, 64); this.GBase.setTextureSize(64, 64);
GBase.mirror = true; this.GBase.mirror = true;
setRotation(GBase, 0F, 0F, 0.6108652F); setRotation(this.GBase, 0F, 0F, 0.6108652F);
F31 = new ModelRenderer(this, 20, 52); this.F31 = new ModelRenderer(this, 20, 52);
F31.addBox(-3F, -1F, 0F, 3, 2, 2); this.F31.addBox(-3F, -1F, 0F, 3, 2, 2);
F31.setRotationPoint(-6F, -2.8F, -1F); this.F31.setRotationPoint(-6F, -2.8F, -1F);
F31.setTextureSize(64, 64); this.F31.setTextureSize(64, 64);
F31.mirror = true; this.F31.mirror = true;
setRotation(F31, 0F, 0F, -0.5235988F); setRotation(this.F31, 0F, 0F, -0.5235988F);
F21 = new ModelRenderer(this, 30, 52); this.F21 = new ModelRenderer(this, 30, 52);
F21.addBox(-3F, -1F, -2F, 3, 2, 2); this.F21.addBox(-3F, -1F, -2F, 3, 2, 2);
F21.setRotationPoint(-6F, -2.8F, -1.2F); this.F21.setRotationPoint(-6F, -2.8F, -1.2F);
F21.setTextureSize(64, 64); this.F21.setTextureSize(64, 64);
F21.mirror = true; this.F21.mirror = true;
setRotation(F21, 0F, 0F, 0F); setRotation(this.F21, 0F, 0F, 0F);
F41 = new ModelRenderer(this, 40, 52); this.F41 = new ModelRenderer(this, 40, 52);
F41.addBox(-3F, -1F, 0F, 3, 2, 2); this.F41.addBox(-3F, -1F, 0F, 3, 2, 2);
F41.setRotationPoint(-6F, -2.8F, 1.2F); this.F41.setRotationPoint(-6F, -2.8F, 1.2F);
F41.setTextureSize(64, 64); this.F41.setTextureSize(64, 64);
F41.mirror = true; this.F41.mirror = true;
setRotation(F41, 0F, 0F, -0.5235988F); setRotation(this.F41, 0F, 0F, -0.5235988F);
F51 = new ModelRenderer(this, 50, 52); this.F51 = new ModelRenderer(this, 50, 52);
F51.addBox(-3F, -1F, 0F, 3, 2, 2); this.F51.addBox(-3F, -1F, 0F, 3, 2, 2);
F51.setRotationPoint(-6F, -2.8F, 3.4F); this.F51.setRotationPoint(-6F, -2.8F, 3.4F);
F51.setTextureSize(64, 64); this.F51.setTextureSize(64, 64);
F51.mirror = true; this.F51.mirror = true;
setRotation(F51, 0F, 0F, -0.5235988F); setRotation(this.F51, 0F, 0F, -0.5235988F);
F11 = new ModelRenderer(this, 48, 38); this.F11 = new ModelRenderer(this, 48, 38);
F11.addBox(-1F, -1F, -3F, 2, 2, 3); this.F11.addBox(-1F, -1F, -3F, 2, 2, 3);
F11.setRotationPoint(-5F, -1F, -2.5F); this.F11.setRotationPoint(-5F, -1F, -2.5F);
F11.setTextureSize(64, 64); this.F11.setTextureSize(64, 64);
F11.mirror = true; this.F11.mirror = true;
setRotation(F11, 1.22173F, 1.745329F, -1.047198F); setRotation(this.F11, 1.22173F, 1.745329F, -1.047198F);
F22 = new ModelRenderer(this, 20, 56); this.F22 = new ModelRenderer(this, 20, 56);
F22.addBox(-3F, -1F, -1F, 3, 2, 2); this.F22.addBox(-3F, -1F, -1F, 3, 2, 2);
F22.setRotationPoint(-8.5F, -3F, -2.2F); this.F22.setRotationPoint(-8.5F, -3F, -2.2F);
F22.setTextureSize(64, 64); this.F22.setTextureSize(64, 64);
F22.mirror = true; this.F22.mirror = true;
setRotation(F22, 0F, 0F, 0F); setRotation(this.F22, 0F, 0F, 0F);
F32 = new ModelRenderer(this, 30, 56); this.F32 = new ModelRenderer(this, 30, 56);
F32.addBox(-3F, -1F, -1F, 3, 2, 2); this.F32.addBox(-3F, -1F, -1F, 3, 2, 2);
F32.setRotationPoint(-8.5F, -2F, 0F); this.F32.setRotationPoint(-8.5F, -2F, 0F);
F32.setTextureSize(64, 64); this.F32.setTextureSize(64, 64);
F32.mirror = true; this.F32.mirror = true;
setRotation(F32, 0F, 0F, -1.919862F); setRotation(this.F32, 0F, 0F, -1.919862F);
F42 = new ModelRenderer(this, 40, 56); this.F42 = new ModelRenderer(this, 40, 56);
F42.addBox(-3F, -1F, -1F, 3, 2, 2); this.F42.addBox(-3F, -1F, -1F, 3, 2, 2);
F42.setRotationPoint(-8.5F, -2F, 2.2F); this.F42.setRotationPoint(-8.5F, -2F, 2.2F);
F42.setTextureSize(64, 64); this.F42.setTextureSize(64, 64);
F42.mirror = true; this.F42.mirror = true;
setRotation(F42, 0F, 0F, -1.919862F); setRotation(this.F42, 0F, 0F, -1.919862F);
F52 = new ModelRenderer(this, 50, 56); this.F52 = new ModelRenderer(this, 50, 56);
F52.addBox(-3F, -1F, -1F, 3, 2, 2); this.F52.addBox(-3F, -1F, -1F, 3, 2, 2);
F52.setRotationPoint(-8.5F, -2F, 4.4F); this.F52.setRotationPoint(-8.5F, -2F, 4.4F);
F52.setTextureSize(64, 64); this.F52.setTextureSize(64, 64);
F52.mirror = true; this.F52.mirror = true;
setRotation(F52, 0F, 0F, -1.919862F); setRotation(this.F52, 0F, 0F, -1.919862F);
F12 = new ModelRenderer(this, 48, 34); this.F12 = new ModelRenderer(this, 48, 34);
F12.addBox(-1F, -1F, -2F, 2, 2, 2); this.F12.addBox(-1F, -1F, -2F, 2, 2, 2);
F12.setRotationPoint(-6F, 0.5F, -4.5F); this.F12.setRotationPoint(-6F, 0.5F, -4.5F);
F12.setTextureSize(64, 64); this.F12.setTextureSize(64, 64);
F12.mirror = true; this.F12.mirror = true;
setRotation(F12, 1.22173F, 2.935045F, -1.047198F); setRotation(this.F12, 1.22173F, 2.935045F, -1.047198F);
F23 = new ModelRenderer(this, 20, 60); this.F23 = new ModelRenderer(this, 20, 60);
F23.addBox(-3F, -1F, -1F, 3, 2, 2); this.F23.addBox(-3F, -1F, -1F, 3, 2, 2);
F23.setRotationPoint(-11F, -2.8F, -2.2F); this.F23.setRotationPoint(-11F, -2.8F, -2.2F);
F23.setTextureSize(64, 64); this.F23.setTextureSize(64, 64);
F23.mirror = true; this.F23.mirror = true;
setRotation(F23, 0F, 0F, 0F); setRotation(this.F23, 0F, 0F, 0F);
F33 = new ModelRenderer(this, 30, 60); this.F33 = new ModelRenderer(this, 30, 60);
F33.addBox(-3F, -1F, -1F, 3, 2, 2); this.F33.addBox(-3F, -1F, -1F, 3, 2, 2);
F33.setRotationPoint(-8F, 0.5F, 0F); this.F33.setRotationPoint(-8F, 0.5F, 0F);
F33.setTextureSize(64, 64); this.F33.setTextureSize(64, 64);
F33.mirror = true; this.F33.mirror = true;
setRotation(F33, 0F, 0F, -2.879793F); setRotation(this.F33, 0F, 0F, -2.879793F);
F43 = new ModelRenderer(this, 40, 60); this.F43 = new ModelRenderer(this, 40, 60);
F43.addBox(-3F, -1F, -1F, 3, 2, 2); this.F43.addBox(-3F, -1F, -1F, 3, 2, 2);
F43.setRotationPoint(-8F, 0.5F, 2.2F); this.F43.setRotationPoint(-8F, 0.5F, 2.2F);
F43.setTextureSize(64, 64); this.F43.setTextureSize(64, 64);
F43.mirror = true; this.F43.mirror = true;
setRotation(F43, 0F, 0F, -2.879793F); setRotation(this.F43, 0F, 0F, -2.879793F);
F53 = new ModelRenderer(this, 50, 60); this.F53 = new ModelRenderer(this, 50, 60);
F53.addBox(-3F, -1F, -1F, 3, 2, 2); this.F53.addBox(-3F, -1F, -1F, 3, 2, 2);
F53.setRotationPoint(-8F, 0.5F, 4.4F); this.F53.setRotationPoint(-8F, 0.5F, 4.4F);
F53.setTextureSize(64, 64); this.F53.setTextureSize(64, 64);
F53.mirror = true; this.F53.mirror = true;
setRotation(F53, 0F, 0F, -2.879793F); setRotation(this.F53, 0F, 0F, -2.879793F);
F13 = new ModelRenderer(this, 48, 30); this.F13 = new ModelRenderer(this, 48, 30);
F13.addBox(-1F, -1F, -2F, 2, 2, 2); this.F13.addBox(-1F, -1F, -2F, 2, 2, 2);
F13.setRotationPoint(-7F, 1F, -4F); this.F13.setRotationPoint(-7F, 1F, -4F);
F13.setTextureSize(64, 64); this.F13.setTextureSize(64, 64);
F13.mirror = true; this.F13.mirror = true;
setRotation(F13, 0.5235988F, 2.617994F, -1.047198F); setRotation(this.F13, 0.5235988F, 2.617994F, -1.047198F);
WireL = new ModelRenderer(this, 38, 30); this.WireL = new ModelRenderer(this, 38, 30);
WireL.addBox(0F, 0F, 0F, 4, 1, 1); this.WireL.addBox(0F, 0F, 0F, 4, 1, 1);
WireL.setRotationPoint(0F, -5.5F, 0F); this.WireL.setRotationPoint(0F, -5.5F, 0F);
WireL.setTextureSize(64, 64); this.WireL.setTextureSize(64, 64);
WireL.mirror = true; this.WireL.mirror = true;
setRotation(WireL, 0F, 0F, 0F); setRotation(this.WireL, 0F, 0F, 0F);
WireR = new ModelRenderer(this, 38, 28); this.WireR = new ModelRenderer(this, 38, 28);
WireR.addBox(0F, 0F, 0F, 4, 1, 1); this.WireR.addBox(0F, 0F, 0F, 4, 1, 1);
WireR.setRotationPoint(0F, -5.5F, 2F); this.WireR.setRotationPoint(0F, -5.5F, 2F);
WireR.setTextureSize(64, 64); this.WireR.setTextureSize(64, 64);
WireR.mirror = true; this.WireR.mirror = true;
setRotation(WireR, 0F, 0F, 0F); setRotation(this.WireR, 0F, 0F, 0F);
Gauge1 = new ModelRenderer(this, 20, 47); this.Gauge1 = new ModelRenderer(this, 20, 47);
Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4); this.Gauge1.addBox(-1.5F, -1F, -2F, 3, 1, 4);
Gauge1.setRotationPoint(-1F, -4F, 4F); this.Gauge1.setRotationPoint(-1F, -4F, 4F);
Gauge1.setTextureSize(64, 64); this.Gauge1.setTextureSize(64, 64);
Gauge1.mirror = true; this.Gauge1.mirror = true;
setRotation(Gauge1, -0.7853982F, 0F, 0F); setRotation(this.Gauge1, -0.7853982F, 0F, 0F);
Gauge2 = new ModelRenderer(this, 34, 48); this.Gauge2 = new ModelRenderer(this, 34, 48);
Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3); this.Gauge2.addBox(-2F, -1F, -1.5F, 4, 1, 3);
Gauge2.setRotationPoint(-1F, -4F, 4F); this.Gauge2.setRotationPoint(-1F, -4F, 4F);
Gauge2.setTextureSize(64, 64); this.Gauge2.setTextureSize(64, 64);
Gauge2.mirror = true; this.Gauge2.mirror = true;
setRotation(Gauge2, -0.7853982F, 0F, 0F); setRotation(this.Gauge2, -0.7853982F, 0F, 0F);
WireB = new ModelRenderer(this, 48, 49); this.WireB = new ModelRenderer(this, 48, 49);
WireB.addBox(0F, 0F, 0F, 4, 2, 1); this.WireB.addBox(0F, 0F, 0F, 4, 2, 1);
WireB.setRotationPoint(0F, -1F, -5.5F); this.WireB.setRotationPoint(0F, -1F, -5.5F);
WireB.setTextureSize(64, 64); this.WireB.setTextureSize(64, 64);
WireB.mirror = true; this.WireB.mirror = true;
setRotation(WireB, 0F, 0F, 0F); setRotation(this.WireB, 0F, 0F, 0F);
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.Base.render(scaleFactor);
Base.render(f5); this.BTop.render(scaleFactor);
BTop.render(f5); this.BBottom.render(scaleFactor);
BBottom.render(f5); this.BLeft.render(scaleFactor);
BLeft.render(f5); this.BRight.render(scaleFactor);
BRight.render(f5); this.RTop.render(scaleFactor);
RTop.render(f5); this.RBottom.render(scaleFactor);
RBottom.render(f5); this.RLeft.render(scaleFactor);
RLeft.render(f5); this.RRight.render(scaleFactor);
RRight.render(f5); this.GPivot.render(scaleFactor);
GPivot.render(f5); this.GBase.render(scaleFactor);
GBase.render(f5); this.F31.render(scaleFactor);
F31.render(f5); this.F21.render(scaleFactor);
F21.render(f5); this.F41.render(scaleFactor);
F41.render(f5); this.F51.render(scaleFactor);
F51.render(f5); this.F11.render(scaleFactor);
F11.render(f5); this.F22.render(scaleFactor);
F22.render(f5); this.F32.render(scaleFactor);
F32.render(f5); this.F42.render(scaleFactor);
F42.render(f5); this.F52.render(scaleFactor);
F52.render(f5); this.F12.render(scaleFactor);
F12.render(f5); this.F23.render(scaleFactor);
F23.render(f5); this.F33.render(scaleFactor);
F33.render(f5); this.F43.render(scaleFactor);
F43.render(f5); this.F53.render(scaleFactor);
F53.render(f5); this.F13.render(scaleFactor);
F13.render(f5); this.WireL.render(scaleFactor);
WireL.render(f5); this.WireR.render(scaleFactor);
WireR.render(f5); this.Gauge1.render(scaleFactor);
Gauge1.render(f5); this.Gauge2.render(scaleFactor);
Gauge2.render(f5); this.WireB.render(scaleFactor);
WireB.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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
} }

View File

@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.render.loader.ModelRendererObj; import com.hbm.render.loader.ModelRendererObj;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -15,49 +14,49 @@ public class ModelNo9 extends ModelArmorBase {
public ModelRendererObj lamp; public ModelRendererObj lamp;
public ModelRendererObj insig; public ModelRendererObj insig;
public ModelNo9(int type) { public ModelNo9(int type) {
super(type); super(type);
head = new ModelRendererObj(ResourceManager.armor_no9, "Helmet"); this.head = new ModelRendererObj(ResourceManager.armor_no9, "Helmet");
insig = new ModelRendererObj(ResourceManager.armor_no9, "Insignia"); this.insig = new ModelRendererObj(ResourceManager.armor_no9, "Insignia");
lamp = new ModelRendererObj(ResourceManager.armor_no9, "Flame"); this.lamp = new ModelRendererObj(ResourceManager.armor_no9, "Flame");
body = new ModelRendererObj(null); this.body = new ModelRendererObj(null);
leftArm = new ModelRendererObj(null).setRotationPoint(-5.0F, 2.0F, 0.0F); this.leftArm = new ModelRendererObj(null).setRotationPoint(-5.0F, 2.0F, 0.0F);
rightArm = new ModelRendererObj(null).setRotationPoint(5.0F, 2.0F, 0.0F); this.rightArm = new ModelRendererObj(null).setRotationPoint(5.0F, 2.0F, 0.0F);
leftLeg = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); this.leftLeg = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F);
rightLeg = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); this.rightLeg = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F);
leftFoot = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F); this.leftFoot = new ModelRendererObj(null).setRotationPoint(1.9F, 12.0F, 0.0F);
rightFoot = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F); this.rightFoot = new ModelRendererObj(null).setRotationPoint(-1.9F, 12.0F, 0.0F);
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
head.copyTo(insig); this.head.copyTo(this.insig);
head.copyTo(lamp); this.head.copyTo(this.lamp);
GL11.glPushMatrix(); GL11.glPushMatrix();
if(type == 0) { if(this.type == 0) {
GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.no9); bindTexture(ResourceManager.no9);
head.render(par7); this.head.render(scaleFactor);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.no9_insignia); bindTexture(ResourceManager.no9_insignia);
insig.render(par7); this.insig.render(scaleFactor);
if(par1Entity instanceof EntityPlayer) { if(entity instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) par1Entity; EntityPlayer player = (EntityPlayer) entity;
ItemStack helmet = player.getEquipmentInSlot(4); ItemStack helmet = player.getEquipmentInSlot(4);
if(helmet != null && helmet.hasTagCompound() && helmet.getTagCompound().getBoolean("isOn")) { if(helmet != null && helmet.hasTagCompound() && helmet.getTagCompound().getBoolean("isOn")) {
GL11.glColor3f(1F, 1F, 0.8F); GL11.glColor3f(1F, 1F, 0.8F);
GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
lamp.render(par7); this.lamp.render(scaleFactor);
GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopAttrib(); GL11.glPopAttrib();
GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_TEXTURE_2D);
@ -66,7 +65,7 @@ public class ModelNo9 extends ModelArmorBase {
} }
} }
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -19,13 +19,8 @@ public class ModelPigeon extends ModelBase {
public ModelRenderer rightWing; public ModelRenderer rightWing;
public ModelRenderer ass; public ModelRenderer ass;
public ModelRenderer feathers; public ModelRenderer feathers;
public ModelPigeon() { public ModelPigeon() {
initModel();
}
private void initModel() {
this.head = new ModelRenderer(this, 0, 0); this.head = new ModelRenderer(this, 0, 0);
this.head.addBox(-2F, -6F, -2F, 4, 6, 4); this.head.addBox(-2F, -6F, -2F, 4, 6, 4);
this.head.setRotationPoint(0F, 16F, -2F); this.head.setRotationPoint(0F, 16F, -2F);
@ -45,14 +40,14 @@ public class ModelPigeon extends ModelBase {
this.feathers = new ModelRenderer(this, 16, 24); this.feathers = new ModelRenderer(this, 16, 24);
this.feathers.addBox(-1F, -0.5F, -2F, 2, 1, 4); this.feathers.addBox(-1F, -0.5F, -2F, 2, 1, 4);
this.feathers.setRotationPoint(0F, 21.5F, 7.5F); this.feathers.setRotationPoint(0F, 21.5F, 7.5F);
this.leftLeg = new ModelRenderer(this, 20, 0); this.leftLeg = new ModelRenderer(this, 20, 0);
this.leftLeg.addBox(-1F, 0F, 0F, 2, 4, 2); this.leftLeg.addBox(-1F, 0F, 0F, 2, 4, 2);
this.leftLeg.setRotationPoint(1F, 20F, -1F); this.leftLeg.setRotationPoint(1F, 20F, -1F);
this.rightLeg = new ModelRenderer(this, 20, 0); this.rightLeg = new ModelRenderer(this, 20, 0);
this.rightLeg.addBox(-1F, 0F, 0F, 2, 4, 2); this.rightLeg.addBox(-1F, 0F, 0F, 2, 4, 2);
this.rightLeg.setRotationPoint(-1F, 20F, -1F); this.rightLeg.setRotationPoint(-1F, 20F, -1F);
this.leftWing = new ModelRenderer(this, 28, 0); this.leftWing = new ModelRenderer(this, 28, 0);
this.leftWing.addBox(0F, 0F, -3F, 1, 4, 6); this.leftWing.addBox(0F, 0F, -3F, 1, 4, 6);
this.leftWing.setRotationPoint(3F, -2F, 0F); this.leftWing.setRotationPoint(3F, -2F, 0F);
@ -66,31 +61,18 @@ public class ModelPigeon extends ModelBase {
this.bodyFat.addChild(this.rightWing); this.bodyFat.addChild(this.rightWing);
} }
public void render(Entity entity, float f0, float f1, float f2, float f3, float f4, float scale) { @Override
this.setRotationAngles(f0, f1, f2, f3, f4, scale, entity); public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity 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) {
this.head.rotateAngleX = this.beak.rotateAngleX = headPitch / (180F / (float) Math.PI); 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.body.rotateAngleX = this.bodyFat.rotateAngleX = this.ass.rotateAngleX = -((float) Math.PI / 4F);
this.feathers.rotateAngleX = -((float) Math.PI / 8F); this.feathers.rotateAngleX = -((float) Math.PI / 8F);
this.rightLeg.rotateAngleX = MathHelper.cos(walkLoop * 0.6662F) * 1.4F * legAmplitude; this.rightLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount;
this.leftLeg.rotateAngleX = MathHelper.cos(walkLoop * 0.6662F + (float) Math.PI) * 1.4F * legAmplitude; this.leftLeg.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float) Math.PI) * 1.4F * limbSwingAmount;
this.rightWing.rotateAngleZ = armSwing; this.rightWing.rotateAngleZ = ageInTicks;
this.leftWing.rotateAngleZ = -armSwing; this.leftWing.rotateAngleZ = -ageInTicks;
if(((EntityPigeon) entity).isFat()) { if(((EntityPigeon) entity).isFat()) {
this.head.rotationPointZ = -4F; this.head.rotationPointZ = -4F;
this.beak.rotationPointZ = -4F; this.beak.rotationPointZ = -4F;
@ -107,4 +89,21 @@ public class ModelPigeon extends ModelBase {
this.rightWing.rotationPointX = -3F; 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);
}
} }

View File

@ -4,104 +4,81 @@
// Keep in mind that you still need to fill in some blanks // Keep in mind that you still need to fill in some blanks
// - ZeuX // - ZeuX
package com.hbm.render.model; package com.hbm.render.model;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelPoleTop extends ModelBase 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);
}
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;
}
} }

View File

@ -13,62 +13,51 @@ import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelPylon extends ModelBase public class ModelPylon extends ModelBase {
{
int textureX = 64;
int textureY = 128;
public ModelRenderer pylonModel[]; public ModelRenderer[] pylonModel;
public ModelPylon() public ModelPylon() {
{ this.textureWidth = 64;
textureWidth = 64; this.textureHeight = 128;
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
pylonModel[0].addBox(0F, 0F, 0F, 16, 16, 16, 0F); // Box 0 this.pylonModel = new ModelRenderer[4];
pylonModel[0].setRotationPoint(-8F, -6F, -8F); 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 this.pylonModel[0].addBox(0F, 0F, 0F, 16, 16, 16, 0F); // Box 0
pylonModel[1].setRotationPoint(-2F, -79F, -2F); this.pylonModel[0].setRotationPoint(-8F, -6F, -8F);
pylonModel[2].addBox(0F, 0F, 0F, 6, 4, 6, 0F); // Box 2 this.pylonModel[1].addBox(0F, 0F, 0F, 4, 73, 4, 0F); // Box 1
pylonModel[2].setRotationPoint(-3F, -74F, -3F); this.pylonModel[1].setRotationPoint(-2F, -79F, -2F);
pylonModel[3].addBox(0F, 0F, 0F, 6, 2, 6, 0F); // Box 3 this.pylonModel[2].addBox(0F, 0F, 0F, 6, 4, 6, 0F); // Box 2
pylonModel[3].setRotationPoint(-3F, -78F, -3F); 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++) { for (ModelRenderer modelRenderer : this.pylonModel) {
pylonModel[i].setTextureSize(textureX, textureY); modelRenderer.setTextureSize(this.textureWidth, this.textureHeight);
pylonModel[i].mirror = true; modelRenderer.mirror = true;
} }
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float 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++) for(int i = 0; i < 4; i++) {
{ this.pylonModel[i].render(scaleFactor);
pylonModel[i].render(f5);
} }
} }
public void renderAll(float f5) public void renderAll(float scaleFactor) {
{
for(int i = 0; i < 4; i++) for(int i = 0; i < 4; i++) {
{ this.pylonModel[i].render(scaleFactor);
pylonModel[i].render(f5);
} }
} }
}
@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);
}
}

View File

@ -5,57 +5,55 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelRadio extends ModelBase { public class ModelRadio extends ModelBase {
// fields
ModelRenderer Box; ModelRenderer Box;
ModelRenderer Plate; ModelRenderer Plate;
ModelRenderer Lever; ModelRenderer Lever;
public ModelRadio() { public ModelRadio() {
textureWidth = 32; this.textureWidth = 32;
textureHeight = 32; this.textureHeight = 32;
Box = new ModelRenderer(this, 0, 0); this.Box = new ModelRenderer(this, 0, 0);
Box.addBox(0F, 0F, 0F, 8, 14, 4); this.Box.addBox(0F, 0F, 0F, 8, 14, 4);
Box.setRotationPoint(-4F, 9F, -12F); this.Box.setRotationPoint(-4F, 9F, -12F);
Box.setTextureSize(32, 32); this.Box.setTextureSize(32, 32);
Box.mirror = true; this.Box.mirror = true;
setRotation(Box, 0F, 0F, 0F); setRotation(this.Box, 0F, 0F, 0F);
Plate = new ModelRenderer(this, 0, 18); this.Plate = new ModelRenderer(this, 0, 18);
Plate.addBox(0F, 0F, 0F, 7, 13, 1); this.Plate.addBox(0F, 0F, 0F, 7, 13, 1);
Plate.setRotationPoint(-3.5F, 9.5F, -12.5F); this.Plate.setRotationPoint(-3.5F, 9.5F, -12.5F);
Plate.setTextureSize(32, 32); this.Plate.setTextureSize(32, 32);
Plate.mirror = true; this.Plate.mirror = true;
setRotation(Plate, 0F, 0F, 0F); setRotation(this.Plate, 0F, 0F, 0F);
Lever = new ModelRenderer(this, 16, 18); this.Lever = new ModelRenderer(this, 16, 18);
Lever.addBox(0F, -1F, -1F, 2, 8, 2); this.Lever.addBox(0F, -1F, -1F, 2, 8, 2);
Lever.setRotationPoint(4F, 16F, -10F); this.Lever.setRotationPoint(4F, 16F, -10F);
Lever.setTextureSize(32, 32); this.Lever.setTextureSize(32, 32);
Lever.mirror = true; this.Lever.mirror = true;
setRotation(Lever, 0F, 0F, 0F); setRotation(this.Lever, 0F, 0F, 0F);
} }
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { @Override
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) {
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
Box.render(f5); this.Box.render(scaleFactor);
Plate.render(f5); this.Plate.render(scaleFactor);
Lever.render(f5); this.Lever.render(scaleFactor);
} }
public void renderModel(float f5, int deg) { public void renderModel(float scaleFactor, int rotation) {
Box.render(f5);
Plate.render(f5); this.Box.render(scaleFactor);
Lever.rotateAngleX = -(float)(deg / 180F * Math.PI); this.Plate.render(scaleFactor);
Lever.render(f5); 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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
} }

View File

@ -4,11 +4,6 @@
// Keep in mind that you still need to fill in some blanks // Keep in mind that you still need to fill in some blanks
// - ZeuX // - ZeuX
package com.hbm.render.model; package com.hbm.render.model;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
@ -17,9 +12,8 @@ import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelRevolver extends ModelBase public class ModelRevolver extends ModelBase {
{
//fields
ModelRenderer Shape1; ModelRenderer Shape1;
ModelRenderer Shape2; ModelRenderer Shape2;
ModelRenderer Shape3; ModelRenderer Shape3;
@ -32,118 +26,108 @@ public class ModelRevolver extends ModelBase
ModelRenderer Shape10; ModelRenderer Shape10;
ModelRenderer Shape11; ModelRenderer Shape11;
ModelRenderer Shape12; 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;
}
} }

View File

@ -4,67 +4,50 @@
// Keep in mind that you still need to fill in some blanks // Keep in mind that you still need to fill in some blanks
// - ZeuX // - ZeuX
package com.hbm.render.model; package com.hbm.render.model;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelRotationTester extends ModelBase 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);
}
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;
}
} }

View File

@ -11,7 +11,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelRubble extends ModelBase { public class ModelRubble extends ModelBase {
// fields
ModelRenderer Shape1; ModelRenderer Shape1;
ModelRenderer Shape2; ModelRenderer Shape2;
ModelRenderer Shape3; ModelRenderer Shape3;
@ -24,109 +24,95 @@ public class ModelRubble extends ModelBase {
ModelRenderer Shape10; ModelRenderer Shape10;
public ModelRubble() { public ModelRubble() {
textureWidth = 16; this.textureWidth = 16;
textureHeight = 16; this.textureHeight = 16;
Shape1 = new ModelRenderer(this, 0, 0); this.Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 14, 6, 6); this.Shape1.addBox(0F, 0F, 0F, 14, 6, 6);
Shape1.setRotationPoint(-7F, 1F, 2F); this.Shape1.setRotationPoint(-7F, 1F, 2F);
Shape1.setTextureSize(64, 32); this.Shape1.setTextureSize(64, 32);
Shape1.mirror = true; this.Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F); setRotation(this.Shape1, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 0, 0); this.Shape2 = new ModelRenderer(this, 0, 0);
Shape2.addBox(0F, 0F, 0F, 6, 13, 5); this.Shape2.addBox(0F, 0F, 0F, 6, 13, 5);
Shape2.setRotationPoint(-7F, -6F, -5F); this.Shape2.setRotationPoint(-7F, -6F, -5F);
Shape2.setTextureSize(64, 32); this.Shape2.setTextureSize(64, 32);
Shape2.mirror = true; this.Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F); setRotation(this.Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 0, 0); this.Shape3 = new ModelRenderer(this, 0, 0);
Shape3.addBox(0F, 0F, 0F, 6, 6, 6); this.Shape3.addBox(0F, 0F, 0F, 6, 6, 6);
Shape3.setRotationPoint(1F, 1F, -5F); this.Shape3.setRotationPoint(1F, 1F, -5F);
Shape3.setTextureSize(64, 32); this.Shape3.setTextureSize(64, 32);
Shape3.mirror = true; this.Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F); setRotation(this.Shape3, 0F, 0F, 0F);
Shape4 = new ModelRenderer(this, 0, 0); this.Shape4 = new ModelRenderer(this, 0, 0);
Shape4.addBox(0F, 0F, 0F, 14, 7, 4); this.Shape4.addBox(0F, 0F, 0F, 14, 7, 4);
Shape4.setRotationPoint(-7F, -7F, 2F); this.Shape4.setRotationPoint(-7F, -7F, 2F);
Shape4.setTextureSize(64, 32); this.Shape4.setTextureSize(64, 32);
Shape4.mirror = true; this.Shape4.mirror = true;
setRotation(Shape4, 0F, 0.4363323F, 0F); setRotation(this.Shape4, 0F, 0.4363323F, 0F);
Shape5 = new ModelRenderer(this, 0, 0); this.Shape5 = new ModelRenderer(this, 0, 0);
Shape5.addBox(0F, 0F, 0F, 6, 6, 11); this.Shape5.addBox(0F, 0F, 0F, 6, 6, 11);
Shape5.setRotationPoint(0F, -6F, -5F); this.Shape5.setRotationPoint(0F, -6F, -5F);
Shape5.setTextureSize(64, 32); this.Shape5.setTextureSize(64, 32);
Shape5.mirror = true; this.Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F); setRotation(this.Shape5, 0F, 0F, 0F);
Shape6 = new ModelRenderer(this, 0, 0); this.Shape6 = new ModelRenderer(this, 0, 0);
Shape6.addBox(0F, 0F, 0F, 8, 8, 8); this.Shape6.addBox(0F, 0F, 0F, 8, 8, 8);
Shape6.setRotationPoint(-4F, -4F, -4F); this.Shape6.setRotationPoint(-4F, -4F, -4F);
Shape6.setTextureSize(64, 32); this.Shape6.setTextureSize(64, 32);
Shape6.mirror = true; this.Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F); setRotation(this.Shape6, 0F, 0F, 0F);
Shape7 = new ModelRenderer(this, 0, 0); this.Shape7 = new ModelRenderer(this, 0, 0);
Shape7.addBox(0F, 0F, 0F, 6, 5, 7); this.Shape7.addBox(0F, 0F, 0F, 6, 5, 7);
Shape7.setRotationPoint(-7F, -5F, 1F); this.Shape7.setRotationPoint(-7F, -5F, 1F);
Shape7.setTextureSize(64, 32); this.Shape7.setTextureSize(64, 32);
Shape7.mirror = true; this.Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0F); setRotation(this.Shape7, 0F, 0F, 0F);
Shape8 = new ModelRenderer(this, 0, 0); this.Shape8 = new ModelRenderer(this, 0, 0);
Shape8.addBox(0F, 0F, 0F, 12, 6, 4); this.Shape8.addBox(0F, 0F, 0F, 12, 6, 4);
Shape8.setRotationPoint(-6F, -1F, 3F); this.Shape8.setRotationPoint(-6F, -1F, 3F);
Shape8.setTextureSize(64, 32); this.Shape8.setTextureSize(64, 32);
Shape8.mirror = true; this.Shape8.mirror = true;
setRotation(Shape8, 0F, 0F, -0.3490659F); setRotation(this.Shape8, 0F, 0F, -0.3490659F);
Shape9 = new ModelRenderer(this, 0, 0); this.Shape9 = new ModelRenderer(this, 0, 0);
Shape9.addBox(0F, 0F, 0F, 12, 6, 6); this.Shape9.addBox(0F, 0F, 0F, 12, 6, 6);
Shape9.setRotationPoint(-6F, 2F, -3F); this.Shape9.setRotationPoint(-6F, 2F, -3F);
Shape9.setTextureSize(64, 32); this.Shape9.setTextureSize(64, 32);
Shape9.mirror = true; this.Shape9.mirror = true;
setRotation(Shape9, 0F, -0.2094395F, 0F); setRotation(this.Shape9, 0F, -0.2094395F, 0F);
Shape10 = new ModelRenderer(this, 0, 0); this.Shape10 = new ModelRenderer(this, 0, 0);
Shape10.addBox(0F, 0F, 0F, 6, 10, 4); this.Shape10.addBox(0F, 0F, 0F, 6, 10, 4);
Shape10.setRotationPoint(-5F, -3F, -6F); this.Shape10.setRotationPoint(-5F, -3F, -6F);
Shape10.setTextureSize(64, 32); this.Shape10.setTextureSize(64, 32);
Shape10.mirror = true; this.Shape10.mirror = true;
setRotation(Shape10, 0F, 0F, -0.3490659F); setRotation(this.Shape10, 0F, 0F, -0.3490659F);
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.renderAll(scaleFactor);
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 f5) { public void renderAll(float scaleFactor) {
Shape1.render(f5);
Shape2.render(f5); this.Shape1.render(scaleFactor);
Shape3.render(f5); this.Shape2.render(scaleFactor);
Shape4.render(f5); this.Shape3.render(scaleFactor);
Shape5.render(f5); this.Shape4.render(scaleFactor);
Shape6.render(f5); this.Shape5.render(scaleFactor);
Shape7.render(f5); this.Shape6.render(scaleFactor);
Shape8.render(f5); this.Shape7.render(scaleFactor);
Shape9.render(f5); this.Shape8.render(scaleFactor);
Shape10.render(f5); 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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
} }

View File

@ -4,131 +4,107 @@
// Keep in mind that you still need to fill in some blanks // Keep in mind that you still need to fill in some blanks
// - ZeuX // - ZeuX
package com.hbm.render.model; package com.hbm.render.model;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelSatelliteReceiver extends ModelBase 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);
}
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;
}
} }

View File

@ -9,37 +9,32 @@ public class ModelShrapnel extends ModelBase {
ModelRenderer bullet; ModelRenderer bullet;
public ModelShrapnel() { public ModelShrapnel() {
textureWidth = 16; this.textureWidth = 16;
textureHeight = 8; this.textureHeight = 8;
bullet = new ModelRenderer(this, 0, 0); this.bullet = new ModelRenderer(this, 0, 0);
bullet.addBox(0F, 0F, 0F, 4, 4, 4); this.bullet.addBox(0F, 0F, 0F, 4, 4, 4);
bullet.setRotationPoint(1F, -0.5F, -0.5F); this.bullet.setRotationPoint(1F, -0.5F, -0.5F);
bullet.setTextureSize(16, 8); this.bullet.setTextureSize(16, 8);
bullet.mirror = true; this.bullet.mirror = true;
setRotation(bullet, 0F, 0F, 0F); setRotation(this.bullet, 0F, 0F, 0F);
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.renderAll(scaleFactor);
bullet.render(f5);
} }
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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
}

View File

@ -4,130 +4,107 @@
// Keep in mind that you still need to fill in some blanks // Keep in mind that you still need to fill in some blanks
// - ZeuX // - ZeuX
package com.hbm.render.model; package com.hbm.render.model;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelStatue extends ModelBase 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 void renderModel(float f) { ModelRenderer Shape1;
Shape1.render(f); ModelRenderer Shape2;
Shape2.render(f); ModelRenderer Shape3;
Shape3.render(f); ModelRenderer Shape4;
Shape4.render(f); ModelRenderer Shape6;
Shape6.render(f); ModelRenderer Shape7;
Shape7.render(f); ModelRenderer Shape8;
Shape8.render(f); ModelRenderer Shape9;
Shape9.render(f); ModelRenderer Shape10;
Shape10.render(f);
}
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;
}
} }

View File

@ -4,77 +4,59 @@
// Keep in mind that you still need to fill in some blanks // Keep in mind that you still need to fill in some blanks
// - ZeuX // - ZeuX
package com.hbm.render.model; package com.hbm.render.model;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelSteelRoof extends ModelBase 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);
}
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;
}
} }

View File

@ -13,7 +13,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelStinger extends ModelBase { public class ModelStinger extends ModelBase {
// fields
ModelRenderer B1; ModelRenderer B1;
ModelRenderer B2; ModelRenderer B2;
ModelRenderer B3; ModelRenderer B3;
@ -33,146 +33,141 @@ public class ModelStinger extends ModelBase {
ModelRenderer E4; ModelRenderer E4;
public ModelStinger() { public ModelStinger() {
textureWidth = 128; this.textureWidth = 128;
textureHeight = 64; this.textureHeight = 64;
B1 = new ModelRenderer(this, 0, 0); this.B1 = new ModelRenderer(this, 0, 0);
B1.addBox(0F, 0F, 0F, 52, 4, 2); this.B1.addBox(0F, 0F, 0F, 52, 4, 2);
B1.setRotationPoint(-26F, 0F, -1F); this.B1.setRotationPoint(-26F, 0F, -1F);
B1.setTextureSize(128, 64); this.B1.setTextureSize(128, 64);
B1.mirror = true; this.B1.mirror = true;
setRotation(B1, 0F, 0F, 0F); setRotation(this.B1, 0F, 0F, 0F);
B2 = new ModelRenderer(this, 0, 6); this.B2 = new ModelRenderer(this, 0, 6);
B2.addBox(0F, 0F, 0F, 52, 2, 4); this.B2.addBox(0F, 0F, 0F, 52, 2, 4);
B2.setRotationPoint(-26F, 1F, -2F); this.B2.setRotationPoint(-26F, 1F, -2F);
B2.setTextureSize(128, 64); this.B2.setTextureSize(128, 64);
B2.mirror = true; this.B2.mirror = true;
setRotation(B2, 0F, 0F, 0F); setRotation(this.B2, 0F, 0F, 0F);
B3 = new ModelRenderer(this, 0, 12); this.B3 = new ModelRenderer(this, 0, 12);
B3.addBox(0F, 0F, 0F, 52, 3, 3); this.B3.addBox(0F, 0F, 0F, 52, 3, 3);
B3.setRotationPoint(-26F, 0.5F, -1.5F); this.B3.setRotationPoint(-26F, 0.5F, -1.5F);
B3.setTextureSize(128, 64); this.B3.setTextureSize(128, 64);
B3.mirror = true; this.B3.mirror = true;
setRotation(B3, 0F, 0F, 0F); setRotation(this.B3, 0F, 0F, 0F);
E1 = new ModelRenderer(this, 0, 18); this.E1 = new ModelRenderer(this, 0, 18);
E1.addBox(0F, 0F, 0F, 2, 6, 3); this.E1.addBox(0F, 0F, 0F, 2, 6, 3);
E1.setRotationPoint(26F, -1F, -1.5F); this.E1.setRotationPoint(26F, -1F, -1.5F);
E1.setTextureSize(128, 64); this.E1.setTextureSize(128, 64);
E1.mirror = true; this.E1.mirror = true;
setRotation(E1, 0F, 0F, 0F); setRotation(this.E1, 0F, 0F, 0F);
E2 = new ModelRenderer(this, 10, 18); this.E2 = new ModelRenderer(this, 10, 18);
E2.addBox(0F, 0F, 0F, 2, 3, 6); this.E2.addBox(0F, 0F, 0F, 2, 3, 6);
E2.setRotationPoint(26F, 0.5F, -3F); this.E2.setRotationPoint(26F, 0.5F, -3F);
E2.setTextureSize(128, 64); this.E2.setTextureSize(128, 64);
E2.mirror = true; this.E2.mirror = true;
setRotation(E2, 0F, 0F, 0F); setRotation(this.E2, 0F, 0F, 0F);
E3 = new ModelRenderer(this, 26, 18); this.E3 = new ModelRenderer(this, 26, 18);
E3.addBox(0F, 0F, 0F, 2, 5, 5); this.E3.addBox(0F, 0F, 0F, 2, 5, 5);
E3.setRotationPoint(26F, -0.5F, -2.5F); this.E3.setRotationPoint(26F, -0.5F, -2.5F);
E3.setTextureSize(128, 64); this.E3.setTextureSize(128, 64);
E3.mirror = true; this.E3.mirror = true;
setRotation(E3, 0F, 0F, 0F); setRotation(this.E3, 0F, 0F, 0F);
F1 = new ModelRenderer(this, 0, 27); this.F1 = new ModelRenderer(this, 0, 27);
F1.addBox(0F, 0F, 0F, 4, 5, 5); this.F1.addBox(0F, 0F, 0F, 4, 5, 5);
F1.setRotationPoint(-30F, -0.5F, -2.5F); this.F1.setRotationPoint(-30F, -0.5F, -2.5F);
F1.setTextureSize(128, 64); this.F1.setTextureSize(128, 64);
F1.mirror = true; this.F1.mirror = true;
setRotation(F1, 0F, 0F, 0F); setRotation(this.F1, 0F, 0F, 0F);
F2 = new ModelRenderer(this, 0, 37); this.F2 = new ModelRenderer(this, 0, 37);
F2.addBox(0F, 0F, 0F, 4, 6, 3); this.F2.addBox(0F, 0F, 0F, 4, 6, 3);
F2.setRotationPoint(-30F, -1F, -1.5F); this.F2.setRotationPoint(-30F, -1F, -1.5F);
F2.setTextureSize(128, 64); this.F2.setTextureSize(128, 64);
F2.mirror = true; this.F2.mirror = true;
setRotation(F2, 0F, 0F, 0F); setRotation(this.F2, 0F, 0F, 0F);
F3 = new ModelRenderer(this, 14, 37); this.F3 = new ModelRenderer(this, 14, 37);
F3.addBox(0F, 0F, 0F, 4, 3, 6); this.F3.addBox(0F, 0F, 0F, 4, 3, 6);
F3.setRotationPoint(-30F, 0.5F, -3F); this.F3.setRotationPoint(-30F, 0.5F, -3F);
F3.setTextureSize(128, 64); this.F3.setTextureSize(128, 64);
F3.mirror = true; this.F3.mirror = true;
setRotation(F3, 0F, 0F, 0F); setRotation(this.F3, 0F, 0F, 0F);
D1 = new ModelRenderer(this, 0, 46); this.D1 = new ModelRenderer(this, 0, 46);
D1.addBox(0F, 0F, 0F, 16, 8, 3); this.D1.addBox(0F, 0F, 0F, 16, 8, 3);
D1.setRotationPoint(-25F, 4F, -1F); this.D1.setRotationPoint(-25F, 4F, -1F);
D1.setTextureSize(128, 64); this.D1.setTextureSize(128, 64);
D1.mirror = true; this.D1.mirror = true;
setRotation(D1, 0F, 0F, 0F); setRotation(this.D1, 0F, 0F, 0F);
D2 = new ModelRenderer(this, 38, 46); this.D2 = new ModelRenderer(this, 38, 46);
D2.addBox(0F, 0F, 0F, 12, 8, 1); this.D2.addBox(0F, 0F, 0F, 12, 8, 1);
D2.setRotationPoint(-21F, 4F, -2F); this.D2.setRotationPoint(-21F, 4F, -2F);
D2.setTextureSize(128, 64); this.D2.setTextureSize(128, 64);
D2.mirror = true; this.D2.mirror = true;
setRotation(D2, 0F, 0F, 0F); setRotation(this.D2, 0F, 0F, 0F);
D3 = new ModelRenderer(this, 34, 38); this.D3 = new ModelRenderer(this, 34, 38);
D3.addBox(0F, 0F, 0F, 16, 6, 2); this.D3.addBox(0F, 0F, 0F, 16, 6, 2);
D3.setRotationPoint(-21F, 0.5F, -4F); this.D3.setRotationPoint(-21F, 0.5F, -4F);
D3.setTextureSize(128, 64); this.D3.setTextureSize(128, 64);
D3.mirror = true; this.D3.mirror = true;
setRotation(D3, 0F, 0F, 0F); setRotation(this.D3, 0F, 0F, 0F);
F = new ModelRenderer(this, 40, 18); this.F = new ModelRenderer(this, 40, 18);
F.addBox(0F, 0F, 0F, 12, 8, 5); this.F.addBox(0F, 0F, 0F, 12, 8, 5);
F.setRotationPoint(-25F, -8F, -2.5F); this.F.setRotationPoint(-25F, -8F, -2.5F);
F.setTextureSize(128, 64); this.F.setTextureSize(128, 64);
F.mirror = true; this.F.mirror = true;
setRotation(F, 0F, 0F, 0F); setRotation(this.F, 0F, 0F, 0F);
H1 = new ModelRenderer(this, 18, 27); this.H1 = new ModelRenderer(this, 18, 27);
H1.addBox(0F, 0F, 0F, 2, 7, 1); this.H1.addBox(0F, 0F, 0F, 2, 7, 1);
H1.setRotationPoint(-4F, 4F, -0.5F); this.H1.setRotationPoint(-4F, 4F, -0.5F);
H1.setTextureSize(128, 64); this.H1.setTextureSize(128, 64);
H1.mirror = true; this.H1.mirror = true;
//setRotation(H1, 0F, 0F, -0.2617994F); //setRotation(H1, 0F, 0F, -0.2617994F);
setRotation(H1, 0F, 0F, 0F); setRotation(this.H1, 0F, 0F, 0F);
H2 = new ModelRenderer(this, 24, 31); this.H2 = new ModelRenderer(this, 24, 31);
H2.addBox(0F, 0F, 0F, 8, 1, 2); this.H2.addBox(0F, 0F, 0F, 8, 1, 2);
H2.setRotationPoint(-9F, 4F, -1F); this.H2.setRotationPoint(-9F, 4F, -1F);
H2.setTextureSize(128, 64); this.H2.setTextureSize(128, 64);
H2.mirror = true; this.H2.mirror = true;
setRotation(H2, 0F, 0F, 0F); setRotation(this.H2, 0F, 0F, 0F);
H3 = new ModelRenderer(this, 44, 31); this.H3 = new ModelRenderer(this, 44, 31);
H3.addBox(0F, 0F, 0F, 2, 3, 2); this.H3.addBox(0F, 0F, 0F, 2, 3, 2);
H3.setRotationPoint(-12F, 12F, -1F); this.H3.setRotationPoint(-12F, 12F, -1F);
H3.setTextureSize(128, 64); this.H3.setTextureSize(128, 64);
H3.mirror = true; this.H3.mirror = true;
setRotation(H3, 0F, 0F, 0F); setRotation(this.H3, 0F, 0F, 0F);
E4 = new ModelRenderer(this, 38, 55); this.E4 = new ModelRenderer(this, 38, 55);
E4.addBox(0F, 0F, 0F, 8, 6, 2); this.E4.addBox(0F, 0F, 0F, 8, 6, 2);
E4.setRotationPoint(16F, -1F, -4F); this.E4.setRotationPoint(16F, -1F, -4F);
E4.setTextureSize(128, 64); this.E4.setTextureSize(128, 64);
E4.mirror = true; this.E4.mirror = true;
setRotation(E4, 0F, 0F, 0F); setRotation(this.E4, 0F, 0F, 0F);
} }
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { @Override
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) {
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
B1.render(f5); this.B1.render(scaleFactor);
B2.render(f5); this.B2.render(scaleFactor);
B3.render(f5); this.B3.render(scaleFactor);
E1.render(f5); this.E1.render(scaleFactor);
E2.render(f5); this.E2.render(scaleFactor);
E3.render(f5); this.E3.render(scaleFactor);
F1.render(f5); this.F1.render(scaleFactor);
F2.render(f5); this.F2.render(scaleFactor);
F3.render(f5); this.F3.render(scaleFactor);
D1.render(f5); this.D1.render(scaleFactor);
D2.render(f5); this.D2.render(scaleFactor);
D3.render(f5); this.D3.render(scaleFactor);
GL11.glDisable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_CULL_FACE);
F.render(f5); this.F.render(scaleFactor);
GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_CULL_FACE);
H1.render(f5); this.H1.render(scaleFactor);
H2.render(f5); this.H2.render(scaleFactor);
H3.render(f5); this.H3.render(scaleFactor);
E4.render(f5); 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.rotateAngleX = x;
model.rotateAngleY = y; model.rotateAngleY = y;
model.rotateAngleZ = z; 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);
}
} }

View File

@ -4,102 +4,85 @@
// Keep in mind that you still need to fill in some blanks // Keep in mind that you still need to fill in some blanks
// - ZeuX // - ZeuX
package com.hbm.render.model; package com.hbm.render.model;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelSword extends ModelBase 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);
}
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;
}
} }

View File

@ -13,7 +13,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelT45Boots extends ModelBiped { public class ModelT45Boots extends ModelBiped {
// fields
ModelRenderer leftleg; ModelRenderer leftleg;
ModelRenderer rightleg; ModelRenderer rightleg;
ModelRenderer Shape1; ModelRenderer Shape1;
@ -22,61 +22,49 @@ public class ModelT45Boots extends ModelBiped {
ModelRenderer Shape4; ModelRenderer Shape4;
public ModelT45Boots() { public ModelT45Boots() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 32; this.textureHeight = 32;
leftleg = new ModelRenderer(this, 0, 0); this.leftleg = new ModelRenderer(this, 0, 0);
rightleg = new ModelRenderer(this, 0, 0); this.rightleg = new ModelRenderer(this, 0, 0);
Shape1 = new ModelRenderer(this, 0, 0); this.Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 4, 2, 6); this.Shape1.addBox(0F, 0F, 0F, 4, 2, 6);
Shape1.setRotationPoint(-4F + 2, 0F + 9.5F, -4F); this.Shape1.setRotationPoint(-4F + 2, 0F + 9.5F, -4F);
Shape1.setTextureSize(64, 32); this.Shape1.setTextureSize(64, 32);
Shape1.mirror = true; this.Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F); setRotation(this.Shape1, 0F, 0F, 0F);
convertToChild(leftleg, Shape1); convertToChild(this.leftleg, this.Shape1);
Shape2 = new ModelRenderer(this, 0, 8); this.Shape2 = new ModelRenderer(this, 0, 8);
Shape2.addBox(0F, 0F, 0F, 4, 2, 6); this.Shape2.addBox(0F, 0F, 0F, 4, 2, 6);
Shape2.setRotationPoint(0F - 2, 0F + 9.5F, -4F); this.Shape2.setRotationPoint(0F - 2, 0F + 9.5F, -4F);
Shape2.setTextureSize(64, 32); this.Shape2.setTextureSize(64, 32);
Shape2.mirror = true; this.Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F); setRotation(this.Shape2, 0F, 0F, 0F);
convertToChild(rightleg, Shape2); convertToChild(this.rightleg, this.Shape2);
Shape3 = new ModelRenderer(this, 0, 16); this.Shape3 = new ModelRenderer(this, 0, 16);
Shape3.addBox(0F, -1F, 0F, 4, 2, 4); this.Shape3.addBox(0F, -1F, 0F, 4, 2, 4);
Shape3.setRotationPoint(-4F + 2, 0F + 9.5F, -4F); this.Shape3.setRotationPoint(-4F + 2, 0F + 9.5F, -4F);
Shape3.setTextureSize(64, 32); this.Shape3.setTextureSize(64, 32);
Shape3.mirror = true; this.Shape3.mirror = true;
setRotation(Shape3, 0.2617994F, 0F, 0F); setRotation(this.Shape3, 0.2617994F, 0F, 0F);
convertToChild(leftleg, Shape3); convertToChild(this.leftleg, this.Shape3);
Shape4 = new ModelRenderer(this, 0, 22); this.Shape4 = new ModelRenderer(this, 0, 22);
Shape4.addBox(0F, -1F, 0F, 4, 2, 4); this.Shape4.addBox(0F, -1F, 0F, 4, 2, 4);
Shape4.setRotationPoint(0F - 2, 0F + 9.5F, -4F); this.Shape4.setRotationPoint(0F - 2, 0F + 9.5F, -4F);
Shape4.setTextureSize(64, 32); this.Shape4.setTextureSize(64, 32);
Shape4.mirror = true; this.Shape4.mirror = true;
setRotation(Shape4, 0.2617994F, 0F, 0F); setRotation(this.Shape4, 0.2617994F, 0F, 0F);
convertToChild(rightleg, Shape4); convertToChild(this.rightleg, this.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;
} }
@Override @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.isSneak = entity.isSneaking();
this.isRiding = entity.isRiding(); 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.rotationPointX = this.bipedLeftLeg.rotationPointX;
this.leftleg.rotationPointY = this.bipedLeftLeg.rotationPointY - 1.5F; this.leftleg.rotationPointY = this.bipedLeftLeg.rotationPointY - 1.5F;
this.leftleg.rotationPointZ = this.bipedLeftLeg.rotationPointZ; this.leftleg.rotationPointZ = this.bipedLeftLeg.rotationPointZ;
@ -99,31 +87,40 @@ public class ModelT45Boots extends ModelBiped {
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glScalef(1.125F, 1.125F, 1.125F); GL11.glScalef(1.125F, 1.125F, 1.125F);
// this.leftleg.addChild(Shape1); // this.leftleg.addChild(Shape1);
// this.leftleg.addChild(Shape3); // this.leftleg.addChild(Shape3);
this.leftleg.render(par7); this.leftleg.render(scaleFactor);
// this.rightleg.addChild(Shape2); // this.rightleg.addChild(Shape2);
// this.rightleg.addChild(Shape4); // this.rightleg.addChild(Shape4);
this.rightleg.render(par7); this.rightleg.render(scaleFactor);
GL11.glPopMatrix(); 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 // move child rotation point to be relative to parent
parChild.rotationPointX -= parParent.rotationPointX; child.rotationPointX -= parent.rotationPointX;
parChild.rotationPointY -= parParent.rotationPointY; child.rotationPointY -= parent.rotationPointY;
parChild.rotationPointZ -= parParent.rotationPointZ; child.rotationPointZ -= parent.rotationPointZ;
// make rotations relative to parent // make rotations relative to parent
parChild.rotateAngleX -= parParent.rotateAngleX; child.rotateAngleX -= parent.rotateAngleX;
parChild.rotateAngleY -= parParent.rotateAngleY; child.rotateAngleY -= parent.rotateAngleY;
parChild.rotateAngleZ -= parParent.rotateAngleZ; child.rotateAngleZ -= parent.rotateAngleZ;
// create relationship // 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;
}
} }

View File

@ -14,7 +14,6 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.monster.EntityPigZombie;
import net.minecraft.entity.monster.EntitySkeleton; import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -22,7 +21,7 @@ import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class ModelT45Chest extends ModelBiped { public class ModelT45Chest extends ModelBiped {
// fields
ModelRenderer chest; ModelRenderer chest;
ModelRenderer leftarm; ModelRenderer leftarm;
ModelRenderer rightarm; ModelRenderer rightarm;
@ -47,179 +46,161 @@ public class ModelT45Chest extends ModelBiped {
ModelRenderer Shape19; ModelRenderer Shape19;
public ModelT45Chest() { public ModelT45Chest() {
textureWidth = 128; this.textureWidth = 128;
textureHeight = 64; this.textureHeight = 64;
chest = new ModelRenderer(this, 0, 0); this.chest = new ModelRenderer(this, 0, 0);
leftarm = new ModelRenderer(this, 0, 0); this.leftarm = new ModelRenderer(this, 0, 0);
rightarm = new ModelRenderer(this, 0, 0); this.rightarm = new ModelRenderer(this, 0, 0);
Shape1 = new ModelRenderer(this, 0, 0); this.Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 8, 12, 4); this.Shape1.addBox(0F, 0F, 0F, 8, 12, 4);
Shape1.setRotationPoint(-4F, 0F - 0.0625F / 2, -2F); this.Shape1.setRotationPoint(-4F, 0F - 0.0625F / 2, -2F);
Shape1.setTextureSize(128, 64); this.Shape1.setTextureSize(128, 64);
Shape1.mirror = true; this.Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F); setRotation(this.Shape1, 0F, 0F, 0F);
convertToChild(chest, Shape1); convertToChild(this.chest, this.Shape1);
Shape2 = new ModelRenderer(this, 0, 16); this.Shape2 = new ModelRenderer(this, 0, 16);
Shape2.addBox(0F, 0F, 0F, 7, 5, 2); this.Shape2.addBox(0F, 0F, 0F, 7, 5, 2);
Shape2.setRotationPoint(-3.5F, 2F - 0.0625F / 2, -3.5F); this.Shape2.setRotationPoint(-3.5F, 2F - 0.0625F / 2, -3.5F);
Shape2.setTextureSize(128, 64); this.Shape2.setTextureSize(128, 64);
Shape2.mirror = true; this.Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F); setRotation(this.Shape2, 0F, 0F, 0F);
convertToChild(chest, Shape2); convertToChild(this.chest, this.Shape2);
Shape3 = new ModelRenderer(this, 0, 23); this.Shape3 = new ModelRenderer(this, 0, 23);
Shape3.addBox(0F, 0F, 0F, 1, 1, 1); this.Shape3.addBox(0F, 0F, 0F, 1, 1, 1);
Shape3.setRotationPoint(-2.5F, 7F - 0.0625F / 2, -3F); this.Shape3.setRotationPoint(-2.5F, 7F - 0.0625F / 2, -3F);
Shape3.setTextureSize(128, 64); this.Shape3.setTextureSize(128, 64);
Shape3.mirror = true; this.Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F); setRotation(this.Shape3, 0F, 0F, 0F);
convertToChild(chest, Shape3); convertToChild(this.chest, this.Shape3);
Shape4 = new ModelRenderer(this, 0, 25); this.Shape4 = new ModelRenderer(this, 0, 25);
Shape4.addBox(0F, 0F, 0F, 1, 1, 1); this.Shape4.addBox(0F, 0F, 0F, 1, 1, 1);
Shape4.setRotationPoint(1.5F, 7F - 0.0625F / 2, -3F); this.Shape4.setRotationPoint(1.5F, 7F - 0.0625F / 2, -3F);
Shape4.setTextureSize(128, 64); this.Shape4.setTextureSize(128, 64);
Shape4.mirror = true; this.Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0F); setRotation(this.Shape4, 0F, 0F, 0F);
convertToChild(chest, Shape4); convertToChild(this.chest, this.Shape4);
Shape5 = new ModelRenderer(this, 0, 28); this.Shape5 = new ModelRenderer(this, 0, 28);
Shape5.addBox(0F, -2F, 0F, 7, 2, 2); this.Shape5.addBox(0F, -2F, 0F, 7, 2, 2);
Shape5.setRotationPoint(-3.5F, 2F - 0.0625F / 2, -3.5F); this.Shape5.setRotationPoint(-3.5F, 2F - 0.0625F / 2, -3.5F);
Shape5.setTextureSize(128, 64); this.Shape5.setTextureSize(128, 64);
Shape5.mirror = true; this.Shape5.mirror = true;
setRotation(Shape5, -0.6108652F, 0F, 0F); setRotation(this.Shape5, -0.6108652F, 0F, 0F);
convertToChild(chest, Shape5); convertToChild(this.chest, this.Shape5);
Shape6 = new ModelRenderer(this, 48, 0); this.Shape6 = new ModelRenderer(this, 48, 0);
Shape6.addBox(0F, 0F, 0F, 4, 12, 4); this.Shape6.addBox(0F, 0F, 0F, 4, 12, 4);
Shape6.setRotationPoint(4F - 6 + 0.25F, 0F - 3, -2F); this.Shape6.setRotationPoint(4F - 6 + 0.25F, 0F - 3, -2F);
Shape6.setTextureSize(128, 64); this.Shape6.setTextureSize(128, 64);
Shape6.mirror = true; this.Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F); setRotation(this.Shape6, 0F, 0F, 0F);
convertToChild(leftarm, Shape6); convertToChild(this.leftarm, this.Shape6);
Shape7 = new ModelRenderer(this, 32, 0); this.Shape7 = new ModelRenderer(this, 32, 0);
Shape7.addBox(0F, 0F, 0F, 4, 12, 4); this.Shape7.addBox(0F, 0F, 0F, 4, 12, 4);
Shape7.setRotationPoint(-8F + 6 - 0.25F, 0F - 3, -2F); this.Shape7.setRotationPoint(-8F + 6 - 0.25F, 0F - 3, -2F);
Shape7.setTextureSize(128, 64); this.Shape7.setTextureSize(128, 64);
Shape7.mirror = true; this.Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0F); setRotation(this.Shape7, 0F, 0F, 0F);
convertToChild(rightarm, Shape7); convertToChild(this.rightarm, this.Shape7);
Shape8 = new ModelRenderer(this, 32, 16); this.Shape8 = new ModelRenderer(this, 32, 16);
Shape8.addBox(0F, 0F, 0F, 5, 6, 6); this.Shape8.addBox(0F, 0F, 0F, 5, 6, 6);
Shape8.setRotationPoint(4F - 6 + 0.25F, 4F - 3, -3F); this.Shape8.setRotationPoint(4F - 6 + 0.25F, 4F - 3, -3F);
Shape8.setTextureSize(128, 64); this.Shape8.setTextureSize(128, 64);
Shape8.mirror = true; this.Shape8.mirror = true;
setRotation(Shape8, 0F, 0F, 0F); setRotation(this.Shape8, 0F, 0F, 0F);
convertToChild(leftarm, Shape8); convertToChild(this.leftarm, this.Shape8);
Shape9 = new ModelRenderer(this, 0, 34); this.Shape9 = new ModelRenderer(this, 0, 34);
Shape9.addBox(0F, 0F, 0F, 5, 6, 6); this.Shape9.addBox(0F, 0F, 0F, 5, 6, 6);
Shape9.setRotationPoint(-9F + 6 - 0.25F, 4F - 3, -3F); this.Shape9.setRotationPoint(-9F + 6 - 0.25F, 4F - 3, -3F);
Shape9.setTextureSize(128, 64); this.Shape9.setTextureSize(128, 64);
Shape9.mirror = true; this.Shape9.mirror = true;
setRotation(Shape9, 0F, 0F, 0F); setRotation(this.Shape9, 0F, 0F, 0F);
convertToChild(rightarm, Shape9); convertToChild(this.rightarm, this.Shape9);
Shape10 = new ModelRenderer(this, 32, 30); this.Shape10 = new ModelRenderer(this, 32, 30);
Shape10.addBox(0F, 0F, 0F, 2, 6, 2); this.Shape10.addBox(0F, 0F, 0F, 2, 6, 2);
Shape10.setRotationPoint(1F, 4F - 0.0625F / 2, 2F); this.Shape10.setRotationPoint(1F, 4F - 0.0625F / 2, 2F);
Shape10.setTextureSize(128, 64); this.Shape10.setTextureSize(128, 64);
Shape10.mirror = true; this.Shape10.mirror = true;
setRotation(Shape10, 0F, 0F, 0F); setRotation(this.Shape10, 0F, 0F, 0F);
convertToChild(chest, Shape10); convertToChild(this.chest, this.Shape10);
Shape11 = new ModelRenderer(this, 42, 30); this.Shape11 = new ModelRenderer(this, 42, 30);
Shape11.addBox(0F, 0F, 0F, 2, 6, 2); this.Shape11.addBox(0F, 0F, 0F, 2, 6, 2);
Shape11.setRotationPoint(-3F, 4F - 0.0625F / 2, 2F); this.Shape11.setRotationPoint(-3F, 4F - 0.0625F / 2, 2F);
Shape11.setTextureSize(128, 64); this.Shape11.setTextureSize(128, 64);
Shape11.mirror = true; this.Shape11.mirror = true;
setRotation(Shape11, 0F, 0F, 0F); setRotation(this.Shape11, 0F, 0F, 0F);
convertToChild(chest, Shape11); convertToChild(this.chest, this.Shape11);
Shape12 = new ModelRenderer(this, 26, 9); this.Shape12 = new ModelRenderer(this, 26, 9);
Shape12.addBox(0F, 0F, 0F, 1, 6, 1); this.Shape12.addBox(0F, 0F, 0F, 1, 6, 1);
Shape12.setRotationPoint(1.5F, -2F - 0.0625F / 2, 2F); this.Shape12.setRotationPoint(1.5F, -2F - 0.0625F / 2, 2F);
Shape12.setTextureSize(128, 64); this.Shape12.setTextureSize(128, 64);
Shape12.mirror = true; this.Shape12.mirror = true;
setRotation(Shape12, 0F, 0F, 0F); setRotation(this.Shape12, 0F, 0F, 0F);
convertToChild(chest, Shape12); convertToChild(this.chest, this.Shape12);
Shape13 = new ModelRenderer(this, 26, 0); this.Shape13 = new ModelRenderer(this, 26, 0);
Shape13.addBox(0F, 0F, 0F, 1, 6, 1); this.Shape13.addBox(0F, 0F, 0F, 1, 6, 1);
Shape13.setRotationPoint(-2.5F, -2F - 0.0625F / 2, 2F); this.Shape13.setRotationPoint(-2.5F, -2F - 0.0625F / 2, 2F);
Shape13.setTextureSize(128, 64); this.Shape13.setTextureSize(128, 64);
Shape13.mirror = true; this.Shape13.mirror = true;
setRotation(Shape13, 0F, 0F, 0F); setRotation(this.Shape13, 0F, 0F, 0F);
convertToChild(chest, Shape13); convertToChild(this.chest, this.Shape13);
Shape14 = new ModelRenderer(this, 20, 18); this.Shape14 = new ModelRenderer(this, 20, 18);
Shape14.addBox(0F, 0F, 0F, 2, 2, 1); this.Shape14.addBox(0F, 0F, 0F, 2, 2, 1);
Shape14.setRotationPoint(-1F, 1F - 0.0625F / 2, 2F); this.Shape14.setRotationPoint(-1F, 1F - 0.0625F / 2, 2F);
Shape14.setTextureSize(128, 64); this.Shape14.setTextureSize(128, 64);
Shape14.mirror = true; this.Shape14.mirror = true;
setRotation(Shape14, 0F, 0F, 0F); setRotation(this.Shape14, 0F, 0F, 0F);
convertToChild(chest, Shape14); convertToChild(this.chest, this.Shape14);
Shape15 = new ModelRenderer(this, 21, 23); this.Shape15 = new ModelRenderer(this, 21, 23);
Shape15.addBox(-1.5F, -1.5F, 0F, 3, 3, 1); this.Shape15.addBox(-1.5F, -1.5F, 0F, 3, 3, 1);
Shape15.setRotationPoint(0F, 2F - 0.0625F / 2, 3F); this.Shape15.setRotationPoint(0F, 2F - 0.0625F / 2, 3F);
Shape15.setTextureSize(128, 64); this.Shape15.setTextureSize(128, 64);
Shape15.mirror = true; this.Shape15.mirror = true;
setRotation(Shape15, 0F, 0F, 0.7853982F); setRotation(this.Shape15, 0F, 0F, 0.7853982F);
convertToChild(chest, Shape15); convertToChild(this.chest, this.Shape15);
Shape16 = new ModelRenderer(this, 0, 48); this.Shape16 = new ModelRenderer(this, 0, 48);
Shape16.addBox(0F, -1F, 0F, 3, 1, 4); this.Shape16.addBox(0F, -1F, 0F, 3, 1, 4);
Shape16.setRotationPoint(-8F + 6 - 0.25F, 12F - 3, -2F); this.Shape16.setRotationPoint(-8F + 6 - 0.25F, 12F - 3, -2F);
Shape16.setTextureSize(128, 64); this.Shape16.setTextureSize(128, 64);
Shape16.mirror = true; this.Shape16.mirror = true;
setRotation(Shape16, 0F, 0F, 0.5235988F); setRotation(this.Shape16, 0F, 0F, 0.5235988F);
convertToChild(rightarm, Shape16); convertToChild(this.rightarm, this.Shape16);
Shape17 = new ModelRenderer(this, 0, 55); this.Shape17 = new ModelRenderer(this, 0, 55);
Shape17.addBox(-3F, -1F, 0F, 3, 1, 4); this.Shape17.addBox(-3F, -1F, 0F, 3, 1, 4);
Shape17.setRotationPoint(8F - 6 + 0.25F, 12F - 3, -2F); this.Shape17.setRotationPoint(8F - 6 + 0.25F, 12F - 3, -2F);
Shape17.setTextureSize(128, 64); this.Shape17.setTextureSize(128, 64);
Shape17.mirror = true; this.Shape17.mirror = true;
setRotation(Shape17, 0F, 0F, -0.5235988F); setRotation(this.Shape17, 0F, 0F, -0.5235988F);
convertToChild(leftarm, Shape17); convertToChild(this.leftarm, this.Shape17);
Shape18 = new ModelRenderer(this, 90, 0); this.Shape18 = new ModelRenderer(this, 90, 0);
Shape18.addBox(0F, -3F, 0F, 5, 3, 6); this.Shape18.addBox(0F, -3F, 0F, 5, 3, 6);
Shape18.setRotationPoint(4F - 6 + 0.25F, 0F - 3, -3F); this.Shape18.setRotationPoint(4F - 6 + 0.25F, 0F - 3, -3F);
Shape18.setTextureSize(128, 64); this.Shape18.setTextureSize(128, 64);
Shape18.mirror = true; this.Shape18.mirror = true;
setRotation(Shape18, 0F, 0F, 0.2617994F); setRotation(this.Shape18, 0F, 0F, 0.2617994F);
convertToChild(leftarm, Shape18); convertToChild(this.leftarm, this.Shape18);
Shape19 = new ModelRenderer(this, 66, 0); this.Shape19 = new ModelRenderer(this, 66, 0);
Shape19.addBox(-5F, -3F, 0F, 5, 3, 6); this.Shape19.addBox(-5F, -3F, 0F, 5, 3, 6);
Shape19.setRotationPoint(-4F + 6 - 0.25F, 0F - 3, -3F); this.Shape19.setRotationPoint(-4F + 6 - 0.25F, 0F - 3, -3F);
Shape19.setTextureSize(128, 64); this.Shape19.setTextureSize(128, 64);
Shape19.mirror = true; this.Shape19.mirror = true;
setRotation(Shape19, 0F, 0F, -0.2617994F); setRotation(this.Shape19, 0F, 0F, -0.2617994F);
convertToChild(rightarm, Shape19); convertToChild(this.rightarm, this.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;
} }
@Override @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; EntityPlayer player = (EntityPlayer) entity;
ItemStack itemstack = player.inventory.getCurrentItem(); ItemStack itemstack = player.inventory.getCurrentItem();
this.heldItemRight = itemstack != null ? 1 : 0; this.heldItemRight = itemstack != null ? 1 : 0;
if (itemstack != null && player.getItemInUseCount() > 0) { if(itemstack != null && player.getItemInUseCount() > 0) {
EnumAction enumaction = itemstack.getItemUseAction(); EnumAction enumaction = itemstack.getItemUseAction();
if (enumaction == EnumAction.block) { if(enumaction == EnumAction.block) {
this.heldItemRight = 3; this.heldItemRight = 3;
} else if (enumaction == EnumAction.bow) { } else if(enumaction == EnumAction.bow) {
this.aimedBow = true; this.aimedBow = true;
} }
} }
@ -230,8 +211,9 @@ public class ModelT45Chest extends ModelBiped {
this.isSneak = entity.isSneaking(); this.isSneak = entity.isSneaking();
this.isRiding = entity.isRiding(); 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.rotationPointX = this.bipedBody.rotationPointX;
this.chest.rotationPointY = this.bipedBody.rotationPointY; this.chest.rotationPointY = this.bipedBody.rotationPointY;
this.chest.rotationPointZ = this.bipedBody.rotationPointZ; this.chest.rotationPointZ = this.bipedBody.rotationPointZ;
@ -250,56 +232,66 @@ public class ModelT45Chest extends ModelBiped {
this.rightarm.rotateAngleX = this.bipedRightArm.rotateAngleX; this.rightarm.rotateAngleX = this.bipedRightArm.rotateAngleX;
this.rightarm.rotateAngleY = this.bipedRightArm.rotateAngleY; this.rightarm.rotateAngleY = this.bipedRightArm.rotateAngleY;
this.rightarm.rotateAngleZ = this.bipedRightArm.rotateAngleZ; this.rightarm.rotateAngleZ = this.bipedRightArm.rotateAngleZ;
if(entity instanceof EntityZombie || entity instanceof EntityPigZombie || entity instanceof EntitySkeleton) { if(entity instanceof EntityZombie || entity instanceof EntitySkeleton) {
this.leftarm.rotateAngleX -= (90 * Math.PI / 180D); this.leftarm.rotateAngleX -= (float) (90 * Math.PI / 180D);
this.rightarm.rotateAngleX -= (90 * Math.PI / 180D); this.rightarm.rotateAngleX -= (float) (90 * Math.PI / 180D);
} }
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glScalef(1.125F, 1.125F, 1.125F); GL11.glScalef(1.125F, 1.125F, 1.125F);
this.chest.render(par7); this.chest.render(scaleFactor);
this.aimedBow = false; this.aimedBow = false;
GL11.glPopMatrix(); GL11.glPopMatrix();
this.renderLeft(par1Entity, par2, par3, par4, par5, par6, par7); this.renderLeft(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
this.renderRight(par1Entity, par2, par3, par4, par5, par6, par7); 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) { public void renderLeft(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glScalef(1.125F, 1.125F, 1.125F); GL11.glScalef(1.125F, 1.125F, 1.125F);
this.leftarm.render(par7); this.leftarm.render(scaleFactor);
this.aimedBow = false; this.aimedBow = false;
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
public void renderRight(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void renderRight(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glScalef(1.125F, 1.125F, 1.125F); GL11.glScalef(1.125F, 1.125F, 1.125F);
this.rightarm.render(par7); this.rightarm.render(scaleFactor);
this.aimedBow = false; this.aimedBow = false;
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
// Jabelar, you saved my time! I was about to redo all this crap if you can // Jabelar, you saved my time! I was about to redo all this crap if you can
// simply use this method!! // 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 // move child rotation point to be relative to parent
parChild.rotationPointX -= parParent.rotationPointX; child.rotationPointX -= parent.rotationPointX;
parChild.rotationPointY -= parParent.rotationPointY; child.rotationPointY -= parent.rotationPointY;
parChild.rotationPointZ -= parParent.rotationPointZ; child.rotationPointZ -= parent.rotationPointZ;
// make rotations relative to parent // make rotations relative to parent
parChild.rotateAngleX -= parParent.rotateAngleX; child.rotateAngleX -= parent.rotateAngleX;
parChild.rotateAngleY -= parParent.rotateAngleY; child.rotateAngleY -= parent.rotateAngleY;
parChild.rotateAngleZ -= parParent.rotateAngleZ; child.rotateAngleZ -= parent.rotateAngleZ;
// create relationship // 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;
}
} }

View File

@ -13,7 +13,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelT45Helmet extends ModelBiped { public class ModelT45Helmet extends ModelBiped {
// fields
ModelRenderer helmet; ModelRenderer helmet;
ModelRenderer Shape1; ModelRenderer Shape1;
ModelRenderer Shape2; ModelRenderer Shape2;
@ -25,90 +25,76 @@ public class ModelT45Helmet extends ModelBiped {
ModelRenderer Shape8; ModelRenderer Shape8;
public ModelT45Helmet() { public ModelT45Helmet() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 32; this.textureHeight = 32;
helmet = new ModelRenderer(this, 0, 0); this.helmet = new ModelRenderer(this, 0, 0);
Shape1 = new ModelRenderer(this, 0, 0); this.Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 8, 8, 8); this.Shape1.addBox(0F, 0F, 0F, 8, 8, 8);
Shape1.setRotationPoint(-4F, 0F - 8 + 0.0625F / 2, -4F); this.Shape1.setRotationPoint(-4F, 0F - 8 + 0.0625F / 2, -4F);
Shape1.setTextureSize(64, 32); this.Shape1.setTextureSize(64, 32);
Shape1.mirror = true; this.Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F); setRotation(this.Shape1, 0F, 0F, 0F);
convertToChild(helmet, Shape1); convertToChild(this.helmet, this.Shape1);
Shape2 = new ModelRenderer(this, 32, 0); this.Shape2 = new ModelRenderer(this, 32, 0);
Shape2.addBox(0F, 0F, 0F, 2, 2, 1); this.Shape2.addBox(0F, 0F, 0F, 2, 2, 1);
Shape2.setRotationPoint(1F, 1F - 8 + 0.0625F / 2 + 1, -5F); this.Shape2.setRotationPoint(1F, 1F - 8 + 0.0625F / 2 + 1, -5F);
Shape2.setTextureSize(64, 32); this.Shape2.setTextureSize(64, 32);
Shape2.mirror = true; this.Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F); setRotation(this.Shape2, 0F, 0F, 0F);
convertToChild(helmet, Shape2); convertToChild(this.helmet, this.Shape2);
Shape3 = new ModelRenderer(this, 40, 6); this.Shape3 = new ModelRenderer(this, 40, 6);
Shape3.addBox(0F, 0F, 0F, 1, 1, 4); this.Shape3.addBox(0F, 0F, 0F, 1, 1, 4);
Shape3.setRotationPoint(-5F, 1F - 8 + 0.0625F / 2, -5.466667F); this.Shape3.setRotationPoint(-5F, 1F - 8 + 0.0625F / 2, -5.466667F);
Shape3.setTextureSize(64, 32); this.Shape3.setTextureSize(64, 32);
Shape3.mirror = true; this.Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F); setRotation(this.Shape3, 0F, 0F, 0F);
convertToChild(helmet, Shape3); convertToChild(this.helmet, this.Shape3);
Shape4 = new ModelRenderer(this, 40, 0); this.Shape4 = new ModelRenderer(this, 40, 0);
Shape4.addBox(0F, 0F, 0F, 4, 2, 2); this.Shape4.addBox(0F, 0F, 0F, 4, 2, 2);
Shape4.setRotationPoint(-2F, 5F - 8 + 0.0625F / 2, -4F); this.Shape4.setRotationPoint(-2F, 5F - 8 + 0.0625F / 2, -4F);
Shape4.setTextureSize(64, 32); this.Shape4.setTextureSize(64, 32);
Shape4.mirror = true; this.Shape4.mirror = true;
setRotation(Shape4, -0.7853982F, 0F, 0F); setRotation(this.Shape4, -0.7853982F, 0F, 0F);
convertToChild(helmet, Shape4); convertToChild(this.helmet, this.Shape4);
Shape5 = new ModelRenderer(this, 54, 0); this.Shape5 = new ModelRenderer(this, 54, 0);
Shape5.addBox(0F, 2F, 0F, 2, 1, 2); this.Shape5.addBox(0F, 2F, 0F, 2, 1, 2);
Shape5.setRotationPoint(-1F, 5F - 8 + 0.0625F / 2, -4F); this.Shape5.setRotationPoint(-1F, 5F - 8 + 0.0625F / 2, -4F);
Shape5.setTextureSize(64, 32); this.Shape5.setTextureSize(64, 32);
Shape5.mirror = true; this.Shape5.mirror = true;
setRotation(Shape5, -0.7853982F, 0F, 0F); setRotation(this.Shape5, -0.7853982F, 0F, 0F);
convertToChild(helmet, Shape5); convertToChild(this.helmet, this.Shape5);
Shape6 = new ModelRenderer(this, 0, 16); this.Shape6 = new ModelRenderer(this, 0, 16);
Shape6.addBox(0F, 0F, 0F, 10, 1, 9); this.Shape6.addBox(0F, 0F, 0F, 10, 1, 9);
Shape6.setRotationPoint(-5F, 6F - 8 + 0.0625F / 2, -4.5F); this.Shape6.setRotationPoint(-5F, 6F - 8 + 0.0625F / 2, -4.5F);
Shape6.setTextureSize(64, 32); this.Shape6.setTextureSize(64, 32);
Shape6.mirror = true; this.Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F); setRotation(this.Shape6, 0F, 0F, 0F);
convertToChild(helmet, Shape6); convertToChild(this.helmet, this.Shape6);
Shape7 = new ModelRenderer(this, 32, 7); this.Shape7 = new ModelRenderer(this, 32, 7);
Shape7.addBox(0F, 0F, 0F, 1, 1, 1); this.Shape7.addBox(0F, 0F, 0F, 1, 1, 1);
Shape7.setRotationPoint(-1.5F, 5F - 8 + 0.0625F / 2, -4.5F); this.Shape7.setRotationPoint(-1.5F, 5F - 8 + 0.0625F / 2, -4.5F);
Shape7.setTextureSize(64, 32); this.Shape7.setTextureSize(64, 32);
Shape7.mirror = true; this.Shape7.mirror = true;
setRotation(Shape7, -0.7853982F, 0F, 0F); setRotation(this.Shape7, -0.7853982F, 0F, 0F);
convertToChild(helmet, Shape7); convertToChild(this.helmet, this.Shape7);
Shape8 = new ModelRenderer(this, 32, 5); this.Shape8 = new ModelRenderer(this, 32, 5);
Shape8.addBox(0F, 0F, 0F, 1, 1, 1); this.Shape8.addBox(0F, 0F, 0F, 1, 1, 1);
Shape8.setRotationPoint(0.5F, 5F - 8 + 0.0625F / 2, -4.5F); this.Shape8.setRotationPoint(0.5F, 5F - 8 + 0.0625F / 2, -4.5F);
Shape8.setTextureSize(64, 32); this.Shape8.setTextureSize(64, 32);
Shape8.mirror = true; this.Shape8.mirror = true;
setRotation(Shape8, -0.7853982F, 0F, 0F); setRotation(this.Shape8, -0.7853982F, 0F, 0F);
convertToChild(helmet, Shape8); convertToChild(this.helmet, this.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;
} }
@Override @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.isSneak = entity.isSneaking();
this.isRiding = entity.isRiding(); 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.rotationPointX = this.bipedHead.rotationPointX;
this.helmet.rotationPointY = this.bipedHead.rotationPointY; this.helmet.rotationPointY = this.bipedHead.rotationPointY;
this.helmet.rotateAngleY = this.bipedHead.rotateAngleY; this.helmet.rotateAngleY = this.bipedHead.rotateAngleY;
@ -116,26 +102,34 @@ public class ModelT45Helmet extends ModelBiped {
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glScalef(1.125F, 1.125F, 1.125F); GL11.glScalef(1.125F, 1.125F, 1.125F);
GL11.glScalef(1.0625F, 1.0625F, 1.0625F); GL11.glScalef(1.0625F, 1.0625F, 1.0625F);
this.helmet.render(par7); this.helmet.render(scaleFactor);
GL11.glPopMatrix(); 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 // move child rotation point to be relative to parent
parChild.rotationPointX -= parParent.rotationPointX; child.rotationPointX -= parent.rotationPointX;
parChild.rotationPointY -= parParent.rotationPointY; child.rotationPointY -= parent.rotationPointY;
parChild.rotationPointZ -= parParent.rotationPointZ; child.rotationPointZ -= parent.rotationPointZ;
// make rotations relative to parent // make rotations relative to parent
parChild.rotateAngleX -= parParent.rotateAngleX; child.rotateAngleX -= parent.rotateAngleX;
parChild.rotateAngleY -= parParent.rotateAngleY; child.rotateAngleY -= parent.rotateAngleY;
parChild.rotateAngleZ -= parParent.rotateAngleZ; child.rotateAngleZ -= parent.rotateAngleZ;
// create relationship // 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;
}
}

View File

@ -13,7 +13,7 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelT45Legs extends ModelBiped { public class ModelT45Legs extends ModelBiped {
// fields
ModelRenderer leftleg; ModelRenderer leftleg;
ModelRenderer rightleg; ModelRenderer rightleg;
ModelRenderer Shape1; ModelRenderer Shape1;
@ -24,76 +24,63 @@ public class ModelT45Legs extends ModelBiped {
ModelRenderer Shape6; ModelRenderer Shape6;
public ModelT45Legs() { public ModelT45Legs() {
textureWidth = 64; this.textureWidth = 64;
textureHeight = 32; this.textureHeight = 32;
leftleg = new ModelRenderer(this, 0, 0); this.leftleg = new ModelRenderer(this, 0, 0);
rightleg = new ModelRenderer(this, 0, 0); this.rightleg = new ModelRenderer(this, 0, 0);
Shape1 = new ModelRenderer(this, 0, 0); this.Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 4, 12, 4); this.Shape1.addBox(0F, 0F, 0F, 4, 12, 4);
Shape1.setRotationPoint(-4F + 2, 0F - 0.5F, -2F); this.Shape1.setRotationPoint(-4F + 2, 0F - 0.5F, -2F);
Shape1.setTextureSize(64, 32); this.Shape1.setTextureSize(64, 32);
Shape1.mirror = true; this.Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F); setRotation(this.Shape1, 0F, 0F, 0F);
convertToChild(rightleg, Shape1); convertToChild(this.rightleg, this.Shape1);
Shape2 = new ModelRenderer(this, 16, 0); this.Shape2 = new ModelRenderer(this, 16, 0);
Shape2.addBox(0F, 0F, 0F, 4, 12, 4); this.Shape2.addBox(0F, 0F, 0F, 4, 12, 4);
Shape2.setRotationPoint(0F - 2, 0F - 0.5F, -2F); this.Shape2.setRotationPoint(0F - 2, 0F - 0.5F, -2F);
Shape2.setTextureSize(64, 32); this.Shape2.setTextureSize(64, 32);
Shape2.mirror = true; this.Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F); setRotation(this.Shape2, 0F, 0F, 0F);
convertToChild(leftleg, Shape2); convertToChild(this.leftleg, this.Shape2);
Shape3 = new ModelRenderer(this, 0, 16); this.Shape3 = new ModelRenderer(this, 0, 16);
Shape3.addBox(0F, -6F, 0F, 5, 6, 4); this.Shape3.addBox(0F, -6F, 0F, 5, 6, 4);
Shape3.setRotationPoint(-5F + 2, 10F - 0.5F, -2F); this.Shape3.setRotationPoint(-5F + 2, 10F - 0.5F, -2F);
Shape3.setTextureSize(64, 32); this.Shape3.setTextureSize(64, 32);
Shape3.mirror = true; this.Shape3.mirror = true;
setRotation(Shape3, 0.1745329F, 0F, 0F); setRotation(this.Shape3, 0.1745329F, 0F, 0F);
convertToChild(rightleg, Shape3); convertToChild(this.rightleg, this.Shape3);
Shape4 = new ModelRenderer(this, 18, 16); this.Shape4 = new ModelRenderer(this, 18, 16);
Shape4.addBox(0F, -6F, 0F, 5, 6, 4); this.Shape4.addBox(0F, -6F, 0F, 5, 6, 4);
Shape4.setRotationPoint(0F - 2, 10F - 0.5F, -2F); this.Shape4.setRotationPoint(0F - 2, 10F - 0.5F, -2F);
Shape4.setTextureSize(64, 32); this.Shape4.setTextureSize(64, 32);
Shape4.mirror = true; this.Shape4.mirror = true;
setRotation(Shape4, 0.1745329F, 0F, 0F); setRotation(this.Shape4, 0.1745329F, 0F, 0F);
convertToChild(leftleg, Shape4); convertToChild(this.leftleg, this.Shape4);
Shape5 = new ModelRenderer(this, 34, 0); this.Shape5 = new ModelRenderer(this, 34, 0);
Shape5.addBox(0F, 0F, 0F, 5, 2, 4); this.Shape5.addBox(0F, 0F, 0F, 5, 2, 4);
Shape5.setRotationPoint(-5F + 2, 1F - 0.5F, -3F); this.Shape5.setRotationPoint(-5F + 2, 1F - 0.5F, -3F);
Shape5.setTextureSize(64, 32); this.Shape5.setTextureSize(64, 32);
Shape5.mirror = true; this.Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F); setRotation(this.Shape5, 0F, 0F, 0F);
convertToChild(rightleg, Shape5); convertToChild(this.rightleg, this.Shape5);
Shape6 = new ModelRenderer(this, 34, 8); this.Shape6 = new ModelRenderer(this, 34, 8);
Shape6.addBox(0F, 0F, 0F, 5, 2, 4); this.Shape6.addBox(0F, 0F, 0F, 5, 2, 4);
Shape6.setRotationPoint(0F - 2, 1F - 0.5F, -3F); this.Shape6.setRotationPoint(0F - 2, 1F - 0.5F, -3F);
Shape6.setTextureSize(64, 32); this.Shape6.setTextureSize(64, 32);
Shape6.mirror = true; this.Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F); setRotation(this.Shape6, 0F, 0F, 0F);
convertToChild(leftleg, Shape6); convertToChild(this.leftleg, this.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;
} }
@Override @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.isSneak = entity.isSneaking();
this.isRiding = entity.isRiding(); 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.rotationPointX = this.bipedLeftLeg.rotationPointX;
this.leftleg.rotationPointY = this.bipedLeftLeg.rotationPointY - 1.5F; this.leftleg.rotationPointY = this.bipedLeftLeg.rotationPointY - 1.5F;
this.leftleg.rotationPointZ = this.bipedLeftLeg.rotationPointZ; this.leftleg.rotationPointZ = this.bipedLeftLeg.rotationPointZ;
@ -116,27 +103,35 @@ public class ModelT45Legs extends ModelBiped {
} }
@Override @Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glScalef(1.125F, 1.125F, 1.125F); 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(); 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 // move child rotation point to be relative to parent
parChild.rotationPointX -= parParent.rotationPointX; child.rotationPointX -= parent.rotationPointX;
parChild.rotationPointY -= parParent.rotationPointY; child.rotationPointY -= parent.rotationPointY;
parChild.rotationPointZ -= parParent.rotationPointZ; child.rotationPointZ -= parent.rotationPointZ;
// make rotations relative to parent // make rotations relative to parent
parChild.rotateAngleX -= parParent.rotateAngleX; child.rotateAngleX -= parent.rotateAngleX;
parChild.rotateAngleY -= parParent.rotateAngleY; child.rotateAngleY -= parent.rotateAngleY;
parChild.rotateAngleZ -= parParent.rotateAngleZ; child.rotateAngleZ -= parent.rotateAngleZ;
// create relationship // 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;
}
} }

View File

@ -11,17 +11,18 @@ import net.minecraft.util.MathHelper;
public class ModelTaintCrab extends ModelBase { public class ModelTaintCrab extends ModelBase {
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glRotatef(90, 0, -1, 0); GL11.glRotatef(90, 0, -1, 0);
GL11.glRotatef(180, 0, 0, 1); GL11.glRotatef(180, 0, 0, 1);
GL11.glTranslatef(0, -1.5F, 0); 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"); ResourceManager.taintcrab.renderPart("Body");
GL11.glPushMatrix(); GL11.glPushMatrix();
@ -33,7 +34,7 @@ public class ModelTaintCrab extends ModelBase {
GL11.glRotatef(rot, 0, -1, 0); GL11.glRotatef(rot, 0, -1, 0);
ResourceManager.taintcrab.renderPart("Legs2"); ResourceManager.taintcrab.renderPart("Legs2");
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -4,74 +4,59 @@ import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelTapeRecorder extends ModelBase 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);
}
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;
}
} }

View File

@ -11,16 +11,17 @@ import net.minecraft.util.MathHelper;
public class ModelTeslaCrab extends ModelBase { public class ModelTeslaCrab extends ModelBase {
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { 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);
super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glRotatef(180, 0, 0, 1); GL11.glRotatef(180, 0, 0, 1);
GL11.glTranslatef(0, -1.5F, 0); 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"); ResourceManager.teslacrab.renderPart("Body");
GL11.glPushMatrix(); GL11.glPushMatrix();
@ -32,8 +33,7 @@ public class ModelTeslaCrab extends ModelBase {
GL11.glRotatef(rot, 0, -1, 0); GL11.glRotatef(rot, 0, -1, 0);
ResourceManager.teslacrab.renderPart("Back"); ResourceManager.teslacrab.renderPart("Back");
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
} }

View File

@ -11,17 +11,17 @@ import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom; import net.minecraftforge.client.model.IModelCustom;
public class ModelWormHead extends ModelBase { public class ModelWormHead extends ModelBase {
public static final IModelCustom head = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mobs/bot_prime_head.obj")); public static final IModelCustom head = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mobs/bot_prime_head.obj"));
@Override @Override
public void render(Entity entity, float x, float y, float z, float f3, float f4, float f5) { public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
super.render(entity, x, y, z, f3, f4, f5);
super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
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); 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(); head.renderAll();
} }
} }

View File

@ -4,125 +4,102 @@
// Keep in mind that you still need to fill in some blanks // Keep in mind that you still need to fill in some blanks
// - ZeuX // - ZeuX
package com.hbm.render.model; package com.hbm.render.model;
import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ProtoCopter extends ModelBase 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;
int x = 0; ModelRenderer Shape1;
int z = -2; ModelRenderer Shape2;
ModelRenderer Shape3;
Shape1 = new ModelRenderer(this, 0, 0); ModelRenderer Shape4;
Shape1.addBox(0F, 0F, 0F, 16, 4, 4); ModelRenderer Shape5;
Shape1.setRotationPoint(-8F + x, 0F, 0F + z); ModelRenderer Shape6;
Shape1.setTextureSize(128, 64); ModelRenderer Shape7;
Shape1.mirror = true; ModelRenderer Shape8;
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);
}
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;
}
} }