diff --git a/Change Log.txt b/Change Log.txt index 37e1e7c1..020c0124 100644 --- a/Change Log.txt +++ b/Change Log.txt @@ -1,4 +1,7 @@ -######## 1.0.2 ######## +######## 1.0.2-Snapshot 2 ######## +-fixed energy core crash when placed. + +######## 1.0.2-Snapshot 1 ######## -stabilized spawner's will now keep their original mob type when created. -mobs spawned by stabilized spawner are now allowed to despawn after 30 seconds. -increased the length and render distance of the particle generator beam. @@ -14,8 +17,13 @@ -fixed game freezing for a few seconds on startup. -energy core now stores its energy value as a long (fixes potential issues) -added draconium and awakened draconium blocks to the ore dictionary. +-made some adjustments to the armor. -implemented ore dictionary in recipes. +-added Flow Gates. +-added Draconic Reactor (WIP) -spawner blacklist config now actually works on the spawner as well as opposed to just preventing the soul drops. +-fixed energy relay recipe. +-fixed minor rendering bug in energy infuser GUI. ######## 1.0.1-Bugfix-c ######## -fixed crash when arrow from DE bow hits RFTools force field. diff --git a/LICENSE b/LICENSE index 42720ba4..14000ea5 100644 --- a/LICENSE +++ b/LICENSE @@ -2,4 +2,4 @@ ALL RIGHTS RESERVED. See the "README.md" file. -©2013-2014 brandon3055 +©2013-2015 brandon3055 diff --git a/VERSION.json b/VERSION.json index be0db70f..1d9df66e 100644 --- a/VERSION.json +++ b/VERSION.json @@ -1,3 +1,3 @@ -Version:1.0.1c -Snapshot:0 -ReleaseNote:Fixed crash with RFTools Force Field. +Version:1.0.2 +Snapshot:2 +ReleaseNote:The start of the 1.0.2 snapshots! diff --git a/VERSION.txt b/VERSION.txt index be0db70f..1d9df66e 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,3 +1,3 @@ -Version:1.0.1c -Snapshot:0 -ReleaseNote:Fixed crash with RFTools Force Field. +Version:1.0.2 +Snapshot:2 +ReleaseNote:The start of the 1.0.2 snapshots! diff --git a/build.properties b/build.properties index 139528da..8c0cafb7 100644 --- a/build.properties +++ b/build.properties @@ -1,5 +1,5 @@ minecraft_version=1.7.10 -mod_version=1.0.1d_privateServerFix +mod_version=1.0.2-Snapshot_2 forge_version=10.13.3.1403-1.7.10 CCLIB_version=1.1.1.99 NEI_version=1.0.3.74 diff --git a/src/main/java/com/brandon3055/draconicevolution/DraconicEvolution.java b/src/main/java/com/brandon3055/draconicevolution/DraconicEvolution.java index 50918aaf..22aa26db 100644 --- a/src/main/java/com/brandon3055/draconicevolution/DraconicEvolution.java +++ b/src/main/java/com/brandon3055/draconicevolution/DraconicEvolution.java @@ -21,7 +21,7 @@ import java.util.Arrays; "after:NotEnoughItems;" + "after:ThermalExpansion;" + "after:ThermalFoundation;" + - "required-after:BrandonsCore@[1.0.0.1,);") + "required-after:BrandonsCore@[1.0.0.6,);") public class DraconicEvolution { @Mod.Instance(References.MODID) @@ -36,7 +36,7 @@ public class DraconicEvolution { public static final String networkChannelName = "DEvolutionNC"; public static SimpleNetworkWrapper network; - public static boolean debug = true;//todo + public static boolean debug = false;//todo public static Enchantment reaperEnchant; diff --git a/src/main/java/com/brandon3055/draconicevolution/client/ClientProxy.java b/src/main/java/com/brandon3055/draconicevolution/client/ClientProxy.java index f6445d49..cffaa3b9 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/ClientProxy.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/ClientProxy.java @@ -10,6 +10,7 @@ import com.brandon3055.draconicevolution.client.keybinding.KeyInputHandler; import com.brandon3055.draconicevolution.client.render.block.*; import com.brandon3055.draconicevolution.client.render.entity.RenderDragon; import com.brandon3055.draconicevolution.client.render.entity.RenderDragonHeart; +import com.brandon3055.draconicevolution.client.render.item.RenderArmor; import com.brandon3055.draconicevolution.client.render.item.RenderBow; import com.brandon3055.draconicevolution.client.render.item.RenderMobSoul; import com.brandon3055.draconicevolution.client.render.particle.ParticleEnergyBeam; @@ -138,6 +139,16 @@ public class ClientProxy extends CommonProxy { MinecraftForgeClient.registerItemRenderer(ModItems.wyvernBow, new RenderBow()); MinecraftForgeClient.registerItemRenderer(ModItems.draconicBow, new RenderBow()); MinecraftForgeClient.registerItemRenderer(ModItems.mobSoul, new RenderMobSoul()); + + MinecraftForgeClient.registerItemRenderer(ModItems.wyvernHelm, new RenderArmor(ModItems.wyvernHelm)); + MinecraftForgeClient.registerItemRenderer(ModItems.wyvernChest, new RenderArmor(ModItems.wyvernChest)); + MinecraftForgeClient.registerItemRenderer(ModItems.wyvernLeggs, new RenderArmor(ModItems.wyvernLeggs)); + MinecraftForgeClient.registerItemRenderer(ModItems.wyvernBoots, new RenderArmor(ModItems.wyvernBoots)); + MinecraftForgeClient.registerItemRenderer(ModItems.draconicHelm, new RenderArmor(ModItems.draconicHelm)); + MinecraftForgeClient.registerItemRenderer(ModItems.draconicChest, new RenderArmor(ModItems.draconicChest)); + MinecraftForgeClient.registerItemRenderer(ModItems.draconicLeggs, new RenderArmor(ModItems.draconicLeggs)); + MinecraftForgeClient.registerItemRenderer(ModItems.draconicBoots, new RenderArmor(ModItems.draconicBoots)); + MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.draconiumChest), new RenderDraconiumChest()); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.particleGenerator), new RenderParticleGen()); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.energyInfuser), new RenderEnergyInfuser()); diff --git a/src/main/java/com/brandon3055/draconicevolution/client/gui/GUIEnergyInfuser.java b/src/main/java/com/brandon3055/draconicevolution/client/gui/GUIEnergyInfuser.java index 6c1df9f3..e85539ef 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/gui/GUIEnergyInfuser.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/gui/GUIEnergyInfuser.java @@ -1,8 +1,8 @@ package com.brandon3055.draconicevolution.client.gui; import cofh.api.energy.IEnergyContainerItem; -import com.brandon3055.draconicevolution.common.container.ContainerEnergyInfuser; import com.brandon3055.brandonscore.client.utills.GuiHelper; +import com.brandon3055.draconicevolution.common.container.ContainerEnergyInfuser; import com.brandon3055.draconicevolution.common.lib.References; import com.brandon3055.draconicevolution.common.tileentities.TileEnergyInfuser; import cpw.mods.fml.relauncher.Side; @@ -14,6 +14,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; import org.lwjgl.opengl.GL11; import java.util.ArrayList; @@ -63,7 +64,7 @@ public class GUIEnergyInfuser extends GuiContainer { protected void drawGuiContainerForegroundLayer(int x, int y) { fontRendererObj.drawStringWithShadow("Energy Infuser", 49, -9, 0x00FFFF); - drawEnergyBarHoverText(x - guiLeft, y - guiTop); + //bindTexture(texture); //fontRendererObj.drawString("Charges: " + charges, 90, 25, 0x000000); @@ -72,6 +73,12 @@ public class GUIEnergyInfuser extends GuiContainer { } + @Override + public void drawScreen(int x, int y, float p_73863_3_) { + super.drawScreen(x, y, p_73863_3_); + drawEnergyBarHoverText(x - guiLeft, y - guiTop); + } + @Override public void initGui() { super.initGui(); @@ -95,17 +102,21 @@ public class GUIEnergyInfuser extends GuiContainer { private void drawEnergyBarHoverText(int x, int y) { if (GuiHelper.isInRect(48, 6, 9, 46, x, y)) { ArrayList internal = new ArrayList(); - internal.add("Internal Storage"); + internal.add(StatCollector.translateToLocal("gui.de.internalStorage.txt")); internal.add("" + EnumChatFormatting.DARK_BLUE + tile.energy.getEnergyStored() + "/" + tile.energy.getMaxEnergyStored()); - drawHoveringText(internal, x, y, fontRendererObj); + GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); + drawHoveringText(internal, x + guiLeft, y + guiTop, fontRendererObj); + GL11.glPopAttrib(); } if (GuiHelper.isInRect(118, 6, 10, 46, x, y) && tile.running && tile.getStackInSlot(0) != null && tile.getStackInSlot(0).getItem() instanceof IEnergyContainerItem) { IEnergyContainerItem item = (IEnergyContainerItem) tile.getStackInSlot(0).getItem(); ArrayList internal = new ArrayList(); - internal.add("Item Energy Storage"); + internal.add(StatCollector.translateToLocal("gui.de.itemStorage.txt")); internal.add("" + EnumChatFormatting.DARK_BLUE + item.getEnergyStored(tile.getStackInSlot(0)) + "/" + item.getMaxEnergyStored(tile.getStackInSlot(0))); - drawHoveringText(internal, x, y, fontRendererObj); + GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); + drawHoveringText(internal, x + guiLeft, y + guiTop, fontRendererObj); + GL11.glPopAttrib(); } } diff --git a/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIReactor.java b/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIReactor.java index ef7cfe0a..b5292945 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIReactor.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIReactor.java @@ -134,7 +134,7 @@ public class GUIReactor extends GUIBase { @Override public void updateScreen() { - if (reactor.reactorState == TileReactorCore.STATE_OFFLINE || reactor.reactorState == TileReactorCore.STATE_STOP) collection.getComponent("DEACTIVATE").setEnabled(false); + if (reactor.reactorState == TileReactorCore.STATE_INVALID || reactor.reactorState == TileReactorCore.STATE_OFFLINE || reactor.reactorState == TileReactorCore.STATE_STOP) collection.getComponent("DEACTIVATE").setEnabled(false); else collection.getComponent("DEACTIVATE").setEnabled(true); if ((reactor.reactorState == TileReactorCore.STATE_OFFLINE || (reactor.reactorState == TileReactorCore.STATE_STOP && !reactor.canStart())) && reactor.reactorFuel > 0) collection.getComponent("CHARGE").setEnabled(true); else collection.getComponent("CHARGE").setEnabled(false); diff --git a/src/main/java/com/brandon3055/draconicevolution/client/gui/guicomponents/ComponentBase.java b/src/main/java/com/brandon3055/draconicevolution/client/gui/guicomponents/ComponentBase.java index c9ddf429..d8fcc45c 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/gui/guicomponents/ComponentBase.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/gui/guicomponents/ComponentBase.java @@ -176,7 +176,8 @@ public abstract class ComponentBase extends Gui { GL11.glPushMatrix(); GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glEnable(GL11.GL_DEPTH_TEST); + GL11.glTranslatef(0.0F, 0.0F, 32.0F); this.zLevel = 200.0F; @@ -190,8 +191,8 @@ public abstract class ComponentBase extends Gui { this.zLevel = 0.0F; itemRender.zLevel = 0.0F; - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_DEPTH_TEST); + //GL11.glEnable(GL11.GL_LIGHTING); + //GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glPopAttrib(); GL11.glPopMatrix(); } diff --git a/src/main/java/com/brandon3055/draconicevolution/client/model/ModelDraconicArmor.java b/src/main/java/com/brandon3055/draconicevolution/client/model/ModelDraconicArmor.java new file mode 100644 index 00000000..f2a9db10 --- /dev/null +++ b/src/main/java/com/brandon3055/draconicevolution/client/model/ModelDraconicArmor.java @@ -0,0 +1,696 @@ +package com.brandon3055.draconicevolution.client.model; + +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +/** + * Draconic Armor.tcn - TechneToTabulaImporter + * Created using Tabula 5.0.0 + */ +public class ModelDraconicArmor extends ModelBiped { +// public ModelRenderer bipedHead; +// public ModelRenderer bipedBody; +// public ModelRenderer bipedRightArm; +// public ModelRenderer bipedLeftArm; +// public ModelRenderer bipedRightLeg;/ +// public ModelRenderer bipedLeftLeg; + public ModelRenderer MainHelmPieceRight1; + public ModelRenderer MainHelmPieceRight2; + public ModelRenderer MainHelmPieceLeft1; + public ModelRenderer MainHelmPieceLeft2; + public ModelRenderer MainHelmPieceRight3; + public ModelRenderer MainHelmPieceLeft3; + public ModelRenderer MainHelmPieceBack; + public ModelRenderer MainHelmPieceTop; + public ModelRenderer MainHelmPieceFrontTop; + public ModelRenderer MainHelmPieceFrontBottom; + public ModelRenderer MainHelmPieceBottom; + public ModelRenderer HelmPieceBack1; + public ModelRenderer HornPieceRight1; + public ModelRenderer HornPieceRight2; + public ModelRenderer HornPieceLeft1; + public ModelRenderer HornPieceLeft2; + public ModelRenderer HornPieceRight3; + public ModelRenderer HornPieceLeft3; + public ModelRenderer HornPieceRight4; + public ModelRenderer HornPieceLeft4; + public ModelRenderer HelmPieceFront1; + public ModelRenderer HelmPieceFront2; + public ModelRenderer MainChestPieceBottom; + public ModelRenderer ChestDecorationPiece2; + public ModelRenderer ChestDecorationPiece4; + public ModelRenderer ShoulderPadRight2; + public ModelRenderer ShoulderPadRight3; + public ModelRenderer ShoulderPadRight4; + public ModelRenderer ShoulderPadRight1; + public ModelRenderer MainArmGuardRight; + public ModelRenderer ArmGuardPieceRight1; + public ModelRenderer ArmGuardPieceRight2; + public ModelRenderer ArmGuardPieceRight3; + public ModelRenderer ArmGuardPieceRight4; + public ModelRenderer ArmStrapRightTop; + public ModelRenderer ArmStrapRightBottom; + public ModelRenderer ShoulderPadLeft2; + public ModelRenderer ShoulderPadLeft3; + public ModelRenderer ShoulderPadLeft4; + public ModelRenderer MainArmGuardLeft; + public ModelRenderer ShoulderPadLeft1; + public ModelRenderer ArmGuardPieceLeft1; + public ModelRenderer ArmGuardPieceLeft2; + public ModelRenderer ArmGuardPieceLeft3; + public ModelRenderer ArmGuardPieceLeft4; + public ModelRenderer ArmStrapLeftBottom; + public ModelRenderer ArmStrapLeftTop; + public ModelRenderer MainLegPieceRight; + public ModelRenderer LegPieceRight1; + public ModelRenderer LegPieceRight2; + public ModelRenderer MainBootPieceRight; + public ModelRenderer BootPieceRight1; + public ModelRenderer BootPieceRight2; + public ModelRenderer MainKneePadRight; + public ModelRenderer KneePieceRight1; + public ModelRenderer MainLegPieceLeft; + public ModelRenderer LegPieceLeft2; + public ModelRenderer LegPieceLeft1; + public ModelRenderer MainBootPieceLeft; + public ModelRenderer BootPieceLeft1; + public ModelRenderer BootPieceLeft2; + public ModelRenderer MainKneePadLeft; + public ModelRenderer KneePieceLeft1; + public ModelRenderer BootPieceLeft3; + public ModelRenderer BootPieceLeft4; + public ModelRenderer BootPieceRight3; + public ModelRenderer BootPieceRight4; + public ModelRenderer LeggsTop; + + //Draconic Specific + public ModelRenderer DrMainChestPieceTop; + public ModelRenderer DrMainChestPieceMid; + public ModelRenderer DrChestDecorationPiece1; + public ModelRenderer DrChestDecorationPiece3; + public ModelRenderer BeltFront; + public ModelRenderer BeltBack; + public ModelRenderer BeltLeft; + public ModelRenderer BeltRight; + public ModelRenderer BeltBuckle; + //Wyvern Specific + public ModelRenderer WyHelmPieceTop1; + public ModelRenderer WyHelmPieceTop2; + public ModelRenderer WyHelmPieceTop3; + public ModelRenderer WyHelmPieceTop4; + public ModelRenderer WyMainChestPieceMid; + public ModelRenderer WyChestPieceTop1; + public ModelRenderer WyChestPieceTop2; + public ModelRenderer WyChestDecorationPiece3; + public ModelRenderer WyChestPieceTop3; + + private boolean isDraconic; + + public ModelDraconicArmor(float f, boolean isHelmet, boolean isChestPiece, boolean isLeggings, boolean isdBoots, boolean isDraconic) { + super(f, 0.0f, 128, 128); + this.textureWidth = 256; + this.textureHeight = 128; + this.isDraconic = isDraconic; + + /* Helm */ + { + this.bipedHead = new ModelRenderer(this, 0, 0); + this.bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F); + this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F); + + this.MainHelmPieceLeft1 = new ModelRenderer(this, 191, 0); + this.MainHelmPieceLeft1.setRotationPoint(3.5F, -3.0F, -4.5F); + this.MainHelmPieceLeft1.addBox(0.0F, 0.0F, 0.0F, 1, 3, 9, 0.0F); + + this.HelmPieceFront2 = new ModelRenderer(this, 177, 43); + this.HelmPieceFront2.setRotationPoint(-0.5F, -5.5F, -4.5F); + this.HelmPieceFront2.addBox(0.0F, 0.0F, 0.0F, 1, 1, 1, 0.0F); + + this.MainHelmPieceRight2 = new ModelRenderer(this, 170, 0); + this.MainHelmPieceRight2.setRotationPoint(-4.5F, -8.0F, -4.5F); + this.MainHelmPieceRight2.addBox(0.0F, 0.0F, 0.0F, 1, 2, 9, 0.0F); + + this.MainHelmPieceTop = new ModelRenderer(this, 177, 24); + this.MainHelmPieceTop.mirror = true; + this.MainHelmPieceTop.setRotationPoint(-4.0F, -8.300000190734863F, -4.5F); + this.MainHelmPieceTop.addBox(0.0F, 0.0F, 0.0F, 8, 1, 9, 0.0F); + this.setRotateAngle(MainHelmPieceTop, 0.05235987901687623F, -0.0F, 0.0F); + + this.MainHelmPieceFrontBottom = new ModelRenderer(this, 174, 35); + this.MainHelmPieceFrontBottom.setRotationPoint(-4.0F, -3.0F, -5.0F); + this.MainHelmPieceFrontBottom.addBox(0.0F, 0.0F, 0.0F, 8, 3, 1, 0.0F); + + this.MainHelmPieceLeft2 = new ModelRenderer(this, 170, 0); + this.MainHelmPieceLeft2.setRotationPoint(3.5F, -8.0F, -4.5F); + this.MainHelmPieceLeft2.addBox(0.0F, 0.0F, 0.0F, 1, 2, 9, 0.0F); + + this.HelmPieceBack1 = new ModelRenderer(this, 193, 39); + this.HelmPieceBack1.setRotationPoint(-4.0F, -8.0F, 4.0F); + this.HelmPieceBack1.addBox(0.0F, 0.0F, 0.0F, 8, 8, 1, 0.0F); + + this.MainHelmPieceLeft3 = new ModelRenderer(this, 195, 13); + this.MainHelmPieceLeft3.setRotationPoint(3.5F, -6.0F, -2.5F); + this.MainHelmPieceLeft3.addBox(0.0F, 0.0F, 0.0F, 1, 3, 7, 0.0F); + + this.MainHelmPieceRight1 = new ModelRenderer(this, 191, 0); + this.MainHelmPieceRight1.setRotationPoint(-4.5F, -3.0F, -4.5F); + this.MainHelmPieceRight1.addBox(0.0F, 0.0F, 0.0F, 1, 3, 9, 0.0F); + + this.MainHelmPieceBack = new ModelRenderer(this, 178, 13); + this.MainHelmPieceBack.setRotationPoint(-3.5F, -8.0F, 3.5F); + this.MainHelmPieceBack.addBox(0.0F, 0.0F, 0.0F, 7, 8, 1, 0.0F); + + this.MainHelmPieceRight3 = new ModelRenderer(this, 195, 13); + this.MainHelmPieceRight3.setRotationPoint(-4.5F, -6.0F, -2.5F); + this.MainHelmPieceRight3.addBox(0.0F, 0.0F, 0.0F, 1, 3, 7, 0.0F); + + this.HelmPieceFront1 = new ModelRenderer(this, 175, 40); + this.HelmPieceFront1.setRotationPoint(-1.0F, -6.0F, -5.0F); + this.HelmPieceFront1.addBox(0.0F, 0.0F, 0.0F, 2, 1, 1, 0.0F); + + this.MainHelmPieceBottom = new ModelRenderer(this, 177, 24); + this.MainHelmPieceBottom.setRotationPoint(-4.0F, -0.5F, -4.5F); + this.MainHelmPieceBottom.addBox(0.0F, 0.0F, 0.0F, 8, 1, 9, 0.0F); + + this.MainHelmPieceFrontTop = new ModelRenderer(this, 193, 35); + this.MainHelmPieceFrontTop.setRotationPoint(-4.0F, -8.0F, -5.0F); + this.MainHelmPieceFrontTop.addBox(0.0F, 0.0F, 0.0F, 8, 2, 1, 0.0F); + + + this.HornPieceLeft1 = new ModelRenderer(this, 182, 40); + this.HornPieceLeft1.setRotationPoint(4.0F, -7.5F, -1.0F); + this.HornPieceLeft1.addBox(0.0F, 0.0F, 0.0F, 1, 4, 4, 0.0F); + + this.HornPieceLeft2 = new ModelRenderer(this, 201, 49); + this.HornPieceLeft2.setRotationPoint(4.6F, -5.5F, 1.03F); + this.HornPieceLeft2.addBox(0.0F, -1.5F, -1.5F, 2, 3, 3, 0.0F); + this.setRotateAngle(HornPieceLeft2, 0.0F, -0.0F, -0.13962634015954636F); + + this.HornPieceLeft3 = new ModelRenderer(this, 190, 49); + this.HornPieceLeft3.setRotationPoint(6.1F, -5.6F, 1.0F); + this.HornPieceLeft3.addBox(0.0F, -1.0F, -1.0F, 3, 2, 2, 0.0F); + this.setRotateAngle(HornPieceLeft3, 0.0F, -0.0F, -0.5235987755982988F); + + this.HornPieceRight1 = new ModelRenderer(this, 182, 40); + this.HornPieceRight1.setRotationPoint(-5.0F, -7.5F, -1.0F); + this.HornPieceRight1.addBox(0.0F, 0.0F, 0.0F, 1, 4, 4, 0.0F); + + this.HornPieceRight2 = new ModelRenderer(this, 201, 49); + this.HornPieceRight2.setRotationPoint(-4.6F, -5.5F, 1.03F); + this.HornPieceRight2.addBox(0.0F, -1.5F, -1.5F, 2, 3, 3, 0.0F); + this.setRotateAngle(HornPieceRight2, 0.0F, -0.0F, -3.001966313430247F); + + this.HornPieceRight3 = new ModelRenderer(this, 190, 49); + this.HornPieceRight3.setRotationPoint(-6.1F, -5.6F, 1.0F); + this.HornPieceRight3.addBox(0.0F, -1.0F, -1.0F, 3, 2, 2, 0.0F); + this.setRotateAngle(HornPieceRight3, 0.0F, -0.0F, -2.6179938779914944F); + + this.HornPieceLeft4 = new ModelRenderer(this, 181, 49); + this.HornPieceLeft4.setRotationPoint(8.2F, -6.7F, 1.0F); + this.HornPieceLeft4.addBox(0.0F, -0.5F, -0.5F, 3, 1, 1, 0.0F); + this.setRotateAngle(HornPieceLeft4, 0.0F, -0.0F, -0.8726646259971648F); + + this.HornPieceRight4 = new ModelRenderer(this, 181, 49); + this.HornPieceRight4.setRotationPoint(-8.2F, -6.7F, 1.0F); + this.HornPieceRight4.addBox(0.0F, -0.5F, -0.5F, 3, 1, 1, 0.0F); + this.setRotateAngle(HornPieceRight4, 0.0F, -0.0F, -2.2689280275926285F); + + this.WyHelmPieceTop1 = new ModelRenderer(this, 181, 49); + this.WyHelmPieceTop1.setRotationPoint(-0.5F, -8.5F, -4.5F); + this.WyHelmPieceTop1.addBox(0.0F, 0.0F, 0.0F, 1, 1, 3, 0.0F); + this.setRotateAngle(WyHelmPieceTop1, 0.2792526803190927F, -0.0F, 0.0F); + + this.WyHelmPieceTop2 = new ModelRenderer(this, 201, 56); + this.WyHelmPieceTop2.setRotationPoint(-1.0F, -10.0F, -2.0F); + this.WyHelmPieceTop2.addBox(0.0F, 0.0F, 0.0F, 2, 2, 3, 0.0F); + this.setRotateAngle(WyHelmPieceTop2, 0.08726646259971647F, -0.0F, 0.0F); + + this.WyHelmPieceTop3 = new ModelRenderer(this, 188, 54); + this.WyHelmPieceTop3.setRotationPoint(-1.5F, -11.0F, 1.0F); + this.WyHelmPieceTop3.addBox(0.0F, 0.0F, 0.0F, 3, 3, 3, 0.0F); + this.setRotateAngle(WyHelmPieceTop3, -0.2792526803190927F, -0.0F, 0.0F); + + this.WyHelmPieceTop4 = new ModelRenderer(this, 179, 54); + this.WyHelmPieceTop4.setRotationPoint(-0.5F, -10.0F, 1.5F); + this.WyHelmPieceTop4.addBox(0.0F, 0.0F, 0.0F, 1, 1, 3, 0.0F); + this.setRotateAngle(WyHelmPieceTop4, -0.20943951023931953F, -0.0F, 0.0F); + } + + /* Chest */ + { + this.bipedBody = new ModelRenderer(this, 16, 16); + this.bipedBody.setRotationPoint(0.0F, 0.0F, 0.0F); + this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.0F); + + this.DrMainChestPieceTop = new ModelRenderer(this, 214, 0); + this.DrMainChestPieceTop.setRotationPoint(-5.5F, -0.5F, -5.0F); + this.DrMainChestPieceTop.addBox(0.0F, 0.0F, 0.0F, 11, 4, 10, 0.0F); + this.setRotateAngle(DrMainChestPieceTop, 0.15707963705062866F, -0.0F, 0.0F); + + this.DrMainChestPieceMid = new ModelRenderer(this, 224, 15); + this.DrMainChestPieceMid.setRotationPoint(-5.0F, 2.0F, -3.0F); + this.DrMainChestPieceMid.addBox(0.0F, 0.0F, 0.0F, 10, 5, 6, 0.0F); + + this.WyChestPieceTop3 = new ModelRenderer(this, 239, 0); + this.WyChestPieceTop3.setRotationPoint(-3.5F, 4.5F, -3.5F); + this.WyChestPieceTop3.addBox(1.0F, 0.0F, 0.0F, 4, 4, 1, 0.0F); + this.setRotateAngle(WyChestPieceTop3, 0.0879645943005142F, 0.08621926504851989F, -0.7890633548266364F); + + this.MainChestPieceBottom = new ModelRenderer(this, 228, 27); + this.MainChestPieceBottom.setRotationPoint(-4.5F, 7.0F, -2.5F); + this.MainChestPieceBottom.addBox(0.0F, 0.0F, 0.0F, 9, 5, 5, 0.0F); + + this.DrChestDecorationPiece1 = new ModelRenderer(this, 244, 38); + this.DrChestDecorationPiece1.setRotationPoint(0.0F, -0.5F, -4.0F); + this.DrChestDecorationPiece1.addBox(0.0F, 0.0F, -0.5F, 5, 5, 1, 0.0F); + this.setRotateAngle(DrChestDecorationPiece1, 0.1426609064282019F, -0.13533507716461618F, 0.7946695004338321F); + + this.ChestDecorationPiece2 = new ModelRenderer(this, 229, 38); + this.ChestDecorationPiece2.setRotationPoint(-3.0F, 7.0F, -3.0F); + this.ChestDecorationPiece2.addBox(0.0F, 0.0F, 0.0F, 6, 3, 1, 0.0F); + this.setRotateAngle(ChestDecorationPiece2, 0.12217304855585097F, -0.0F, 0.0F); + + this.DrChestDecorationPiece3 = new ModelRenderer(this, 236, 45); + this.DrChestDecorationPiece3.setRotationPoint(-4.0F, 1.0F, 3.0F); + this.DrChestDecorationPiece3.addBox(0.0F, 0.0F, 0.0F, 8, 5, 2, 0.0F); + this.setRotateAngle(DrChestDecorationPiece3, -0.39211732149124146F, -0.0F, 0.0F); + + this.ChestDecorationPiece4 = new ModelRenderer(this, 229, 38); + this.ChestDecorationPiece4.setRotationPoint(-3.0F, 6.800000190734863F, 2.0F); + this.ChestDecorationPiece4.addBox(0.0F, 0.0F, 0.0F, 6, 3, 1, 0.0F); + this.setRotateAngle(ChestDecorationPiece4, -0.12217304855585097F, -0.0F, 0.0F); + + this.WyMainChestPieceMid = new ModelRenderer(this, 224, 13); + this.WyMainChestPieceMid.setRotationPoint(-5.0F, -0.1F, -3.0F); + this.WyMainChestPieceMid.addBox(0.0F, 0.0F, 0.0F, 10, 7, 6, 0.0F); + + this.WyChestPieceTop2 = new ModelRenderer(this, 250, 0); + this.WyChestPieceTop2.setRotationPoint(2.1F, 0.0F, -4.4F); + this.WyChestPieceTop2.addBox(1.0F, 0.0F, 0.0F, 2, 4, 1, 0.0F); + this.setRotateAngle(WyChestPieceTop2, 0.0F, -0.47123889803846897F, 0.0F); + + this.WyChestPieceTop1 = new ModelRenderer(this, 240, 6); + this.WyChestPieceTop1.setRotationPoint(-4.0F, 0.0F, -4.0F); + this.WyChestPieceTop1.addBox(1.0F, 0.0F, 0.0F, 6, 4, 2, 0.0F); + + this.WyChestDecorationPiece3 = new ModelRenderer(this, 236, 45); + this.WyChestDecorationPiece3.setRotationPoint(-3.5F, 0.0F, 2.5F); + this.WyChestDecorationPiece3.addBox(0.0F, 0.0F, 0.0F, 7, 5, 2, 0.0F); + this.setRotateAngle(WyChestDecorationPiece3, -0.2617993877991494F, -0.0F, 0.0F); + + this.BeltFront = new ModelRenderer(this, 121, 25); + this.BeltFront.setRotationPoint(0.5F, 10.01F, -2.0F); + this.BeltFront.addBox(-5.0F, 0.0F, -0.7F, 9, 2, 1, 0.0F); + + this.BeltBuckle = new ModelRenderer(this, 121, 29); + this.BeltBuckle.setRotationPoint(3.5F, 10.0F, -2.2F); + this.BeltBuckle.addBox(-5.0F, 0.0F, -0.7F, 3, 2, 1, 0.0F); + + this.BeltBack = new ModelRenderer(this, 121, 25); + this.BeltBack.setRotationPoint(0.5F, 10.01F, 2.0F); + this.BeltBack.addBox(-5.0F, 0.0F, -0.3F, 9, 2, 1, 0.0F); + + this.BeltRight = new ModelRenderer(this, 142, 25); + this.BeltRight.setRotationPoint(-4.7F, 10.01F, -2.2F); + this.BeltRight.addBox(0.0F, 0.0F, -0.3F, 1, 2, 5, 0.0F); + + this.BeltLeft = new ModelRenderer(this, 142, 25); + this.BeltLeft.setRotationPoint(3.7F, 10.01F, -2.2F); + this.BeltLeft.addBox(0.0F, 0.0F, -0.3F, 1, 2, 5, 0.0F); + + //Left + this.bipedLeftArm = new ModelRenderer(this, 40, 16); + this.bipedLeftArm.setRotationPoint(5.0F, 2.0F, 0.0F); + this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.0F); + + this.ShoulderPadLeft1 = new ModelRenderer(this, 236, 53); + this.ShoulderPadLeft1.setRotationPoint(-1.5F, -2.0F, -2.5F); + this.ShoulderPadLeft1.addBox(0.0F, 0.0F, 0.0F, 5, 4, 5, 0.0F); + + this.ShoulderPadLeft2 = new ModelRenderer(this, 232, 63); + this.ShoulderPadLeft2.setRotationPoint(-1.0F, -2.5F, -3.0F); + this.ShoulderPadLeft2.addBox(-0.3F, 0.0F, 0.0F, 6, 2, 6, 0.0F); + this.setRotateAngle(ShoulderPadLeft2, 0.0F, -0.0F, 0.3665191429188092F); + + this.ShoulderPadLeft3 = new ModelRenderer(this, 215, 53); + this.ShoulderPadLeft3.mirror = true; + this.ShoulderPadLeft3.setRotationPoint(-1.0F, -3.0F, -2.5F); + this.ShoulderPadLeft3.addBox(0.3F, -0.5F, 0.0F, 5, 2, 5, 0.0F); + this.setRotateAngle(ShoulderPadLeft3, 0.0F, -0.0F, 0.20943951023931953F); + + this.ShoulderPadLeft4 = new ModelRenderer(this, 219, 61); + this.ShoulderPadLeft4.setRotationPoint(-0.5F, -2.5F, -2.0F); + this.ShoulderPadLeft4.addBox(0.7F, -2.0F, 0.5F, 3, 2, 3, 0.0F); + this.setRotateAngle(ShoulderPadLeft4, 0.0F, -0.0F, 0.12217304763960307F); + + this.MainArmGuardLeft = new ModelRenderer(this, 240, 72); + this.MainArmGuardLeft.setRotationPoint(0.5F, 3.0F, -2.5F); + this.MainArmGuardLeft.addBox(0.0F, 0.0F, 0.0F, 3, 5, 5, 0.0F); + + this.ArmGuardPieceLeft1 = new ModelRenderer(this, 223, 67); + this.ArmGuardPieceLeft1.setRotationPoint(2.5F, 6.0F, -1.5F); + this.ArmGuardPieceLeft1.addBox(0.2F, -0.3F, 0.0F, 1, 2, 3, 0.0F); + this.setRotateAngle(ArmGuardPieceLeft1, 0.0F, -0.0F, -0.17453292519943295F); + + this.ArmGuardPieceLeft2 = new ModelRenderer(this, 223, 67); + this.ArmGuardPieceLeft2.setRotationPoint(2.5F, 5.0F, -1.5F); + this.ArmGuardPieceLeft2.addBox(0.2F, -0.3F, 0.0F, 1, 2, 3, 0.0F); + this.setRotateAngle(ArmGuardPieceLeft2, 0.0F, -0.0F, -0.17453292519943295F); + + this.ArmGuardPieceLeft3 = new ModelRenderer(this, 223, 67); + this.ArmGuardPieceLeft3.setRotationPoint(2.5F, 4.0F, -1.5F); + this.ArmGuardPieceLeft3.addBox(0.2F, -0.3F, 0.0F, 1, 2, 3, 0.0F); + this.setRotateAngle(ArmGuardPieceLeft3, 0.0F, -0.0F, -0.17453292519943295F); + + this.ArmGuardPieceLeft4 = new ModelRenderer(this, 231, 72); + this.ArmGuardPieceLeft4.setRotationPoint(2.5F, 3.0F, -1.5F); + this.ArmGuardPieceLeft4.addBox(0.2F, 0.6F, 0.0F, 1, 1, 3, 0.0F); + this.setRotateAngle(ArmGuardPieceLeft4, 0.0F, -0.0F, -0.17453292519943295F); + + this.ArmStrapLeftTop = new ModelRenderer(this, 225, 77); + this.ArmStrapLeftTop.setRotationPoint(-1.43F, 3.0F, -2.5F); + this.ArmStrapLeftTop.addBox(0.0F, 0.0F, 0.0F, 2, 1, 5, 0.0F); + + this.ArmStrapLeftBottom = new ModelRenderer(this, 225, 77); + this.ArmStrapLeftBottom.setRotationPoint(-1.5F, 7.0F, -2.5F); + this.ArmStrapLeftBottom.addBox(0.0F, 0.0F, 0.0F, 2, 1, 5, 0.0F); + + + //Right + this.MainArmGuardRight = new ModelRenderer(this, 240, 72); + this.MainArmGuardRight.setRotationPoint(-3.5F, 3.0F, -2.5F); + this.MainArmGuardRight.addBox(0.0F, 0.0F, 0.0F, 3, 5, 5, 0.0F); + + this.ArmGuardPieceRight1 = new ModelRenderer(this, 231, 72); + this.ArmGuardPieceRight1.setRotationPoint(-3.9F, 2.8F, -1.5F); + this.ArmGuardPieceRight1.addBox(0.2F, 0.6F, 0.0F, 1, 1, 3, 0.0F); + this.setRotateAngle(ArmGuardPieceRight1, 0.0F, -0.0F, 0.17453292519943295F); + + this.ArmGuardPieceRight2 = new ModelRenderer(this, 223, 67); + this.ArmGuardPieceRight2.setRotationPoint(-4.6F, 4.1F, -1.5F); + this.ArmGuardPieceRight2.addBox(0.8F, -0.7F, 0.0F, 1, 2, 3, 0.0F); + this.setRotateAngle(ArmGuardPieceRight2, 0.0F, -0.0F, 0.17453292519943295F); + + this.ArmGuardPieceRight3 = new ModelRenderer(this, 223, 67); + this.ArmGuardPieceRight3.setRotationPoint(-4.03F, 5.3F, -1.5F); + this.ArmGuardPieceRight3.addBox(0.2F, -0.8F, 0.0F, 1, 2, 3, 0.0F); + this.setRotateAngle(ArmGuardPieceRight3, 0.0F, -0.0F, 0.17453292519943295F); + + this.ArmGuardPieceRight4 = new ModelRenderer(this, 223, 67); + this.ArmGuardPieceRight4.setRotationPoint(-4.0F, 6.8F, -1.5F); + this.ArmGuardPieceRight4.addBox(0.1F, -1.3F, 0.0F, 1, 2, 3, 0.0F); + this.setRotateAngle(ArmGuardPieceRight4, 0.0F, -0.0F, 0.17453292519943295F); + + this.ShoulderPadRight1 = new ModelRenderer(this, 236, 53); + this.ShoulderPadRight1.setRotationPoint(-3.5F, -2.0F, -2.5F); + this.ShoulderPadRight1.addBox(0.0F, 0.0F, 0.0F, 5, 4, 5, 0.0F); + + this.ShoulderPadRight2 = new ModelRenderer(this, 232, 63); + this.ShoulderPadRight2.setRotationPoint(-5.0F, -2.5F, -3.0F); + this.ShoulderPadRight2.addBox(-0.1F, 2.1F, 0.0F, 6, 2, 6, 0.0F); + this.setRotateAngle(ShoulderPadRight2, 0.0F, -0.0F, -0.3665191429188092F); + + this.ShoulderPadRight3 = new ModelRenderer(this, 215, 53); + this.ShoulderPadRight3.setRotationPoint(-5.0F, -3.0F, -2.5F); + this.ShoulderPadRight3.addBox(0.6F, 0.7F, 0.0F, 5, 2, 5, 0.0F); + this.setRotateAngle(ShoulderPadRight3, 0.0F, -0.0F, -0.20943951023931953F); + + this.ShoulderPadRight4 = new ModelRenderer(this, 219, 61); + this.ShoulderPadRight4.setRotationPoint(-4.5F, -2.5F, -2.0F); + this.ShoulderPadRight4.addBox(1.3F, -1.5F, 0.5F, 3, 2, 3, 0.0F); + this.setRotateAngle(ShoulderPadRight4, 0.0F, -0.0F, -0.12217304763960307F); + + this.bipedRightArm = new ModelRenderer(this, 40, 16); + this.bipedRightArm.setRotationPoint(-5.0F, 2.0F, 0.0F); + this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.0F); + + this.ArmStrapRightTop = new ModelRenderer(this, 225, 77); + this.ArmStrapRightTop.setRotationPoint(-0.5F, 3.0F, -2.5F); + this.ArmStrapRightTop.addBox(0.0F, 0.0F, 0.0F, 2, 1, 5, 0.0F); + + this.ArmStrapRightBottom = new ModelRenderer(this, 225, 77); + this.ArmStrapRightBottom.setRotationPoint(-0.5F, 7.0F, -2.5F); + this.ArmStrapRightBottom.addBox(0.0F, 0.0F, 0.0F, 2, 1, 5, 0.0F); + } + + /* Leggs */ + { + this.LeggsTop = new ModelRenderer(this, 121, 15); + this.LeggsTop.setRotationPoint(0.5F, 8.0F, -2.4F); + this.LeggsTop.addBox(-5.0F, 0.0F, 0.0F, 9, 4, 5, 0.0F); + //Left + this.bipedLeftLeg = new ModelRenderer(this, 0, 16); + this.bipedLeftLeg.setRotationPoint(2.0F, 12.0F, 0.0F); + this.bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F); + + this.MainLegPieceLeft = new ModelRenderer(this, 149, 0); + this.MainLegPieceLeft.setRotationPoint(-2.0F, -1F, -2.5F); + this.MainLegPieceLeft.addBox(0.0F, 0.0F, 0.0F, 4, 10, 5, 0.0F); + + this.LegPieceLeft1 = new ModelRenderer(this, 138, 0); + this.LegPieceLeft1.setRotationPoint(1.5F, -1F, -2.0F); + this.LegPieceLeft1.addBox(0.0F, 0.0F, 0.0F, 1, 10, 4, 0.0F); + + this.LegPieceLeft2 = new ModelRenderer(this, 138, 0); + this.LegPieceLeft2.setRotationPoint(-2.5F, -1F, -2.0F); + this.LegPieceLeft2.addBox(0.0F, 0.0F, 0.0F, 1, 10, 4, 0.0F); + + this.MainKneePadLeft = new ModelRenderer(this, 149, 15); + this.MainKneePadLeft.setRotationPoint(0.0F, 2.5F, -3.0F); + this.MainKneePadLeft.addBox(0.0F, 0.0F, 0.0F, 2, 2, 1, 0.0F); + this.setRotateAngle(MainKneePadLeft, 0.0F, -0.0F, 0.7853981633974483F); + + this.KneePieceLeft1 = new ModelRenderer(this, 156, 15); + this.KneePieceLeft1.setRotationPoint(-0.5F, 2.0F, -2.7F); + this.KneePieceLeft1.addBox(0.0F, 0.0F, 0.0F, 1, 4, 1, 0.0F); + + //Right + this.bipedRightLeg = new ModelRenderer(this, 0, 16); + this.bipedRightLeg.setRotationPoint(-2.0F, 12.0F, 0.0F); + this.bipedRightLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F); + + this.MainLegPieceRight = new ModelRenderer(this, 149, 0); + this.MainLegPieceRight.setRotationPoint(-2.0F, -1F, -2.5F); + this.MainLegPieceRight.addBox(0.0F, 0.0F, 0.0F, 4, 10, 5, 0.0F); + + this.LegPieceRight1 = new ModelRenderer(this, 138, 0); + this.LegPieceRight1.setRotationPoint(-2.5F, -1F, -2.0F); + this.LegPieceRight1.addBox(0.0F, 0.0F, 0.0F, 1, 10, 4, 0.0F); + + this.LegPieceRight2 = new ModelRenderer(this, 138, 0); + this.LegPieceRight2.setRotationPoint(1.5F, -1F, -2.0F); + this.LegPieceRight2.addBox(0.0F, 0.0F, 0.0F, 1, 10, 4, 0.0F); + + this.MainKneePadRight = new ModelRenderer(this, 149, 15); + this.MainKneePadRight.setRotationPoint(0.0F, 2.5F, -3.0F); + this.MainKneePadRight.addBox(0.0F, 0.0F, 0.0F, 2, 2, 1, 0.0F); + + this.setRotateAngle(MainKneePadRight, 0.0F, -0.0F, 0.7853981633974483F); + this.KneePieceRight1 = new ModelRenderer(this, 156, 15); + this.KneePieceRight1.setRotationPoint(-0.5F, 2.0F, -2.7F); + this.KneePieceRight1.addBox(0.0F, 0.0F, 0.0F, 1, 4, 1, 0.0F); + + } + + /* Boots */ + { + //Left + this.MainBootPieceLeft = new ModelRenderer(this, 119, 0); + this.MainBootPieceLeft.setRotationPoint(-2.0F, 9.1F, -2.5F); + this.MainBootPieceLeft.addBox(0.0F, 0.0F, 0.0F, 4, 3, 5, 0.0F); + + this.BootPieceLeft1 = new ModelRenderer(this, 129, 9); + this.BootPieceLeft1.setRotationPoint(-1.5F, 9.0F, -3.5F); + this.BootPieceLeft1.addBox(0.0F, 0.0F, 0.0F, 3, 3, 1, 0.0F); + + this.BootPieceLeft2 = new ModelRenderer(this, 122, 9); + this.BootPieceLeft2.setRotationPoint(-1.0F, 9.0F, -2.5F); + this.BootPieceLeft2.addBox(0.0F, 0.0F, 0.0F, 2, 2, 1, 0.0F); + this.setRotateAngle(BootPieceLeft2, -0.40142572795869574F, -0.0F, 0.0F); + + this.BootPieceLeft3 = new ModelRenderer(this, 138, 0); + this.BootPieceLeft3.setRotationPoint(1.5F, 9.05F, -2.0F); + this.BootPieceLeft3.addBox(0.0F, 0.0F, 0.0F, 1, 3, 4, 0.0F); + + this.BootPieceLeft4 = new ModelRenderer(this, 138, 0); + this.BootPieceLeft4.setRotationPoint(-2.5F, 9.05F, -2.0F); + this.BootPieceLeft4.addBox(0.0F, 0.0F, 0.0F, 1, 3, 4, 0.0F); + + //Right + this.MainBootPieceRight = new ModelRenderer(this, 119, 0); + this.MainBootPieceRight.setRotationPoint(-2.0F, 9.1F, -2.5F); + this.MainBootPieceRight.addBox(0.0F, 0.0F, 0.0F, 4, 3, 5, 0.0F); + + this.BootPieceRight1 = new ModelRenderer(this, 129, 9); + this.BootPieceRight1.setRotationPoint(-1.5F, 9.0F, -3.5F); + this.BootPieceRight1.addBox(0.0F, 0.0F, 0.0F, 3, 3, 1, 0.0F); + + this.BootPieceRight2 = new ModelRenderer(this, 122, 9); + this.BootPieceRight2.setRotationPoint(-1.0F, 9.0F, -2.5F); + this.BootPieceRight2.addBox(0.0F, 0.0F, 0.0F, 2, 2, 1, 0.0F); + this.setRotateAngle(BootPieceRight2, -0.40142572795869574F, -0.0F, 0.0F); + + this.BootPieceRight3 = new ModelRenderer(this, 138, 0); + this.BootPieceRight3.setRotationPoint(-2.5F, 9.05F, -2.0F); + this.BootPieceRight3.addBox(0.0F, 0.0F, 0.0F, 1, 3, 4, 0.0F); + + this.BootPieceRight4 = new ModelRenderer(this, 138, 0); + this.BootPieceRight4.setRotationPoint(1.5F, 9.05F, -2.0F); + this.BootPieceRight4.addBox(0.0F, 0.0F, 0.0F, 1, 3, 4, 0.0F); + } + + + this.bipedHead.cubeList.clear(); + this.bipedHeadwear.cubeList.clear(); + if (isHelmet){ + this.bipedHead.addChild(this.MainHelmPieceLeft1); + this.bipedHead.addChild(this.HelmPieceFront2); + this.bipedHead.addChild(this.MainHelmPieceRight2); + this.bipedHead.addChild(this.MainHelmPieceTop); + this.bipedHead.addChild(this.MainHelmPieceFrontBottom); + this.bipedHead.addChild(this.HornPieceRight1); + this.bipedHead.addChild(this.HornPieceLeft1); + + this.bipedHead.addChild(this.MainHelmPieceLeft2); + this.bipedHead.addChild(this.HornPieceRight3); + this.bipedHead.addChild(this.HornPieceLeft3); + this.bipedHead.addChild(this.HelmPieceBack1); + + this.bipedHead.addChild(this.MainHelmPieceLeft3); + this.bipedHead.addChild(this.MainHelmPieceRight1); + this.bipedHead.addChild(this.HornPieceRight2); + this.bipedHead.addChild(this.MainHelmPieceBack); + this.bipedHead.addChild(this.MainHelmPieceRight3); + this.bipedHead.addChild(this.HelmPieceFront1); + this.bipedHead.addChild(this.MainHelmPieceBottom); + this.bipedHead.addChild(this.MainHelmPieceFrontTop); + this.bipedHead.addChild(this.HornPieceLeft2); + + if (isDraconic){ + this.bipedHead.addChild(this.HornPieceLeft4); + this.bipedHead.addChild(this.HornPieceRight4); + } + else + { + this.bipedHead.addChild(this.WyHelmPieceTop1); + this.bipedHead.addChild(this.WyHelmPieceTop2); + this.bipedHead.addChild(this.WyHelmPieceTop3); + this.bipedHead.addChild(this.WyHelmPieceTop4); + } + } + + this.bipedBody.cubeList.clear(); + this.bipedRightArm.cubeList.clear(); + this.bipedLeftArm.cubeList.clear(); + if (isChestPiece){ + this.bipedBody.addChild(this.MainChestPieceBottom); + this.bipedBody.addChild(this.ChestDecorationPiece2); + this.bipedBody.addChild(this.ChestDecorationPiece4); + + if (isDraconic){ + this.bipedBody.addChild(this.DrMainChestPieceTop); + this.bipedBody.addChild(this.DrMainChestPieceMid); + this.bipedBody.addChild(this.DrChestDecorationPiece1); + this.bipedBody.addChild(this.DrChestDecorationPiece3); + + this.bipedLeftArm.addChild(this.ArmGuardPieceLeft1); + this.bipedLeftArm.addChild(this.ArmGuardPieceLeft2); + this.bipedLeftArm.addChild(this.ArmGuardPieceLeft3); + this.bipedLeftArm.addChild(this.ArmGuardPieceLeft4); + this.bipedLeftArm.addChild(this.MainArmGuardLeft); + this.bipedLeftArm.addChild(this.ArmStrapLeftTop); + this.bipedLeftArm.addChild(this.ArmStrapLeftBottom); + + this.bipedRightArm.addChild(this.ArmGuardPieceRight1); + this.bipedRightArm.addChild(this.ArmGuardPieceRight2); + this.bipedRightArm.addChild(this.ArmGuardPieceRight3); + this.bipedRightArm.addChild(this.ArmGuardPieceRight4); + this.bipedRightArm.addChild(this.MainArmGuardRight); + this.bipedRightArm.addChild(this.ArmStrapRightTop); + this.bipedRightArm.addChild(this.ArmStrapRightBottom); + } + else + { + this.bipedBody.addChild(this.WyMainChestPieceMid); + this.bipedBody.addChild(this.WyChestPieceTop2); + this.bipedBody.addChild(this.WyChestPieceTop1); + this.bipedBody.addChild(this.WyChestPieceTop3); + this.bipedBody.addChild(this.WyChestDecorationPiece3); + } + + this.bipedLeftArm.addChild(this.ShoulderPadLeft1); + this.bipedLeftArm.addChild(this.ShoulderPadLeft2); + this.bipedLeftArm.addChild(this.ShoulderPadLeft3); + this.bipedLeftArm.addChild(this.ShoulderPadLeft4); + + this.bipedRightArm.addChild(this.ShoulderPadRight1); + this.bipedRightArm.addChild(this.ShoulderPadRight2); + this.bipedRightArm.addChild(this.ShoulderPadRight3); + this.bipedRightArm.addChild(this.ShoulderPadRight4); + } + + this.bipedLeftLeg.cubeList.clear(); + this.bipedRightLeg.cubeList.clear(); + if (isLeggings){ + //this.bipedBody.addChild(this.LeggsTop); + + this.bipedLeftLeg.addChild(this.LegPieceLeft1); + this.bipedLeftLeg.addChild(this.MainKneePadLeft); + this.bipedLeftLeg.addChild(this.MainLegPieceLeft); + this.bipedLeftLeg.addChild(this.KneePieceLeft1); + this.bipedLeftLeg.addChild(this.LegPieceLeft2); + + this.bipedRightLeg.addChild(this.LegPieceRight2); + this.bipedRightLeg.addChild(this.LegPieceRight1); + this.bipedRightLeg.addChild(this.MainKneePadRight); + this.bipedRightLeg.addChild(this.KneePieceRight1); + this.bipedRightLeg.addChild(this.MainLegPieceRight); + + if (isDraconic){ + this.bipedBody.addChild(this.BeltFront); + this.bipedBody.addChild(this.BeltBack); + this.bipedBody.addChild(this.BeltLeft); + this.bipedBody.addChild(this.BeltRight); + this.bipedBody.addChild(this.BeltBuckle); + } + } + + + if (isdBoots){ + this.bipedLeftLeg.addChild(this.MainBootPieceLeft); + this.bipedLeftLeg.addChild(this.BootPieceLeft2); + this.bipedLeftLeg.addChild(this.BootPieceLeft1); + this.bipedLeftLeg.addChild(this.BootPieceLeft3); + this.bipedLeftLeg.addChild(this.BootPieceLeft4); + + this.bipedRightLeg.addChild(this.MainBootPieceRight); + this.bipedRightLeg.addChild(this.BootPieceRight1); + this.bipedRightLeg.addChild(this.BootPieceRight2); + this.bipedRightLeg.addChild(this.BootPieceRight3); + this.bipedRightLeg.addChild(this.BootPieceRight4); + } + + } + + @Override + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + + this.bipedRightLeg.render(f5); + this.bipedBody.render(f5); + this.bipedLeftArm.render(f5); + this.bipedRightArm.render(f5); + this.bipedLeftLeg.render(f5); + this.bipedHead.render(f5); + } + + /** + * This is a helper function from Tabula to set the rotation of model parts + */ + public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { + modelRenderer.rotateAngleX = x; + modelRenderer.rotateAngleY = y; + modelRenderer.rotateAngleZ = z; + } +} diff --git a/src/main/java/com/brandon3055/draconicevolution/client/render/item/RenderArmor.java b/src/main/java/com/brandon3055/draconicevolution/client/render/item/RenderArmor.java new file mode 100644 index 00000000..87cb526f --- /dev/null +++ b/src/main/java/com/brandon3055/draconicevolution/client/render/item/RenderArmor.java @@ -0,0 +1,52 @@ +package com.brandon3055.draconicevolution.client.render.item; + +import com.brandon3055.draconicevolution.client.handler.ResourceHandler; +import com.brandon3055.draconicevolution.common.lib.References; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.IItemRenderer; +import org.lwjgl.opengl.GL11; + +/** + * Created by brandon3055 on 17/8/2015. + */ +public class RenderArmor implements IItemRenderer { + + private ItemArmor armor; + + public RenderArmor(){ + + } + + public RenderArmor(ItemArmor armor){ + this.armor = armor; + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + return true; + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return true; + } + + @Override + public void renderItem(ItemRenderType type, ItemStack stack, Object... data) { + GL11.glPushMatrix(); + + ResourceHandler.bindResource(armor.getArmorTexture(stack, null, 0, null).replace(References.RESOURCESPREFIX, "")); + + if (type == ItemRenderType.EQUIPPED_FIRST_PERSON || type == ItemRenderType.EQUIPPED) + { + GL11.glTranslated(0.5, 0.5, 0.5); + GL11.glRotated(180, 0, 1, 0); + } + GL11.glTranslated(0, armor.armorType == 0 ? -0.25 : armor.armorType == 1 ? 0.42 : armor.armorType == 2 ? 1.05 : 1.5, 0); + GL11.glRotated(180, -1, 0, 1); + armor.getArmorModel(null, stack, 0).render(null, 0f, 0f, 0f, 0f, 0f, 0.0625f); + + GL11.glPopMatrix(); + } +} diff --git a/src/main/java/com/brandon3055/draconicevolution/client/render/particle/Particles.java b/src/main/java/com/brandon3055/draconicevolution/client/render/particle/Particles.java index b1b72e76..ffde7ef8 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/render/particle/Particles.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/render/particle/Particles.java @@ -655,8 +655,8 @@ public class Particles { @Override public void onUpdate() { - //super.onUpdate(); - + if (particleAge == 3) worldObj.playSound(posX, posY, posZ, "DraconicEvolution:fusionExplosion", 100F, 1F, false); + particleAge++; size++; if (size > maxSize * 1.2) setDead(); diff --git a/src/main/java/com/brandon3055/draconicevolution/common/ModItems.java b/src/main/java/com/brandon3055/draconicevolution/common/ModItems.java index f390efc5..ed28e06e 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/ModItems.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/ModItems.java @@ -14,6 +14,7 @@ import com.brandon3055.draconicevolution.common.lib.Strings; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.EnumHelper; @@ -32,20 +33,20 @@ public class ModItems { public static Item draconicAxe; public static Item draconicSword; public static Item draconicBow; - public static Item draconicHelm; - public static Item draconicChest; - public static Item draconicLeggs; - public static Item draconicBoots; + public static ItemArmor draconicHelm; + public static ItemArmor draconicChest; + public static ItemArmor draconicLeggs; + public static ItemArmor draconicBoots; public static Item draconicDestructionStaff; public static Item wyvernPickaxe; public static Item wyvernShovel; public static Item wyvernSword; public static Item wyvernBow; - public static Item wyvernHelm; - public static Item wyvernChest; - public static Item wyvernLeggs; - public static Item wyvernBoots; + public static ItemArmor wyvernHelm; + public static ItemArmor wyvernChest; + public static ItemArmor wyvernLeggs; + public static ItemArmor wyvernBoots; public static Item dezilsMarshmallow; diff --git a/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/EnergyStorageCore.java b/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/EnergyStorageCore.java index 6741688f..053a26e5 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/EnergyStorageCore.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/EnergyStorageCore.java @@ -134,7 +134,6 @@ public class EnergyStorageCore extends BlockDE implements IHudDisplayBlock{ list.add(InfoHelper.HITC()+getLocalizedName()); list.add("Tier: " + InfoHelper.ITC() + (tile.getTier() + 1)); String BN = String.valueOf(tile.getEnergyStored()); - if (BN.substring(BN.length() - 2).contentEquals(".0")) BN = BN.substring(0, BN.length() - 2); list.add(StatCollector.translateToLocal("info.de.charge.txt") + ": " + InfoHelper.ITC() + Utills.formatNumber(tile.getEnergyStored()) + " / " + Utills.formatNumber(tile.getMaxEnergyStored()) + " [" + BN + " RF]"); return list; diff --git a/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/InvisibleMultiblock.java b/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/InvisibleMultiblock.java index 47342b41..565b3808 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/InvisibleMultiblock.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/InvisibleMultiblock.java @@ -221,7 +221,6 @@ public class InvisibleMultiblock extends BlockDE implements IHudDisplayBlock { list.add(InfoHelper.HITC() + ModBlocks.energyStorageCore.getLocalizedName()); list.add("Tier: " + InfoHelper.ITC() + (master.getTier() + 1)); String BN = String.valueOf(master.getEnergyStored()); - if (BN.substring(Math.max(BN.length() - 2, 0)).contentEquals(".0")) BN = BN.substring(0, Math.max(BN.length() - 2, 0)); list.add(StatCollector.translateToLocal("info.de.charge.txt") + ": " + InfoHelper.ITC() + Utills.formatNumber(master.getEnergyStored()) + " / " + Utills.formatNumber(master.getMaxEnergyStored()) + " [" + BN + " RF]"); return list; diff --git a/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/ReactorCore.java b/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/ReactorCore.java index 434e88c2..76fd3f40 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/ReactorCore.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/ReactorCore.java @@ -11,6 +11,7 @@ import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; /** @@ -62,6 +63,12 @@ public class ReactorCore extends BlockDE { if (tile != null) tile.onPlaced(); } + @Override + public AxisAlignedBB getSelectedBoundingBoxFromPool(World p_149633_1_, int x, int y, int z) { + + return AxisAlignedBB.getBoundingBox(0, 0, 0, 1, 1, 1);//super.getSelectedBoundingBoxFromPool(p_149633_1_, x, y, z); + } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) { //TileReactorCore tile = world.getTileEntity(x, y, z) instanceof TileReactorCore ? (TileReactorCore) world.getTileEntity(x, y, z) : null; diff --git a/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/ReactorStabilizer.java b/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/ReactorStabilizer.java index 26c02d32..cacfd8cc 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/ReactorStabilizer.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/ReactorStabilizer.java @@ -77,7 +77,8 @@ public class ReactorStabilizer extends BlockDE { int d = Utills.determineOrientation(x, y, z, entity); TileReactorStabilizer tile = world.getTileEntity(x, y, z) instanceof TileReactorStabilizer ? (TileReactorStabilizer)world.getTileEntity(x, y, z) : null; if (tile != null){ - tile.facingDirection = ForgeDirection.getOrientation(d).getOpposite().ordinal(); + if (entity.isSneaking()) tile.facingDirection = ForgeDirection.getOrientation(d).getOpposite().ordinal(); + else tile.facingDirection = ForgeDirection.getOrientation(d).ordinal(); tile.onPlaced(); } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/container/ContainerReactor.java b/src/main/java/com/brandon3055/draconicevolution/common/container/ContainerReactor.java index 758bf229..f3e2fb9d 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/container/ContainerReactor.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/container/ContainerReactor.java @@ -4,7 +4,6 @@ import com.brandon3055.draconicevolution.common.ModBlocks; import com.brandon3055.draconicevolution.common.ModItems; import com.brandon3055.draconicevolution.common.inventory.GenericInventory; import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore; -import com.brandon3055.draconicevolution.common.utills.LogHelper; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -43,6 +42,7 @@ public class ContainerReactor extends ContainerDataSync { { if (stack.getItem() == ModItems.draconicIngot) reactor.reactorFuel += stack.stackSize * 144; if (stack.getItem() == Item.getItemFromBlock(ModBlocks.draconicBlock)) reactor.reactorFuel += stack.stackSize * 1296; + reactor.validateStructure(); } else getStorage()[i] = stack; } @@ -161,14 +161,11 @@ public class ContainerReactor extends ContainerDataSync { if (stack == null) return false; else if (stack.getItem() == ModItems.draconicIngot) numberAllowed = (10368 - (reactor.reactorFuel + reactor.convertedFuel)) / 144; else if (stack.getItem() == Item.getItemFromBlock(ModBlocks.draconicBlock)) numberAllowed = (10368 - (reactor.reactorFuel + reactor.convertedFuel)) / 1296; - // (stack.getItem() == ModItems.draconicIngot || stack.getItem() == Item.getItemFromBlock(ModBlocks.draconicBlock)); - LogHelper.info(numberAllowed); return numberAllowed > 0; } @Override - public int getSlotStackLimit() {//todo add the fuel limit - LogHelper.info(numberAllowed); + public int getSlotStackLimit() { return numberAllowed; } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/handler/ConfigHandler.java b/src/main/java/com/brandon3055/draconicevolution/common/handler/ConfigHandler.java index 812d642a..ce051811 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/handler/ConfigHandler.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/handler/ConfigHandler.java @@ -56,6 +56,11 @@ public class ConfigHandler { //Enchantments public static int reaperEnchantID; + //Reactor + public static boolean enableReactorBigBoom; + public static double reactorOutputMultiplier; + public static double reactorFuelUsageMultiplier; + private static String[] defaultSpawnerList = new String[] {"ExampleMob1", "ExampleMob2", "ExampleMob3 (these examples can be deleted)"}; @@ -113,8 +118,12 @@ public class ConfigHandler { // potionFlightID = config.get("magic id's", "potionFlightID", 50).getInt(50); //Enchantments - reaperEnchantID = config.get("magic id's", "Reaper Enchant id", 180).getInt(180); + reaperEnchantID = config.get("magicId's", "Reaper Enchant id", 180).getInt(180); + //Reactor + enableReactorBigBoom = config.get("Draconic Reactor", "EnableBigExplosion", true, "Setting this to false will reduce the reactor explosion to little more then a tnt blast").getBoolean(true); + reactorFuelUsageMultiplier = config.get("Draconic Reactor", "FuelUsageMultiplier", 1, "Use this to adjust how quickly the reactor uses fuel", 0, 1000000).getDouble(1); + reactorOutputMultiplier = config.get("Draconic Reactor", "EnergyOutputMultiplier", 1, "Use this to adjust the output of the reactor", 0, 1000000).getDouble(1); for (String s : disabledBlocksItems) disabledNamesList.add(s); for (int i : speedDimBlackList) speedLimitDimList.add(i); diff --git a/src/main/java/com/brandon3055/draconicevolution/common/handler/CraftingHandler.java b/src/main/java/com/brandon3055/draconicevolution/common/handler/CraftingHandler.java index 42e6dde1..7748b63f 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/handler/CraftingHandler.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/handler/CraftingHandler.java @@ -18,6 +18,8 @@ import net.minecraftforge.oredict.ShapelessOreRecipe; public class CraftingHandler { public static void init() { + //todo In 1.8-1.9 when the feature modals are implemented add a dependency system to automatically disable a recipe if a required component is disabled + ItemStack mobSoul = new ItemStack(ModItems.mobSoul); ItemNBTHelper.setString(mobSoul, "Name", "Any"); @@ -104,8 +106,15 @@ public class CraftingHandler { addOre(getStack(ModBlocks.energyCrystal, 1, 4), "PGP", "ECE", "PGP", 'P', Items.ender_pearl, 'G', ModBlocks.particleGenerator, 'E', Items.ender_eye, 'C', getStack(ModBlocks.energyCrystal, 1, 0)); addOre(getStack(ModBlocks.energyCrystal, 1, 5), "PGP", "ECE", "PGP", 'P', Items.ender_pearl, 'G', ModBlocks.particleGenerator, 'E', Items.ender_eye, 'C', getStack(ModBlocks.energyCrystal, 1, 1)); + if (Loader.isModLoaded("ThermalDynamics")) { + addOre(getStack(ModBlocks.flowGate, 1, 0), "ICI", "RSR", "ICI", 'I', "ingotDraconium", 'C', getStack(ModItems.draconicCore, 1, 0), 'R', Items.comparator, 'S', new ItemStack(GameRegistry.findBlock("ThermalDynamics", "ThermalDynamics_0"), 1, 1)); + addOre(getStack(ModBlocks.flowGate, 1, 6), "ICI", "RSR", "ICI", 'I', "ingotDraconium", 'C', getStack(ModItems.draconicCore, 1, 0), 'R', Items.comparator, 'S', new ItemStack(GameRegistry.findBlock("ThermalDynamics", "ThermalDynamics_16"), 1, 2)); + }else { + addOre(getStack(ModBlocks.flowGate, 1, 0), "ICI", "RSR", "ICI", 'I', "ingotDraconium", 'C', getStack(ModItems.draconicCore, 1, 0), 'R', Items.comparator, 'S', getStack(ModItems.draconiumEnergyCore, 1, 0)); + addOre(getStack(ModBlocks.flowGate, 1, 6), "ICI", "RSR", "ICI", 'I', "ingotDraconium", 'C', getStack(ModItems.draconicCore, 1, 0), 'R', Items.comparator, 'S', Items.bucket); + } - //Tools + //Tools addOre(ModItems.teleporterMKII, "IEI", "ETE", "IWI", 'I', "ingotDraconium", 'E', Items.ender_pearl, 'T', ModItems.teleporterMKI, 'W', ModItems.wyvernCore); addOre(ModItems.teleporterMKI, "CSC", "SMS", "CSC", 'C', Items.blaze_powder, 'S', "dustDraconium", 'M', Items.ender_eye); addOre(getStack(ModItems.safetyMatch, 1, 1000), " O ", " S ", " ", 'O', "dyeOrange", 'S', "stickWood"); diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/Tclogo.java b/src/main/java/com/brandon3055/draconicevolution/common/items/Tclogo.java index b6015ed0..c79281cd 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/Tclogo.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/Tclogo.java @@ -8,6 +8,7 @@ import com.brandon3055.draconicevolution.common.lib.Strings; import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.ReactorExplosion; import com.brandon3055.draconicevolution.common.utills.LogHelper; import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; @@ -100,21 +101,30 @@ public class Tclogo extends ItemDE { return par1ItemStack; } + @SideOnly(Side.CLIENT) + private void particle(World world, EntityPlayer player){ + MovingObjectPosition mop = ToolHandler.raytraceFromEntity(world, player, 10000); + if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) FMLClientHandler.instance().getClient().effectRenderer.addEffect(new Particles.ReactorExplosionParticle(world, mop.blockX, mop.blockY, mop.blockZ, 100)); + + } + @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + //world.playSound(player.posX, player.posY, player.posZ, "DraconicEvolution:fusionExplosion", 1F, 1F, false); + LogHelper.info(GameRegistry.findBlock("ThermalDynamics", "ThermalDynamics_0")); + if (player.inventory.getStackInSlot(0) != null) LogHelper.info(GameRegistry.findUniqueIdentifierFor(player.inventory.getStackInSlot(0).getItem())); + if (world.isRemote){ - MovingObjectPosition mop = ToolHandler.raytraceFromEntity(world, player, 10000); - LogHelper.info(mop); - if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) FMLClientHandler.instance().getClient().effectRenderer.addEffect(new Particles.ReactorExplosionParticle(world, mop.blockX, mop.blockY, mop.blockZ, 100)); - //if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) ProcessHandler.addProcess(new ReactorExplosion(world, mop.blockX, mop.blockY, mop.blockZ, 10F)); + particle(world, player); + //if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) ProcessHandler.addProcess(new ReactorExplosion(world, mop.blockX, mop.blockY, mop.blockZ, 10F)); } else { MovingObjectPosition mop = ToolHandler.raytraceFromEntity(world, player, 10000); //LogHelper.info(mop); //FMLClientHandler.instance().getClient().effectRenderer.addEffect(new Particles.ReactorExplosionParticle(world, mop.blockX, mop.blockY, mop.blockZ)); - if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) ProcessHandler.addProcess(new ReactorExplosion(world, mop.blockX, mop.blockY, mop.blockZ, 10F)); + if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) ProcessHandler.addProcess(new ReactorExplosion(world, mop.blockX, mop.blockY, mop.blockZ, 20F)); } if (1==1) return stack; @@ -256,26 +266,31 @@ public class Tclogo extends ItemDE { @SuppressWarnings({ "unchecked", "rawtypes" }) public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) { - list.add(EnumChatFormatting.AQUA + "AQUA"); - list.add(EnumChatFormatting.BLACK + "BLACK"); - list.add(EnumChatFormatting.BLUE + "BLUE"); - list.add(EnumChatFormatting.DARK_AQUA + "DARK_AQUA"); - list.add(EnumChatFormatting.DARK_BLUE + "DARK_BLUE"); - list.add(EnumChatFormatting.DARK_GRAY + "DARK_GRAY"); - list.add(EnumChatFormatting.DARK_GREEN + "DARK_GREEN"); - list.add(EnumChatFormatting.DARK_PURPLE + "DARK_PURPLE"); - list.add(EnumChatFormatting.DARK_RED + "DARK_RED"); - list.add(EnumChatFormatting.GOLD + "GOLD"); - list.add(EnumChatFormatting.GRAY + "GRAY"); - list.add(EnumChatFormatting.GREEN + "GREEN"); - list.add(EnumChatFormatting.LIGHT_PURPLE + "LIGHT_PURPLE"); - list.add(EnumChatFormatting.RED + "RED"); - list.add(EnumChatFormatting.WHITE + "WHITE"); - list.add(EnumChatFormatting.YELLOW + "YELLOW"); - list.add(EnumChatFormatting.BOLD + "BOLD"); - list.add(EnumChatFormatting.ITALIC + "ITALIC"); - list.add(EnumChatFormatting.OBFUSCATED + "OBFUSCATED"); - list.add(EnumChatFormatting.UNDERLINE + "UNDERLINE"); - list.add(EnumChatFormatting.STRIKETHROUGH + "STRIKETHROUGH"); + list.add(EnumChatFormatting.RED + "Warning! this is an item used to test random bits of code. You should not play with it"); + list.add(EnumChatFormatting.RED + "because depending on what i used it for last it could do anything."); + list.add(EnumChatFormatting.RED + "It may even break your world"); + list.add("At the time this warning was added it created a 200x200 block smoking creator"); + +// list.add(EnumChatFormatting.AQUA + "AQUA"); +// list.add(EnumChatFormatting.BLACK + "BLACK"); +// list.add(EnumChatFormatting.BLUE + "BLUE"); +// list.add(EnumChatFormatting.DARK_AQUA + "DARK_AQUA"); +// list.add(EnumChatFormatting.DARK_BLUE + "DARK_BLUE"); +// list.add(EnumChatFormatting.DARK_GRAY + "DARK_GRAY"); +// list.add(EnumChatFormatting.DARK_GREEN + "DARK_GREEN"); +// list.add(EnumChatFormatting.DARK_PURPLE + "DARK_PURPLE"); +// list.add(EnumChatFormatting.DARK_RED + "DARK_RED"); +// list.add(EnumChatFormatting.GOLD + "GOLD"); +// list.add(EnumChatFormatting.GRAY + "GRAY"); +// list.add(EnumChatFormatting.GREEN + "GREEN"); +// list.add(EnumChatFormatting.LIGHT_PURPLE + "LIGHT_PURPLE"); +// list.add(EnumChatFormatting.RED + "RED"); +// list.add(EnumChatFormatting.WHITE + "WHITE"); +// list.add(EnumChatFormatting.YELLOW + "YELLOW"); +// list.add(EnumChatFormatting.BOLD + "BOLD"); +// list.add(EnumChatFormatting.ITALIC + "ITALIC"); +// list.add(EnumChatFormatting.OBFUSCATED + "OBFUSCATED"); +// list.add(EnumChatFormatting.UNDERLINE + "UNDERLINE"); +// list.add(EnumChatFormatting.STRIKETHROUGH + "STRIKETHROUGH"); } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/armor/DraconicArmor.java b/src/main/java/com/brandon3055/draconicevolution/common/items/armor/DraconicArmor.java index 78bde6a4..cbbcde7a 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/armor/DraconicArmor.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/armor/DraconicArmor.java @@ -4,16 +4,20 @@ import cofh.api.energy.IEnergyContainerItem; import com.brandon3055.brandonscore.common.utills.InfoHelper; import com.brandon3055.brandonscore.common.utills.ItemNBTHelper; import com.brandon3055.draconicevolution.DraconicEvolution; +import com.brandon3055.draconicevolution.client.model.ModelDraconicArmor; import com.brandon3055.draconicevolution.common.ModItems; import com.brandon3055.draconicevolution.common.entity.EntityPersistentItem; import com.brandon3055.draconicevolution.common.lib.References; -import com.brandon3055.draconicevolution.common.utills.*; +import com.brandon3055.draconicevolution.common.utills.IConfigurableItem; +import com.brandon3055.draconicevolution.common.utills.IInventoryTool; +import com.brandon3055.draconicevolution.common.utills.ItemConfigField; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Optional; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.ReflectionHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.Enchantment; @@ -21,10 +25,7 @@ import net.minecraft.enchantment.EnumEnchantmentType; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; +import net.minecraft.item.*; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; @@ -116,11 +117,13 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IEnergyCo @Override @SideOnly(Side.CLIENT) public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - if (stack.getItem() == ModItems.draconicHelm || stack.getItem() == ModItems.draconicChest || stack.getItem() == ModItems.draconicBoots) { - return References.RESOURCESPREFIX + "textures/models/armor/draconic_layer_1.png"; - } else { - return References.RESOURCESPREFIX + "textures/models/armor/draconic_layer_2.png"; - } + return References.RESOURCESPREFIX + "textures/models/armor/armorDraconic.png"; + +// if (stack.getItem() == ModItems.draconicHelm || stack.getItem() == ModItems.draconicChest || stack.getItem() == ModItems.draconicBoots) { +// return References.RESOURCESPREFIX + "textures/models/armor/draconic_layer_1.png"; +// } else { +// return References.RESOURCESPREFIX + "textures/models/armor/draconic_layer_2.png"; +// } } @Override @@ -328,4 +331,52 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IEnergyCo public boolean showNodes(ItemStack itemstack, EntityLivingBase player) { return ItemNBTHelper.getBoolean(itemstack, "GogglesOfRevealing", true); } + + @SideOnly(Side.CLIENT) + ModelBiped model = null; + + @SideOnly(Side.CLIENT) + @Override + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + if (model == null) { + if (armorType == 0) model = new ModelDraconicArmor(1F, true, false, false, false, true); + else if (armorType == 1) model = new ModelDraconicArmor(1F, false, true, false, false, true); + else if (armorType == 2) model = new ModelDraconicArmor(1F, false, false, true, false, true); + else model = new ModelDraconicArmor(1F, false, false, false, true, true); + + this.model.bipedHead.showModel = (armorType == 0); + this.model.bipedHeadwear.showModel = (armorType == 0); + this.model.bipedBody.showModel = ((armorType == 1) || (armorType == 2)); + this.model.bipedLeftArm.showModel = (armorType == 1); + this.model.bipedRightArm.showModel = (armorType == 1); + this.model.bipedLeftLeg.showModel = (armorType == 2 || armorType == 3); + this.model.bipedRightLeg.showModel = (armorType == 2 || armorType == 3); + } + + if (entityLiving == null) return model; + + this.model.isSneak = entityLiving.isSneaking(); + this.model.isRiding = entityLiving.isRiding(); + this.model.isChild = entityLiving.isChild(); + this.model.aimedBow = false; + this.model.heldItemRight = (entityLiving.getHeldItem() != null ? 1 : 0); + + if ((entityLiving instanceof EntityPlayer)) + { + if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0) + { + EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction(); + if (enumaction == EnumAction.block) + { + this.model.heldItemRight = 3; + } else if (enumaction == EnumAction.bow) + { + this.model.aimedBow = true; + } + } + } + + + return model; + } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/armor/WyvernArmor.java b/src/main/java/com/brandon3055/draconicevolution/common/items/armor/WyvernArmor.java index 0d34e046..cc92e871 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/armor/WyvernArmor.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/armor/WyvernArmor.java @@ -4,6 +4,7 @@ import cofh.api.energy.IEnergyContainerItem; import com.brandon3055.brandonscore.common.utills.InfoHelper; import com.brandon3055.brandonscore.common.utills.ItemNBTHelper; import com.brandon3055.draconicevolution.DraconicEvolution; +import com.brandon3055.draconicevolution.client.model.ModelDraconicArmor; import com.brandon3055.draconicevolution.common.ModItems; import com.brandon3055.draconicevolution.common.entity.EntityPersistentItem; import com.brandon3055.draconicevolution.common.lib.References; @@ -11,6 +12,7 @@ import com.brandon3055.draconicevolution.common.utills.*; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.Enchantment; @@ -18,10 +20,7 @@ import net.minecraft.enchantment.EnumEnchantmentType; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemArmor; -import net.minecraft.item.ItemStack; +import net.minecraft.item.*; import net.minecraft.util.DamageSource; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; @@ -104,11 +103,12 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IEnergyCont @Override @SideOnly(Side.CLIENT) public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - if (stack.getItem() == ModItems.wyvernHelm || stack.getItem() == ModItems.wyvernChest || stack.getItem() == ModItems.wyvernBoots) { - return References.RESOURCESPREFIX + "textures/models/armor/wyvern_layer_1.png"; - } else { - return References.RESOURCESPREFIX + "textures/models/armor/wyvern_layer_2.png"; - } + return References.RESOURCESPREFIX + "textures/models/armor/armorWyvern.png"; +// if (stack.getItem() == ModItems.wyvernHelm || stack.getItem() == ModItems.wyvernChest || stack.getItem() == ModItems.wyvernBoots) { +// return References.RESOURCESPREFIX + "textures/models/armor/wyvern_layer_1.png"; +// } else { +// return References.RESOURCESPREFIX + "textures/models/armor/wyvern_layer_2.png"; +// } } @Override @@ -261,4 +261,52 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IEnergyCont public boolean isEnchantValid(Enchantment enchant) { return enchant.type == EnumEnchantmentType.armor || (armorType == 0 && enchant.type == EnumEnchantmentType.armor_head) || (armorType == 1 && enchant.type == EnumEnchantmentType.armor_torso) || (armorType == 2 && enchant.type == EnumEnchantmentType.armor_legs) || (armorType == 3 && enchant.type == EnumEnchantmentType.armor_feet); } + + @SideOnly(Side.CLIENT) + ModelBiped model = null; + + @SideOnly(Side.CLIENT) + @Override + public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + if (model == null) { + if (armorType == 0) model = new ModelDraconicArmor(1F, true, false, false, false, false); + else if (armorType == 1) model = new ModelDraconicArmor(1F, false, true, false, false, false); + else if (armorType == 2) model = new ModelDraconicArmor(1F, false, false, true, false, false); + else model = new ModelDraconicArmor(1F, false, false, false, true, false); + + this.model.bipedHead.showModel = (armorType == 0); + this.model.bipedHeadwear.showModel = (armorType == 0); + this.model.bipedBody.showModel = ((armorType == 1) || (armorType == 2)); + this.model.bipedLeftArm.showModel = (armorType == 1); + this.model.bipedRightArm.showModel = (armorType == 1); + this.model.bipedLeftLeg.showModel = (armorType == 2 || armorType == 3); + this.model.bipedRightLeg.showModel = (armorType == 2 || armorType == 3); + } + + if (entityLiving == null) return model; + + this.model.isSneak = entityLiving.isSneaking(); + this.model.isRiding = entityLiving.isRiding(); + this.model.isChild = entityLiving.isChild(); + this.model.aimedBow = false; + this.model.heldItemRight = (entityLiving.getHeldItem() != null ? 1 : 0); + + if ((entityLiving instanceof EntityPlayer)) + { + if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0) + { + EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction(); + if (enumaction == EnumAction.block) + { + this.model.heldItemRight = 3; + } else if (enumaction == EnumAction.bow) + { + this.model.aimedBow = true; + } + } + } + + + return model; + } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/lib/VersionHandler.java b/src/main/java/com/brandon3055/draconicevolution/common/lib/VersionHandler.java index 2b8b1f73..550a50b8 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/lib/VersionHandler.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/lib/VersionHandler.java @@ -5,8 +5,8 @@ package com.brandon3055.draconicevolution.common.lib; */ public class VersionHandler { - public static final String VERSION = "1.0.1d"; - public static final int SNAPSHOT = 0; + public static final String VERSION = "1.0.2"; + public static final int SNAPSHOT = 2; public static final String MCVERSION = "1.7.10"; public static final String FULL_VERSION = VERSION + (SNAPSHOT > 0 ? "-snapshot_" + SNAPSHOT : ""); diff --git a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/ReactorExplosionTrace.java b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/ReactorExplosionTrace.java index c7328e05..a20f2544 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/ReactorExplosionTrace.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/ReactorExplosionTrace.java @@ -46,17 +46,17 @@ public class ReactorExplosionTrace implements IProcess { energy -= block instanceof BlockLiquid ? 10 : block.getExplosionResistance(null); boolean blockRemoved = false; - if (energy >= 0) { + if (energy >= 0 && block != Blocks.air) { worldObj.setBlockToAir(xCoord, y, zCoord); blockRemoved = true; } energy -= 0.5F + (0.1F * (yCoord - y)); - if (energy <= 0 && random.nextInt(20) == 0) { - if (random.nextInt(3) > 0) worldObj.setBlock(xCoord, y + (blockRemoved ? 0 : 1), zCoord, Blocks.fire); + if (energy <= 0 && random.nextInt(20) == 0 && blockRemoved) { + if (random.nextInt(3) > 0) worldObj.setBlock(xCoord, y, zCoord, Blocks.fire); else { - worldObj.setBlock(xCoord, y + (blockRemoved ? 0 : 1), zCoord, Blocks.lava); - worldObj.scheduleBlockUpdate(xCoord, y + (blockRemoved ? 0 : 1), zCoord, Blocks.lava, 100); + worldObj.setBlock(xCoord, y, zCoord, Blocks.flowing_lava); + //worldObj.scheduleBlockUpdate(xCoord, y, zCoord, Blocks.flowing_lava, 100); } } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorCore.java b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorCore.java index cadb5a30..20e2f10f 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorCore.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorCore.java @@ -1,14 +1,16 @@ package com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor; +import com.brandon3055.brandonscore.BrandonsCore; import com.brandon3055.brandonscore.common.handlers.ProcessHandler; +import com.brandon3055.brandonscore.common.utills.Utills; import com.brandon3055.draconicevolution.DraconicEvolution; import com.brandon3055.draconicevolution.client.gui.GuiHandler; import com.brandon3055.draconicevolution.client.render.particle.Particles; import com.brandon3055.draconicevolution.common.blocks.multiblock.IIsSlave; import com.brandon3055.draconicevolution.common.blocks.multiblock.MultiblockHelper.TileLocation; +import com.brandon3055.draconicevolution.common.handler.ConfigHandler; import com.brandon3055.draconicevolution.common.lib.References; import com.brandon3055.draconicevolution.common.tileentities.TileObjectSync; -import com.brandon3055.draconicevolution.common.utills.LogHelper; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.relauncher.Side; @@ -35,20 +37,19 @@ public class TileReactorCore extends TileObjectSync { public static final int STATE_START = 1; public static final int STATE_ONLINE = 2; public static final int STATE_STOP = 3; + public static final int STATE_INVALID = 4; public int reactorState = 0; public float renderRotation = 0; public float renderSpeed = 0; - public float renderMaxSpeed = 0; - public boolean isStructureValid = true; - public boolean isActive = true; + public boolean isStructureValid = false; public float stabilizerRender = 0F; private boolean startupInitialized = false; public int tick = 0; //Key operational figures public int reactorFuel = 0; - public int convertedFuel = 0; //The amount of fuel that has converted to chaos + public int convertedFuel = 0; //The amount of fuel that has converted public double conversionUnit = 0; //used to smooth out the conversion between int and floating point. When >= 1 minus one and convert one int worth of fuel public double reactionTemperature = 20; @@ -63,14 +64,19 @@ public class TileReactorCore extends TileObjectSync { //####################### //TODO DONT FORGET TO ACTUALLY FINISH ALL THESE THINGS!!!! - //-Bounding box - //-Custom player collision - //-Finish stabilizer place and break mechanics +//Check //-Bounding box +//Check //-Custom player collision +//Check //-Finish stabilizer place and break mechanics +//Check //-Have the GUI tell you if the structure is invalid +//Check //-Config + //TODO things for later //-GUI info (maby speed up gui sync via the container) //-GUI warning red bars //-Maby get around to setting the angle of the stabiliser elements - //-Have the GUI tell you if the structure is invalid - //Config + //-SOUND!!!!! + //-CC Integration + //-Redstone + //-Add reactor and gates to tablet public List stabilizerLocations = new ArrayList(); @@ -83,6 +89,7 @@ public class TileReactorCore extends TileObjectSync { stabilizerRender = (float)Math.min(fieldCharge / (maxFieldCharge * 0.1D), 1D); renderRotation += renderSpeed; //LogHelper.info(renderSpeed +" "+(reactionTemperature)); + checkPlayerCollision(); return; } @@ -94,8 +101,10 @@ public class TileReactorCore extends TileObjectSync { case STATE_START: startingTick(); break; - default: - //reactionTemperature = ((1F + Math.sin((float)tick/50F)) / 2F) * maxReactTemperature; + case STATE_ONLINE: + runTick(); + break; + case STATE_STOP: runTick(); break; } @@ -103,6 +112,19 @@ public class TileReactorCore extends TileObjectSync { detectAndSendChanges(); } + private void checkPlayerCollision(){ + EntityPlayer player = BrandonsCore.proxy.getClientPlayer(); + double distance = Utills.getDistanceAtoB(player.posX, player.posY, player.posZ, xCoord+0.5, yCoord+0.5, zCoord+0.5); + if (distance < (getCoreDiameter()/2) + 0.5){ + double dMod = 1D - (distance / Math.max(0.1, (getCoreDiameter()/2) + 0.5)); + double offsetX = player.posX - xCoord; + double offsetY = player.posY - yCoord; + double offsetZ = player.posZ - zCoord; + double m = 1D * dMod; + player.addVelocity(offsetX*m, offsetY*m, offsetZ*m); + } + } + private void offlineTick(){ if (reactionTemperature > 20) reactionTemperature -= 0.5; if (fieldCharge > 0) fieldCharge-=maxFieldCharge * 0.0005; @@ -113,7 +135,6 @@ public class TileReactorCore extends TileObjectSync { private void startingTick(){ if (!startupInitialized){ - LogHelper.info("init"); int totalFuel = reactorFuel + convertedFuel; maxFieldCharge = totalFuel * 96.45061728395062 * 100; maxEnergySaturation = (int)(totalFuel * 96.45061728395062 * 1000); @@ -128,7 +149,6 @@ public class TileReactorCore extends TileObjectSync { //Inverted core saturation (if multiplied by 100 this creates infinite numbers which breaks the code) double saturation = ((double)energySaturation / (double)maxEnergySaturation); double saturationI = (1D - ((double)energySaturation / (double)maxEnergySaturation)) * 99D; - double field = fieldCharge / maxFieldCharge; double temp = ((reactionTemperature) / maxReactTemperature) * 50D; //The conversion level. Ranges from -0.3 to 1.0 double conversion = (((double)convertedFuel + conversionUnit) / ((double)(convertedFuel + reactorFuel) - conversionUnit) * 1.3) - 0.3D; @@ -156,7 +176,7 @@ public class TileReactorCore extends TileObjectSync { //====================== //Energy Calculation - int baseMaxRFt = maxEnergySaturation / 1000; //todo multiply this by a config value (default 1.0) so the output can be adjusted + int baseMaxRFt = (int)((maxEnergySaturation / 1000D) * ConfigHandler.reactorOutputMultiplier); int maxRFt = (int)(baseMaxRFt * (1D+(conversion*2))); energySaturation += (1D - saturation) * maxRFt; @@ -178,7 +198,7 @@ public class TileReactorCore extends TileObjectSync { //====================== //Calculate Fuel Usage - double useRate = tempDrainFactor * (1D-saturation) * 0.001; //= 1 && reactorFuel > 0){ conversionUnit--; @@ -190,12 +210,9 @@ public class TileReactorCore extends TileObjectSync { //Make BOOM!!! - if ((fieldCharge <= 0 || reactorFuel <= 0) && !hasExploded) { + if ((fieldCharge <= 0) && !hasExploded) { hasExploded = true; - float power = 10F + Math.min(10F, ((float)(convertedFuel + reactorFuel) / 10369F) * 10F); - ProcessHandler.addProcess(new ReactorExplosion(worldObj, xCoord, yCoord, zCoord, power)); - LogHelper.info(power + " " + (int) (power * 100F)); - sendObjectToClient(References.INT_ID, 100, (int) (power * 10F), new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 512)); + goBoom(); } @@ -203,8 +220,16 @@ public class TileReactorCore extends TileObjectSync { //=========== } - private void stoppingTick(){ - + private void goBoom(){ + if (!ConfigHandler.enableReactorBigBoom){ + worldObj.createExplosion(null, xCoord, yCoord, zCoord, 5, true); + }else + { + //float power = 10F + Math.min(10F, ((float) (convertedFuel + reactorFuel) / 10369F) * 10F); + float power = 2F + (((float) (convertedFuel + reactorFuel) / 10369F) * 18F); + ProcessHandler.addProcess(new ReactorExplosion(worldObj, xCoord, yCoord, zCoord, power)); + sendObjectToClient(References.INT_ID, 100, (int) (power * 10F), new NetworkRegistry.TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 512)); + } } @@ -212,14 +237,50 @@ public class TileReactorCore extends TileObjectSync { boolean updateRequired = false; //Check that all of the stabilizers are still valid Iterator i = stabilizerLocations.iterator(); + List stabilizers = new ArrayList(); while (i.hasNext()) { TileLocation location = i.next(); if (!(location.getTileEntity(worldObj) instanceof TileReactorStabilizer) || !((TileReactorStabilizer) location.getTileEntity(worldObj)).masterLocation.isThisLocation(xCoord, yCoord, zCoord)) { i.remove(); updateRequired = true; } + else stabilizers.add((TileReactorStabilizer) location.getTileEntity(worldObj)); } + //Check that there are 4 stabilizers in the correct configuration + isStructureValid = false; + List checkList = new ArrayList(); + for (TileReactorStabilizer stabilizer : stabilizers){ + if (checkList.contains(stabilizer)) continue; + + for (TileReactorStabilizer comp : stabilizers){ + if (!(comp == stabilizer || checkList.contains(comp)) && ForgeDirection.getOrientation(comp.facingDirection) == ForgeDirection.getOrientation(stabilizer.facingDirection).getOpposite()){ + checkList.add(comp); + checkList.add(stabilizer); + if (checkList.size() == 4){ + isStructureValid = true; + if (reactorState == STATE_INVALID) reactorState = STATE_OFFLINE; + break; + } + } + } + } + + for (TileReactorStabilizer stabilizer : stabilizers){ + if (Utills.getDistanceAtoB(stabilizer.xCoord, stabilizer.yCoord, stabilizer.zCoord, xCoord, yCoord, zCoord) < (getMaxCoreDiameter()/2)+1) { + isStructureValid = false; + break; + } + } + + + + if (!isStructureValid) { + reactorState = STATE_INVALID; + if (reactionTemperature >= 2000){ + goBoom(); + } + } if (updateRequired) worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } @@ -235,6 +296,7 @@ public class TileReactorCore extends TileObjectSync { } } } + validateStructure(); } public void onBroken(){ @@ -245,10 +307,10 @@ public class TileReactorCore extends TileObjectSync { } } -// for (TileLocation location : stabilizerLocations) { -// LogHelper.info(location.getTileEntity(worldObj)); -// if (location.getTileEntity(worldObj) instanceof TileReactorStabilizer) ((TileReactorStabilizer) location.getTileEntity(worldObj)).shutDown(); -// } + if (reactionTemperature >= 2000) { + goBoom(); + } + } public boolean onStructureRightClicked(EntityPlayer player){ @@ -284,20 +346,17 @@ public class TileReactorCore extends TileObjectSync { } public boolean canStart(){ - return reactionTemperature >= 2000 && fieldCharge >= (maxFieldCharge / 2) && energySaturation >= (maxEnergySaturation / 2); - } - - public boolean canStop(){ - return reactionTemperature <= 2000; + validateStructure(); + return reactionTemperature >= 2000 && fieldCharge >= (maxFieldCharge / 2) && energySaturation >= (maxEnergySaturation / 2) && isStructureValid; } public void processButtonPress(int button){ - if (button == 0 && reactorState != STATE_ONLINE) reactorState = STATE_START; - else if (button == 1) reactorState = STATE_ONLINE; + validateStructure(); + if (button == 0 && reactorState != STATE_ONLINE && isStructureValid) reactorState = STATE_START; + else if (button == 1 && isStructureValid) reactorState = STATE_ONLINE; else if (button == 2 && reactorState != STATE_OFFLINE) reactorState = STATE_STOP; } - //Getters public double getCoreDiameter(){//todo adjust so the core dose not expand before 1000>2000c //return (((1F + Math.sin((float)tick/50F)) / 2F) * 4) + 0.3; double volume = (double)(reactorFuel + convertedFuel) / 1296D; @@ -305,10 +364,15 @@ public class TileReactorCore extends TileObjectSync { return Math.cbrt(volume / (4/3 * Math.PI)) * 2; } + public double getMaxCoreDiameter(){ + //return (((1F + Math.sin((float)tick/50F)) / 2F) * 4) + 0.3; + double volume = (double)(reactorFuel + convertedFuel) / 1296D; + volume *= 1 + 1 * 10D; + return Math.cbrt(volume / (4/3 * Math.PI)) * 2; + } private boolean isStructureValidCach = false; - private boolean isActiveCach = false; private boolean startupInitializedCach = false; private int reactorStateCach = -1; private int reactorFuelCach = -1; @@ -325,7 +389,7 @@ public class TileReactorCore extends TileObjectSync { if (reactionTemperatureCach != reactionTemperature) reactionTemperatureCach = (Double) sendObjectToClient(References.DOUBLE_ID, 8, reactionTemperature, tp); if (tick % 10 != 0) return; if (isStructureValidCach != isStructureValid) isStructureValidCach = (Boolean) sendObjectToClient(References.BOOLEAN_ID, 0, isStructureValid, tp); - if (isActiveCach != isActive) isActiveCach = (Boolean) sendObjectToClient(References.BOOLEAN_ID, 1, isActive, tp); + //if (isActiveCach != isActive) isActiveCach = (Boolean) sendObjectToClient(References.BOOLEAN_ID, 1, isActive, tp); if (startupInitializedCach != startupInitialized) startupInitializedCach = (Boolean) sendObjectToClient(References.BOOLEAN_ID, 2, startupInitialized, tp); if (reactorStateCach != reactorState) reactorStateCach = (Integer) sendObjectToClient(References.INT_ID, 3, reactorState, tp); if (reactorFuelCach != reactorFuel) reactorFuelCach = (Integer) sendObjectToClient(References.INT_ID, 4, reactorFuel, tp); @@ -342,7 +406,7 @@ public class TileReactorCore extends TileObjectSync { public void receiveObjectFromServer(int index, Object object) { switch (index){ case 0: isStructureValid = (Boolean) object; break; - case 1: isActive = (Boolean) object; break; + //case 1: isActive = (Boolean) object; break; case 2: startupInitialized = (Boolean) object; break; case 3: reactorState = (Integer) object; break; case 4: reactorFuel = (Integer) object; break; @@ -396,7 +460,7 @@ public class TileReactorCore extends TileObjectSync { compound.setByte("State", (byte) reactorState); compound.setBoolean("isStructureValid", isStructureValid); compound.setBoolean("startupInitialized", startupInitialized); - compound.setBoolean("isActive", isActive); + //compound.setBoolean("isActive", isActive); compound.setInteger("energySaturation", energySaturation); compound.setInteger("maxEnergySaturation", maxEnergySaturation); compound.setInteger("reactorFuel", reactorFuel); @@ -424,7 +488,7 @@ public class TileReactorCore extends TileObjectSync { reactorState = compound.getByte("State"); isStructureValid = compound.getBoolean("isStructureValid"); startupInitialized = compound.getBoolean("startupInitialized"); - isActive = compound.getBoolean("isActive"); + //isActive = compound.getBoolean("isActive"); energySaturation = compound.getInteger("energySaturation"); maxEnergySaturation = compound.getInteger("maxEnergySaturation"); reactorFuel = compound.getInteger("reactorFuel"); diff --git a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorStabilizer.java b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorStabilizer.java index 1ac5392a..6a73d702 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorStabilizer.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorStabilizer.java @@ -86,6 +86,7 @@ public class TileReactorStabilizer extends TileEntity implements IIsSlave , IEne ((TileReactorCore) tile).stabilizerLocations.add(new TileLocation(xCoord, yCoord, zCoord)); masterLocation.set(x, y, z); isValid = true; + ((TileReactorCore) tile).validateStructure(); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); return true; }else { diff --git a/src/main/resources/assets/draconicevolution/lang/en_US.lang b/src/main/resources/assets/draconicevolution/lang/en_US.lang index 39583cf1..76fc1d6e 100644 --- a/src/main/resources/assets/draconicevolution/lang/en_US.lang +++ b/src/main/resources/assets/draconicevolution/lang/en_US.lang @@ -30,6 +30,9 @@ tile.draconicevolution:dislocatorReceptacle.name=Dislocator Receptacle tile.draconicevolution:portal.name=Portal tile.draconicevolution:flowGateFlux.name=Flux Gate tile.draconicevolution:flowGateFluid.name=Fluid Gate +tile.draconicevolution:reactorCore.name=Draconic Reactor Core +tile.draconicevolution:reactorStabilizer.name=Reactor Stabilizer +tile.draconicevolution:reactorEnergyInjector.name=Reactor Energy Injector tile.draconicevolution:energyCrystal0.name=Energy Relay tile.draconicevolution:energyCrystal1.name=Advanced Energy Relay @@ -442,8 +445,11 @@ gui.de.status.txt=Status gui.de.status0.txt=OFFLINE gui.de.status1.txt=CHARGING gui.de.status1_5.txt=CHARGED -gui.de.status2.txt=RUNNING +gui.de.status2.txt=ONLINE gui.de.status3.txt=STOPPING +gui.de.status4.txt=INVALID SETUP +gui.de.internalStorage.txt=Internal Storage +gui.de.itemStorage.txt=Item Storage manual.de.pigmenBloodRage.description=Don't let the pigmen see you eating pork you wont like what happens.. diff --git a/src/main/resources/assets/draconicevolution/manual.json b/src/main/resources/assets/draconicevolution/manual.json index 0f0c2987..ea0ea6dd 100644 --- a/src/main/resources/assets/draconicevolution/manual.json +++ b/src/main/resources/assets/draconicevolution/manual.json @@ -535,6 +535,19 @@ "[c]tile.draconicevolution:playerDetectorAdvanced:0" ] }, + { + "name":"tile.draconicevolution:flowGate", + "nameL":"Flow Gates", + "images":[], + "content": + [ + "Gates come in two different flavours flux and fluid. And what they do is simply allow you to control the maximum amount of Redstone Flux or Fluid that can pass through them each tick", + "These devices are very simple to use. They have an input face (blue) and an output face (orange). When you place them the input face will always point towards you similar to the way you place a piston. You can also rotate them with a wrench", + "The GUI is very simple with just 2 values for you to adjust. \"Redstone Signal High\" is the flow when a redstone signal of 15 is applied. \"Redstone Signal Low\" is the flow when a no redstone signal is applied. You can apply a partial signal to vary the actual flow rate between these two numbers. The \"Flow\" indicator at the bottom shows how much energy/fluid is currently able to flow through the device as determined by the received redstone signal.", + "[c]tile.draconicevolution:flowGate:0", + "[c]tile.draconicevolution:flowGate:6" + ] + }, { "name":"tile.draconicevolution:dissEnchanter", "images":[], diff --git a/src/main/resources/assets/draconicevolution/sounds.json b/src/main/resources/assets/draconicevolution/sounds.json index 0cb0570e..ad6641de 100644 --- a/src/main/resources/assets/draconicevolution/sounds.json +++ b/src/main/resources/assets/draconicevolution/sounds.json @@ -3,5 +3,7 @@ "discharge": {"category": "block","sounds": [{"name": "discharge","stream": false}]}, "boom": {"category": "block","sounds": [{"name": "boom","stream": false}]}, "beam": {"category": "block","sounds": [{"name": "beam","stream": false}]}, - "portal": {"category": "player","sounds": [{"name": "portal","stream": false}]} -} \ No newline at end of file + "portal": {"category": "player","sounds": [{"name": "portal","stream": false}]}, + "fusionExplosion": {"category": "master","sounds": [{"name": "fusionExplosion","stream": false}]} +} + diff --git a/src/main/resources/assets/draconicevolution/sounds/fusionExplosion.ogg b/src/main/resources/assets/draconicevolution/sounds/fusionExplosion.ogg new file mode 100644 index 00000000..af2bff80 Binary files /dev/null and b/src/main/resources/assets/draconicevolution/sounds/fusionExplosion.ogg differ diff --git a/src/main/resources/assets/draconicevolution/textures/models/armor/armorDraconic.png b/src/main/resources/assets/draconicevolution/textures/models/armor/armorDraconic.png new file mode 100644 index 00000000..0a5f532a Binary files /dev/null and b/src/main/resources/assets/draconicevolution/textures/models/armor/armorDraconic.png differ diff --git a/src/main/resources/assets/draconicevolution/textures/models/armor/armorWyvern.png b/src/main/resources/assets/draconicevolution/textures/models/armor/armorWyvern.png new file mode 100644 index 00000000..4c6d4611 Binary files /dev/null and b/src/main/resources/assets/draconicevolution/textures/models/armor/armorWyvern.png differ diff --git a/src/main/resources/assets/draconicevolution/textures/models/armor/draconic_layer_1.png b/src/main/resources/assets/draconicevolution/textures/models/armor/draconic_layer_1.png deleted file mode 100644 index 49cf85e4..00000000 Binary files a/src/main/resources/assets/draconicevolution/textures/models/armor/draconic_layer_1.png and /dev/null differ diff --git a/src/main/resources/assets/draconicevolution/textures/models/armor/draconic_layer_2.png b/src/main/resources/assets/draconicevolution/textures/models/armor/draconic_layer_2.png deleted file mode 100644 index 58c4c865..00000000 Binary files a/src/main/resources/assets/draconicevolution/textures/models/armor/draconic_layer_2.png and /dev/null differ diff --git a/src/main/resources/assets/draconicevolution/textures/models/armor/wyvern_layer_1.png b/src/main/resources/assets/draconicevolution/textures/models/armor/wyvern_layer_1.png deleted file mode 100644 index 215face3..00000000 Binary files a/src/main/resources/assets/draconicevolution/textures/models/armor/wyvern_layer_1.png and /dev/null differ diff --git a/src/main/resources/assets/draconicevolution/textures/models/armor/wyvern_layer_2.png b/src/main/resources/assets/draconicevolution/textures/models/armor/wyvern_layer_2.png deleted file mode 100644 index fb4e57bc..00000000 Binary files a/src/main/resources/assets/draconicevolution/textures/models/armor/wyvern_layer_2.png and /dev/null differ