From afd954b510e03d9318bc8f99dcd637ded3ba3905 Mon Sep 17 00:00:00 2001 From: Aidan Brady Date: Tue, 4 Feb 2014 23:06:33 -0500 Subject: [PATCH] Begin implementation of new AD model --- common/mekanism/client/ClientProxy.java | 1 + .../client/model/ModelAtomicDisassembler.java | 155 ++++++++++++++++++ .../render/item/ItemRenderingHandler.java | 9 + .../mekanism/render/AtomicDisassembler.png | Bin 0 -> 3876 bytes 4 files changed, 165 insertions(+) create mode 100644 common/mekanism/client/model/ModelAtomicDisassembler.java create mode 100644 resources/assets/mekanism/render/AtomicDisassembler.png diff --git a/common/mekanism/client/ClientProxy.java b/common/mekanism/client/ClientProxy.java index b3458e34e..1d8668d11 100644 --- a/common/mekanism/client/ClientProxy.java +++ b/common/mekanism/client/ClientProxy.java @@ -339,6 +339,7 @@ public class ClientProxy extends CommonProxy MinecraftForgeClient.registerItemRenderer(Mekanism.ScubaTank.itemID, handler); MinecraftForgeClient.registerItemRenderer(Mekanism.Balloon.itemID, handler); MinecraftForgeClient.registerItemRenderer(Mekanism.FrictionBoots.itemID, handler); + MinecraftForgeClient.registerItemRenderer(Mekanism.AtomicDisassembler.itemID, handler); //Register block handlers RenderingRegistry.registerBlockHandler(new MachineRenderingHandler()); diff --git a/common/mekanism/client/model/ModelAtomicDisassembler.java b/common/mekanism/client/model/ModelAtomicDisassembler.java new file mode 100644 index 000000000..83cbc1a15 --- /dev/null +++ b/common/mekanism/client/model/ModelAtomicDisassembler.java @@ -0,0 +1,155 @@ +package mekanism.client.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelAtomicDisassembler extends ModelBase +{ + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape5; + ModelRenderer Shape6; + ModelRenderer Shape7; + ModelRenderer Shape9; + ModelRenderer Shape16; + ModelRenderer Shape10; + ModelRenderer Shape3; + ModelRenderer Shape11; + ModelRenderer Shape4; + ModelRenderer Shape12; + ModelRenderer Shape13; + ModelRenderer Shape14; + ModelRenderer Shape15; + ModelRenderer Shape8; + + public ModelAtomicDisassembler() + { + textureWidth = 64; + textureHeight = 32; + + Shape1 = new ModelRenderer(this, 0, 10); + Shape1.addBox(0F, -1F, -3F, 1, 16, 1); + Shape1.setRotationPoint(0F, 0F, 0F); + Shape1.setTextureSize(64, 32); + Shape1.mirror = true; + setRotation(Shape1, 0F, 0F, 0F); + Shape2 = new ModelRenderer(this, 34, 9); + Shape2.addBox(-0.5F, -3.5F, -3.5F, 2, 5, 2); + Shape2.setRotationPoint(0F, 0F, 0F); + Shape2.setTextureSize(64, 32); + Shape2.mirror = true; + setRotation(Shape2, 0F, 0F, 0F); + Shape5 = new ModelRenderer(this, 42, 0); + Shape5.addBox(0F, -4F, -4F, 1, 2, 10); + Shape5.setRotationPoint(0F, 0F, 0F); + Shape5.setTextureSize(64, 32); + Shape5.mirror = true; + setRotation(Shape5, 0F, 0F, 0F); + Shape6 = new ModelRenderer(this, 24, 0); + Shape6.addBox(-5F, -5.7F, -5.5F, 3, 3, 6); + Shape6.setRotationPoint(0F, 0F, 0F); + Shape6.setTextureSize(64, 32); + Shape6.mirror = true; + setRotation(Shape6, 0F, 0F, 0.7853982F); + Shape7 = new ModelRenderer(this, 0, 0); + Shape7.addBox(-0.5F, -6F, -7F, 2, 2, 8); + Shape7.setRotationPoint(0F, 0F, 0F); + Shape7.setTextureSize(64, 32); + Shape7.mirror = true; + setRotation(Shape7, 0F, 0F, 0F); + Shape9 = new ModelRenderer(this, 60, 0); + Shape9.addBox(0F, -0.5333334F, -9.6F, 1, 3, 1); + Shape9.setRotationPoint(0F, 0F, 0F); + Shape9.setTextureSize(64, 32); + Shape9.mirror = true; + setRotation(Shape9, -0.7853982F, 0F, 0F); + Shape16 = new ModelRenderer(this, 58, 0); + Shape16.addBox(0F, -9.58F, -4F, 1, 5, 2); + Shape16.setRotationPoint(0F, 0F, 0F); + Shape16.setTextureSize(64, 32); + Shape16.mirror = true; + setRotation(Shape16, 0.7853982F, 0F, 0F); + Shape10 = new ModelRenderer(this, 12, 0); + Shape10.addBox(-0.5F, -8.2F, -2.5F, 2, 1, 1); + Shape10.setRotationPoint(0F, 0F, 0F); + Shape10.setTextureSize(64, 32); + Shape10.mirror = true; + setRotation(Shape10, 0.7853982F, 0F, 0F); + Shape3 = new ModelRenderer(this, 56, 0); + Shape3.addBox(0F, -2.44F, -6.07F, 1, 2, 3); + Shape3.setRotationPoint(0F, 0F, 0F); + Shape3.setTextureSize(64, 32); + Shape3.mirror = true; + setRotation(Shape3, 0F, 0F, 0F); + Shape11 = new ModelRenderer(this, 42, 14); + Shape11.addBox(-0.5F, -0.5F, 3.5F, 2, 1, 1); + Shape11.setRotationPoint(0F, -4F, 0F); + Shape11.setTextureSize(64, 32); + Shape11.mirror = true; + setRotation(Shape11, 0F, 0F, 0F); + Shape4 = new ModelRenderer(this, 30, 16); + Shape4.addBox(-0.5F, -3.5F, -1.5F, 2, 1, 4); + Shape4.setRotationPoint(0F, 0F, 0F); + Shape4.setTextureSize(64, 32); + Shape4.mirror = true; + setRotation(Shape4, 0F, 0F, 0F); + Shape12 = new ModelRenderer(this, 42, 12); + Shape12.addBox(-0.5F, -4.5F, 1.5F, 2, 1, 1); + Shape12.setRotationPoint(0F, 0F, 0F); + Shape12.setTextureSize(64, 32); + Shape12.mirror = true; + setRotation(Shape12, 0F, 0F, 0F); + Shape13 = new ModelRenderer(this, 4, 10); + Shape13.addBox(0F, -5.3F, 0F, 1, 1, 7); + Shape13.setRotationPoint(0F, 0F, 0F); + Shape13.setTextureSize(64, 32); + Shape13.mirror = true; + setRotation(Shape13, 0F, 0F, 0F); + Shape14 = new ModelRenderer(this, 60, 0); + Shape14.addBox(0F, -4F, 6F, 1, 1, 1); + Shape14.setRotationPoint(0F, 0F, 0F); + Shape14.setTextureSize(64, 32); + Shape14.mirror = true; + setRotation(Shape14, 0F, 0F, 0F); + Shape15 = new ModelRenderer(this, 26, 9); + Shape15.addBox(-0.5F, 15F, -3.5F, 2, 4, 2); + Shape15.setRotationPoint(0F, 0F, 0F); + Shape15.setTextureSize(64, 32); + Shape15.mirror = true; + setRotation(Shape15, 0F, 0F, 0F); + Shape8 = new ModelRenderer(this, 37, 0); + Shape8.addBox(0F, -2F, -2F, 1, 4, 1); + Shape8.setRotationPoint(0F, 0F, 0F); + Shape8.setTextureSize(64, 32); + Shape8.mirror = true; + setRotation(Shape8, 0F, 0F, 0F); + } + + public void render(float size) + { + Shape1.render(size); + Shape2.render(size); + Shape5.render(size); + Shape6.render(size); + Shape7.render(size); + Shape9.render(size); + Shape16.render(size); + Shape10.render(size); + Shape3.render(size); + Shape11.render(size); + Shape4.render(size); + Shape12.render(size); + Shape13.render(size); + Shape14.render(size); + Shape15.render(size); + Shape8.render(size); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) + { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } +} diff --git a/common/mekanism/client/render/item/ItemRenderingHandler.java b/common/mekanism/client/render/item/ItemRenderingHandler.java index 0252d1d4f..4c5f96621 100644 --- a/common/mekanism/client/render/item/ItemRenderingHandler.java +++ b/common/mekanism/client/render/item/ItemRenderingHandler.java @@ -4,6 +4,7 @@ import mekanism.api.EnumColor; import mekanism.api.energy.IEnergizedItem; import mekanism.client.ClientProxy; import mekanism.client.MekanismClient; +import mekanism.client.model.ModelAtomicDisassembler; import mekanism.client.model.ModelEnergyCube; import mekanism.client.model.ModelEnergyCube.ModelEnergyCore; import mekanism.client.model.ModelFrictionBoots; @@ -23,6 +24,7 @@ import mekanism.common.Mekanism; import mekanism.common.Tier.EnergyCubeTier; import mekanism.common.block.BlockMachine.MachineType; import mekanism.common.inventory.InventoryBin; +import mekanism.common.item.ItemAtomicDisassembler; import mekanism.common.item.ItemBalloon; import mekanism.common.item.ItemBlockBasic; import mekanism.common.item.ItemBlockMachine; @@ -72,6 +74,7 @@ public class ItemRenderingHandler implements IItemRenderer public ModelGasMask gasMask = new ModelGasMask(); public ModelScubaTank scubaTank = new ModelScubaTank(); public ModelFrictionBoots frictionBoots = new ModelFrictionBoots(); + public ModelAtomicDisassembler atomicDisassembler = new ModelAtomicDisassembler(); private final RenderBalloon balloonRenderer = new RenderBalloon(); private final RenderBin binRenderer = (RenderBin)TileEntityRenderer.instance.specialRendererMap.get(TileEntityBin.class); @@ -368,6 +371,12 @@ public class ItemRenderingHandler implements IItemRenderer balloonRenderer.render(((ItemBalloon)item.getItem()).getColor(item), 0, 1, 0); } } + else if(item.getItem() instanceof ItemAtomicDisassembler) + { + GL11.glRotatef(180, 0.0F, 0.0F, 1.0F); + Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "AtomicDisassembler.png")); + atomicDisassembler.render(0.0625F); + } else if(item.getItem() instanceof ItemPartTransmitter) { GL11.glTranslated(-0.5, -0.5, -0.5); diff --git a/resources/assets/mekanism/render/AtomicDisassembler.png b/resources/assets/mekanism/render/AtomicDisassembler.png new file mode 100644 index 0000000000000000000000000000000000000000..cf5d4d5bceee01277f1b29257291310ad3c9b098 GIT binary patch literal 3876 zcmV+<58LpGP)pPPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?f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