diff options
Diffstat (limited to 'src/main/java/gtPlusPlus/core/client')
4 files changed, 0 insertions, 393 deletions
diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelBatKing.java b/src/main/java/gtPlusPlus/core/client/model/ModelBatKing.java deleted file mode 100644 index b61027a6f5..0000000000 --- a/src/main/java/gtPlusPlus/core/client/model/ModelBatKing.java +++ /dev/null @@ -1,115 +0,0 @@ -package gtPlusPlus.core.client.model; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.entity.monster.EntityBatKing; - -@SideOnly(Side.CLIENT) -public class ModelBatKing extends ModelBase { - - private ModelRenderer batHead; - /** The body box of the bat model. */ - private ModelRenderer batBody; - /** The inner right wing box of the bat model. */ - private ModelRenderer batRightWing; - /** The inner left wing box of the bat model. */ - private ModelRenderer batLeftWing; - /** The outer right wing box of the bat model. */ - private ModelRenderer batOuterRightWing; - /** The outer left wing box of the bat model. */ - private ModelRenderer batOuterLeftWing; - - public ModelBatKing() { - this.textureWidth = 64; - this.textureHeight = 64; - - this.batHead = new ModelRenderer(this, 0, 0); - this.batHead.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6); - ModelRenderer modelrenderer = new ModelRenderer(this, 24, 0); - modelrenderer.addBox(-4.0F, -6.0F, -2.0F, 3, 4, 1); - this.batHead.addChild(modelrenderer); - ModelRenderer modelrenderer1 = new ModelRenderer(this, 24, 0); - modelrenderer1.mirror = true; - modelrenderer1.addBox(1.0F, -6.0F, -2.0F, 3, 4, 1); - this.batHead.addChild(modelrenderer1); - this.batBody = new ModelRenderer(this, 0, 16); - this.batBody.addBox(-3.0F, 4.0F, -3.0F, 6, 12, 6); - this.batBody.setTextureOffset(0, 34).addBox(-5.0F, 16.0F, 0.0F, 10, 6, 1); - this.batRightWing = new ModelRenderer(this, 42, 0); - this.batRightWing.addBox(-12.0F, 1.0F, 1.5F, 10, 16, 1); - this.batOuterRightWing = new ModelRenderer(this, 24, 16); - this.batOuterRightWing.setRotationPoint(-12.0F, 1.0F, 1.5F); - this.batOuterRightWing.addBox(-8.0F, 1.0F, 0.0F, 8, 12, 1); - this.batLeftWing = new ModelRenderer(this, 42, 0); - this.batLeftWing.mirror = true; - this.batLeftWing.addBox(2.0F, 1.0F, 1.5F, 10, 16, 1); - this.batOuterLeftWing = new ModelRenderer(this, 24, 16); - this.batOuterLeftWing.mirror = true; - this.batOuterLeftWing.setRotationPoint(12.0F, 1.0F, 1.5F); - this.batOuterLeftWing.addBox(0.0F, 1.0F, 0.0F, 8, 12, 1); - this.batBody.addChild(this.batRightWing); - this.batBody.addChild(this.batLeftWing); - this.batRightWing.addChild(this.batOuterRightWing); - this.batLeftWing.addChild(this.batOuterLeftWing); - } - - /** - * not actually sure this is size, is not used as of now, but the model would be recreated if the value changed and - * it seems a good match for a bats size - */ - public int getBatSize() { - return 72; - } - - /** - * Sets the models various rotation angles then renders the model. - */ - @Override - 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_) { - EntityBatKing entitybat = (EntityBatKing) p_78088_1_; - float f6; - - if (entitybat.getIsBatHanging()) { - f6 = (180F / (float) Math.PI); - this.batHead.rotateAngleX = p_78088_6_ / (180F / (float) Math.PI); - this.batHead.rotateAngleY = (float) Math.PI - p_78088_5_ / (180F / (float) Math.PI); - this.batHead.rotateAngleZ = (float) Math.PI; - this.batHead.setRotationPoint(0.0F, -2.0F, 0.0F); - this.batRightWing.setRotationPoint(-3.0F, 0.0F, 3.0F); - this.batLeftWing.setRotationPoint(3.0F, 0.0F, 3.0F); - this.batBody.rotateAngleX = (float) Math.PI; - this.batRightWing.rotateAngleX = -0.15707964F; - this.batRightWing.rotateAngleY = -((float) Math.PI * 2F / 5F); - this.batOuterRightWing.rotateAngleY = -1.7278761F; - this.batLeftWing.rotateAngleX = this.batRightWing.rotateAngleX; - this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY; - this.batOuterLeftWing.rotateAngleY = -this.batOuterRightWing.rotateAngleY; - } else { - f6 = (180F / (float) Math.PI); - this.batHead.rotateAngleX = p_78088_6_ / (180F / (float) Math.PI); - this.batHead.rotateAngleY = p_78088_5_ / (180F / (float) Math.PI); - this.batHead.rotateAngleZ = 0.0F; - this.batHead.setRotationPoint(0.0F, 0.0F, 0.0F); - this.batRightWing.setRotationPoint(0.0F, 0.0F, 0.0F); - this.batLeftWing.setRotationPoint(0.0F, 0.0F, 0.0F); - this.batBody.rotateAngleX = ((float) Math.PI / 4F) + MathHelper.cos(p_78088_4_ * 0.1F) * 0.15F; - this.batBody.rotateAngleY = 0.0F; - this.batRightWing.rotateAngleY = MathHelper.cos(p_78088_4_ * 1.3F) * (float) Math.PI * 0.25F; - this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY; - this.batOuterRightWing.rotateAngleY = this.batRightWing.rotateAngleY * 0.5F; - this.batOuterLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY * 0.5F; - } - - GL11.glScalef(4, 4, 4); - this.batHead.render(p_78088_7_); - this.batBody.render(p_78088_7_); - } -} diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelGiantChicken.java b/src/main/java/gtPlusPlus/core/client/model/ModelGiantChicken.java deleted file mode 100644 index 14ee51a35e..0000000000 --- a/src/main/java/gtPlusPlus/core/client/model/ModelGiantChicken.java +++ /dev/null @@ -1,111 +0,0 @@ -package gtPlusPlus.core.client.model; - -import net.minecraft.client.model.ModelChicken; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelGiantChicken extends ModelChicken { - - public ModelGiantChicken() { - byte b0 = 16; - this.head = new ModelRenderer(this, 0, 0); - this.head.addBox(-2.0F, -6.0F, -2.0F, 4, 6, 3, 0.0F); - this.head.setRotationPoint(0.0F, (float) (-1 + b0), -4.0F); - this.bill = new ModelRenderer(this, 14, 0); - this.bill.addBox(-2.0F, -4.0F, -4.0F, 4, 2, 2, 0.0F); - this.bill.setRotationPoint(0.0F, (float) (-1 + b0), -4.0F); - this.chin = new ModelRenderer(this, 14, 4); - this.chin.addBox(-1.0F, -2.0F, -3.0F, 2, 2, 2, 0.0F); - this.chin.setRotationPoint(0.0F, (float) (-1 + b0), -4.0F); - this.body = new ModelRenderer(this, 0, 9); - this.body.addBox(-3.0F, -4.0F, -3.0F, 6, 8, 6, 0.0F); - this.body.setRotationPoint(0.0F, (float) b0, 0.0F); - this.rightLeg = new ModelRenderer(this, 26, 0); - this.rightLeg.addBox(-1.0F, 0.0F, -3.0F, 3, 5, 3); - this.rightLeg.setRotationPoint(-2.0F, (float) (3 + b0), 1.0F); - this.leftLeg = new ModelRenderer(this, 26, 0); - this.leftLeg.addBox(-1.0F, 0.0F, -3.0F, 3, 5, 3); - this.leftLeg.setRotationPoint(1.0F, (float) (3 + b0), 1.0F); - this.rightWing = new ModelRenderer(this, 24, 13); - this.rightWing.addBox(0.0F, 0.0F, -3.0F, 1, 4, 6); - this.rightWing.setRotationPoint(-4.0F, (float) (-3 + b0), 0.0F); - this.leftWing = new ModelRenderer(this, 24, 13); - this.leftWing.addBox(-1.0F, 0.0F, -3.0F, 1, 4, 6); - this.leftWing.setRotationPoint(4.0F, (float) (-3 + b0), 0.0F); - } - - /** - * Sets the models various rotation angles then renders the model. - */ - @Override - 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_) { - this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); - - if (this.isChild) { - float f6 = 1.0F; - GL11.glPushMatrix(); - GL11.glTranslatef(0.0F, 0F, 0F); - this.head.render(p_78088_7_); - this.bill.render(p_78088_7_); - this.chin.render(p_78088_7_); - GL11.glPopMatrix(); - GL11.glPushMatrix(); - GL11.glScalef(1.0F * f6, 1.0F * f6, 1.0F * f6); - GL11.glTranslatef(0.0F, 0F, 0.0F); - this.body.render(p_78088_7_); - this.rightLeg.render(p_78088_7_); - this.leftLeg.render(p_78088_7_); - this.rightWing.render(p_78088_7_); - this.leftWing.render(p_78088_7_); - GL11.glPopMatrix(); - // super.render(p_78088_1_, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_); - } else { - float f6 = 2.0F; - GL11.glPushMatrix(); - GL11.glScalef(1.0F * f6, 1.0F * f6, 1.0F * f6); - GL11.glTranslatef(0.0F, -0.85F, 0F); - this.head.render(p_78088_7_); - this.bill.render(p_78088_7_); - this.chin.render(p_78088_7_); - GL11.glPopMatrix(); - GL11.glPushMatrix(); - GL11.glScalef(1.0F * f6, 1.0F * f6, 1.0F * f6); - GL11.glTranslatef(0.0F, -0.75F, 0.0F); - this.body.render(p_78088_7_); - this.rightLeg.render(p_78088_7_); - this.leftLeg.render(p_78088_7_); - this.rightWing.render(p_78088_7_); - this.leftWing.render(p_78088_7_); - GL11.glPopMatrix(); - } - } - - /** - * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms - * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how - * "far" arms and legs can swing at most. - */ - @Override - public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, - float p_78087_5_, float p_78087_6_, Entity p_78087_7_) { - this.head.rotateAngleX = p_78087_5_ / (180F / (float) Math.PI); - this.head.rotateAngleY = p_78087_4_ / (180F / (float) Math.PI); - this.bill.rotateAngleX = this.head.rotateAngleX; - this.bill.rotateAngleY = this.head.rotateAngleY; - this.chin.rotateAngleX = this.head.rotateAngleX; - this.chin.rotateAngleY = this.head.rotateAngleY; - this.body.rotateAngleX = ((float) Math.PI / 2F); - this.rightLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F) * 1.4F * p_78087_2_; - this.leftLeg.rotateAngleX = MathHelper.cos(p_78087_1_ * 0.6662F + (float) Math.PI) * 1.4F * p_78087_2_; - this.rightWing.rotateAngleZ = p_78087_3_; - this.leftWing.rotateAngleZ = -p_78087_3_; - } -} diff --git a/src/main/java/gtPlusPlus/core/client/renderer/RenderBatKing.java b/src/main/java/gtPlusPlus/core/client/renderer/RenderBatKing.java deleted file mode 100644 index 24cb3f1459..0000000000 --- a/src/main/java/gtPlusPlus/core/client/renderer/RenderBatKing.java +++ /dev/null @@ -1,152 +0,0 @@ -package gtPlusPlus.core.client.renderer; - -import static gregtech.api.enums.Mods.GTPlusPlus; - -import net.minecraft.client.renderer.entity.RenderLiving; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.client.model.ModelBatKing; -import gtPlusPlus.core.entity.monster.EntityBatKing; - -@SideOnly(Side.CLIENT) -public class RenderBatKing extends RenderLiving { - - private static final ResourceLocation batTextures = new ResourceLocation( - GTPlusPlus.ID + ":" + "textures/entity/batKing.png"); - - /** - * not actually sure this is size, is not used as of now, but the model would be recreated if the value changed and - * it seems a good match for a bats size - */ - private int renderedBatSize; - - public RenderBatKing() { - super(new ModelBatKing(), 0.7F); - this.renderedBatSize = (((ModelBatKing) this.mainModel).getBatSize()); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, - * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. - */ - public void doRender(EntityBatKing p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, - float p_76986_8_, float p_76986_9_) { - int i = ((ModelBatKing) this.mainModel).getBatSize(); - - if (i != this.renderedBatSize) { - this.renderedBatSize = i; - this.mainModel = new ModelBatKing(); - } - - super.doRender((EntityLiving) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - protected ResourceLocation getEntityTexture(EntityBatKing p_110775_1_) { - return batTextures; - } - - /** - * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: - * entityLiving, partialTickTime - */ - protected void preRenderCallback(EntityBatKing p_77041_1_, float p_77041_2_) { - GL11.glScalef(0.35F, 0.35F, 0.35F); - } - - /** - * Sets a simple glTranslate on a LivingEntity. - */ - protected void renderLivingAt(EntityBatKing p_77039_1_, double p_77039_2_, double p_77039_4_, double p_77039_6_) { - super.renderLivingAt(p_77039_1_, p_77039_2_, p_77039_4_, p_77039_6_); - } - - protected void rotateCorpse(EntityBatKing p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) { - if (!p_77043_1_.getIsBatHanging()) { - GL11.glTranslatef(0.0F, MathHelper.cos(p_77043_2_ * 0.3F) * 0.1F, 0.0F); - } else { - GL11.glTranslatef(0.0F, -0.1F, 0.0F); - } - - super.rotateCorpse(p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, - * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. - */ - @Override - public void doRender(EntityLiving p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, - float p_76986_8_, float p_76986_9_) { - this.doRender((EntityBatKing) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); - } - - /** - * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: - * entityLiving, partialTickTime - */ - @Override - protected void preRenderCallback(EntityLivingBase p_77041_1_, float p_77041_2_) { - this.preRenderCallback((EntityBatKing) p_77041_1_, p_77041_2_); - } - - @Override - protected void rotateCorpse(EntityLivingBase p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) { - this.rotateCorpse((EntityBatKing) p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_); - } - - /** - * Sets a simple glTranslate on a LivingEntity. - */ - @Override - protected void renderLivingAt(EntityLivingBase p_77039_1_, double p_77039_2_, double p_77039_4_, - double p_77039_6_) { - this.renderLivingAt((EntityBatKing) p_77039_1_, p_77039_2_, p_77039_4_, p_77039_6_); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, - * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. - */ - @Override - public void doRender(EntityLivingBase p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, - float p_76986_8_, float p_76986_9_) { - this.doRender((EntityBatKing) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); - } - - /** - * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. - */ - @Override - protected ResourceLocation getEntityTexture(Entity p_110775_1_) { - return this.getEntityTexture((EntityBatKing) p_110775_1_); - } - - /** - * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then - * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic - * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, - * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. - */ - @Override - public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, - float p_76986_9_) { - this.doRender((EntityBatKing) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); - } -} diff --git a/src/main/java/gtPlusPlus/core/client/renderer/RenderGiantChicken.java b/src/main/java/gtPlusPlus/core/client/renderer/RenderGiantChicken.java deleted file mode 100644 index 7a326de3c8..0000000000 --- a/src/main/java/gtPlusPlus/core/client/renderer/RenderGiantChicken.java +++ /dev/null @@ -1,15 +0,0 @@ -package gtPlusPlus.core.client.renderer; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.renderer.entity.RenderChicken; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class RenderGiantChicken extends RenderChicken { - - public RenderGiantChicken(ModelBase p_i1252_1_, float p_i1252_2_) { - super(p_i1252_1_, p_i1252_2_); - } -} |
