diff --git a/Change Log.txt b/Change Log.txt index 020c0124..37ca4376 100644 --- a/Change Log.txt +++ b/Change Log.txt @@ -1,3 +1,10 @@ +######## 1.0.2-Snapshot 4 ######## +-crystal binder now only rotates blocks when set to the mode change function. +-added config option to switch back to the old 2D armor model. + +######## 1.0.2-Snapshot 3 ######## +-fixed server crash + ######## 1.0.2-Snapshot 2 ######## -fixed energy core crash when placed. @@ -17,7 +24,7 @@ -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. +-added new armor model by @Skele_P. -implemented ore dictionary in recipes. -added Flow Gates. -added Draconic Reactor (WIP) diff --git a/VERSION.json b/VERSION.json index 1d9df66e..3d5ca7f3 100644 --- a/VERSION.json +++ b/VERSION.json @@ -1,3 +1,3 @@ Version:1.0.2 -Snapshot:2 +Snapshot:3 ReleaseNote:The start of the 1.0.2 snapshots! diff --git a/VERSION.txt b/VERSION.txt index 1d9df66e..3d5ca7f3 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,3 +1,3 @@ Version:1.0.2 -Snapshot:2 +Snapshot:3 ReleaseNote:The start of the 1.0.2 snapshots! diff --git a/build.properties b/build.properties index 8c0cafb7..ba67bec9 100644 --- a/build.properties +++ b/build.properties @@ -1,5 +1,5 @@ minecraft_version=1.7.10 -mod_version=1.0.2-Snapshot_2 +mod_version=1.0.2-Snapshot_3 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/client/ClientProxy.java b/src/main/java/com/brandon3055/draconicevolution/client/ClientProxy.java index cffaa3b9..65ceb59f 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.entity.RenderDragonProjectile; import com.brandon3055.draconicevolution.client.render.item.RenderArmor; import com.brandon3055.draconicevolution.client.render.item.RenderBow; import com.brandon3055.draconicevolution.client.render.item.RenderMobSoul; @@ -21,8 +22,10 @@ import com.brandon3055.draconicevolution.common.CommonProxy; import com.brandon3055.draconicevolution.common.ModBlocks; import com.brandon3055.draconicevolution.common.ModItems; import com.brandon3055.draconicevolution.common.blocks.multiblock.IIsSlave; +import com.brandon3055.draconicevolution.common.entity.EntityChaosGuardian; import com.brandon3055.draconicevolution.common.entity.EntityCustomDragon; import com.brandon3055.draconicevolution.common.entity.EntityDragonHeart; +import com.brandon3055.draconicevolution.common.entity.EntityDragonProjectile; import com.brandon3055.draconicevolution.common.handler.ConfigHandler; import com.brandon3055.draconicevolution.common.lib.References; import com.brandon3055.draconicevolution.common.tileentities.*; @@ -140,14 +143,17 @@ public class ClientProxy extends CommonProxy { 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)); + if (!ConfigHandler.useOldArmorModel) + { + 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()); @@ -181,7 +187,9 @@ public class ClientProxy extends CommonProxy { //Entitys RenderingRegistry.registerEntityRenderingHandler(EntityCustomDragon.class, new RenderDragon()); + RenderingRegistry.registerEntityRenderingHandler(EntityChaosGuardian.class, new RenderDragon()); RenderingRegistry.registerEntityRenderingHandler(EntityDragonHeart.class, new RenderDragonHeart()); + RenderingRegistry.registerEntityRenderingHandler(EntityDragonProjectile.class, new RenderDragonProjectile()); } public void registerRenderIDs (){ diff --git a/src/main/java/com/brandon3055/draconicevolution/client/model/ModelDraconicArmor.java b/src/main/java/com/brandon3055/draconicevolution/client/model/ModelDraconicArmor.java index f2a9db10..c46e7f8b 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/model/ModelDraconicArmor.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/model/ModelDraconicArmor.java @@ -100,6 +100,7 @@ public class ModelDraconicArmor extends ModelBiped { public ModelRenderer WyHelmPieceTop3; public ModelRenderer WyHelmPieceTop4; public ModelRenderer WyMainChestPieceMid; + public ModelRenderer WyMainChestPieceTop; public ModelRenderer WyChestPieceTop1; public ModelRenderer WyChestPieceTop2; public ModelRenderer WyChestDecorationPiece3; @@ -257,6 +258,11 @@ public class ModelDraconicArmor extends ModelBiped { this.WyChestPieceTop3.addBox(1.0F, 0.0F, 0.0F, 4, 4, 1, 0.0F); this.setRotateAngle(WyChestPieceTop3, 0.0879645943005142F, 0.08621926504851989F, -0.7890633548266364F); + this.WyMainChestPieceTop = new ModelRenderer(this, 250, 0); + this.WyMainChestPieceTop.setRotationPoint(-5.7F, 0.0F, -2.6F); + this.WyMainChestPieceTop.addBox(1.0F, 0.0F, 0.0F, 2, 4, 1, 0.0F); + this.setRotateAngle(WyMainChestPieceTop, 0.0F, 0.47123889803846897F, 0.0F); + 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); @@ -617,6 +623,7 @@ public class ModelDraconicArmor extends ModelBiped { this.bipedBody.addChild(this.WyChestPieceTop1); this.bipedBody.addChild(this.WyChestPieceTop3); this.bipedBody.addChild(this.WyChestDecorationPiece3); + this.bipedBody.addChild(this.WyMainChestPieceTop); } this.bipedLeftArm.addChild(this.ShoulderPadLeft1); @@ -633,7 +640,7 @@ public class ModelDraconicArmor extends ModelBiped { this.bipedLeftLeg.cubeList.clear(); this.bipedRightLeg.cubeList.clear(); if (isLeggings){ - //this.bipedBody.addChild(this.LeggsTop); + this.bipedBody.addChild(this.LeggsTop); this.bipedLeftLeg.addChild(this.LegPieceLeft1); this.bipedLeftLeg.addChild(this.MainKneePadLeft); @@ -678,11 +685,11 @@ public class ModelDraconicArmor extends ModelBiped { setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.bipedRightLeg.render(f5); - this.bipedBody.render(f5); + this.bipedBody.render(f5*1.05F);// * 1.1F); this.bipedLeftArm.render(f5); this.bipedRightArm.render(f5); this.bipedLeftLeg.render(f5); - this.bipedHead.render(f5); + this.bipedHead.render(f5*1.05F); } /** diff --git a/src/main/java/com/brandon3055/draconicevolution/client/render/entity/RenderDragon.java b/src/main/java/com/brandon3055/draconicevolution/client/render/entity/RenderDragon.java index 68a78a57..c19b1f51 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/render/entity/RenderDragon.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/render/entity/RenderDragon.java @@ -1,6 +1,6 @@ package com.brandon3055.draconicevolution.client.render.entity; -import com.brandon3055.draconicevolution.common.entity.EntityCustomDragon; +import com.brandon3055.draconicevolution.common.entity.EntityChaosGuardian; import com.brandon3055.draconicevolution.common.lib.References; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -13,6 +13,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.boss.BossStatus; +import net.minecraft.entity.boss.EntityDragon; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; @@ -40,7 +41,7 @@ public class RenderDragon extends RenderLiving this.setRenderPassModel(this.mainModel); } - protected void rotateCorpse(EntityCustomDragon p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) + protected void rotateCorpse(EntityDragon p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) { float f3 = (float)p_77043_1_.getMovementOffsets(7, p_77043_4_)[0]; float f4 = (float)(p_77043_1_.getMovementOffsets(5, p_77043_4_)[1] - p_77043_1_.getMovementOffsets(10, p_77043_4_)[1]); @@ -65,7 +66,7 @@ public class RenderDragon extends RenderLiving /** * Renders the model in RenderLiving */ - protected void renderModel(EntityCustomDragon p_77036_1_, float p_77036_2_, float p_77036_3_, float p_77036_4_, float p_77036_5_, float p_77036_6_, float p_77036_7_) + protected void renderModel(EntityDragon p_77036_1_, float p_77036_2_, float p_77036_3_, float p_77036_4_, float p_77036_5_, float p_77036_6_, float p_77036_7_) { if (p_77036_1_.deathTicks > 0) { @@ -102,7 +103,7 @@ public class RenderDragon extends RenderLiving * (Render= -0.3F) { + this.worldObj.playSound(this.posX, this.posY, this.posZ, "mob.enderdragon.wings", 5.0F, 0.8F + this.rand.nextFloat() * 0.3F, false); + } + } + + this.prevAnimTime = this.animTime; + float f2; + + if (!worldObj.isRemote) { + updateTarget(); + customAIUpdate(); + } + + if (this.getHealth() <= 0.0F) { + f = (this.rand.nextFloat() - 0.5F) * 8.0F; + f1 = (this.rand.nextFloat() - 0.5F) * 4.0F; + f2 = (this.rand.nextFloat() - 0.5F) * 8.0F; + this.worldObj.spawnParticle("largeexplode", this.posX + (double) f, this.posY + 2.0D + (double) f1, this.posZ + (double) f2, 0.0D, 0.0D, 0.0D); + } else { + this.updateDragonEnderCrystal(); + f = 0.2F / (MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ) * 10.0F + 1.0F); + f *= moveSpeedMultiplier; + f *= (float) Math.pow(2.0D, this.motionY); + + if (this.slowed) { + this.animTime += f * 0.5F; + } else { + this.animTime += f; + } + + this.rotationYaw = MathHelper.wrapAngleTo180_float(this.rotationYaw); + + if (this.ringBufferIndex < 0) { + for (int i = 0; i < this.ringBuffer.length; ++i) { + this.ringBuffer[i][0] = (double) this.rotationYaw; + this.ringBuffer[i][1] = this.posY; + } + } + + if (++this.ringBufferIndex == this.ringBuffer.length) { + this.ringBufferIndex = 0; + } + + this.ringBuffer[this.ringBufferIndex][0] = (double) this.rotationYaw; + this.ringBuffer[this.ringBufferIndex][1] = this.posY; + double d0; + double d1; + double d2; + double d10; + float f12; + + if (this.worldObj.isRemote) { + if (this.newPosRotationIncrements > 0) { + d10 = this.posX + (this.newPosX - this.posX) / (double) this.newPosRotationIncrements; + d0 = this.posY + (this.newPosY - this.posY) / (double) this.newPosRotationIncrements; + d1 = this.posZ + (this.newPosZ - this.posZ) / (double) this.newPosRotationIncrements; + d2 = MathHelper.wrapAngleTo180_double(this.newRotationYaw - (double) this.rotationYaw); + this.rotationYaw = (float) ((double) this.rotationYaw + d2 / (double) this.newPosRotationIncrements); + this.rotationPitch = (float) ((double) this.rotationPitch + (this.newRotationPitch - (double) this.rotationPitch) / (double) this.newPosRotationIncrements); + --this.newPosRotationIncrements; + this.setPosition(d10, d0, d1); + this.setRotation(this.rotationYaw, this.rotationPitch); + } + } else { + + d10 = this.targetX - this.posX; + d0 = this.targetY - this.posY; + d1 = this.targetZ - this.posZ; + d2 = d10 * d10 + d0 * d0 + d1 * d1; + + if (this.target != null) { + if (behaviour == EnumBehaviour.CIRCLE_PLAYER){ + this.targetX = this.target.posX + (int)(Math.cos(circlePosition) * 60); + this.targetZ = this.target.posZ + (int)(Math.sin(circlePosition) * 60); + moveSpeedMultiplier = 1F + Math.min(((float) Utills.getDistanceAtoB(targetX, targetZ, posX, posZ) / 50) * 3F, 3F); + LogHelper.info((int)(Math.sin(circlePosition) * 60) + " " + (int)(Math.cos(circlePosition) * 60)+" "+moveSpeedMultiplier); + }else { + this.targetX = this.target.posX; + this.targetZ = this.target.posZ; + } + + double d3 = this.targetX - this.posX; + double d5 = this.targetZ - this.posZ; + double d7 = Math.sqrt(d3 * d3 + d5 * d5); + double d8 = 0.4000000059604645D + d7 / 80.0D - 1.0D; + + if (d8 > 10.0D) { + d8 = 10.0D; + } + + this.targetY = this.target.boundingBox.minY + d8 + (behaviour == EnumBehaviour.CIRCLE_PLAYER ? 20 : 0); + } else { + this.targetX += this.rand.nextGaussian() * 2.0D; + this.targetZ += this.rand.nextGaussian() * 2.0D; + } + + if (this.forceNewTarget || d2 < 100.0D || d2 > 22500.0D || this.isCollidedHorizontally || this.isCollidedVertically) this.setNewTarget(); + + + d0 /= (double) MathHelper.sqrt_double(d10 * d10 + d1 * d1); + //if (isUber) f12 = 1.0F;//Verticle Motion Speed + //else + f12 = 0.6F; + + if (d0 < (double) (-f12)) { + d0 = (double) (-f12); + } + + if (d0 > (double) f12) { + d0 = (double) f12; + } + + this.motionY += d0 * 0.10000000149011612D; + this.rotationYaw = MathHelper.wrapAngleTo180_float(this.rotationYaw); + double d4 = 180.0D - Math.atan2(d10, d1) * 180.0D / Math.PI; + double d6 = MathHelper.wrapAngleTo180_double(d4 - (double) this.rotationYaw); + + if (d6 > 50.0D) { + d6 = 50.0D; + } + + if (d6 < -50.0D) { + d6 = -50.0D; + } + + Vec3 vec3 = Vec3.createVectorHelper(this.targetX - this.posX, this.targetY - this.posY, this.targetZ - this.posZ).normalize(); + Vec3 vec32 = Vec3.createVectorHelper((double) MathHelper.sin(this.rotationYaw * (float) Math.PI / 180.0F), this.motionY, (double) (-MathHelper.cos(this.rotationYaw * (float) Math.PI / 180.0F))).normalize(); + float f5 = (float) (vec32.dotProduct(vec3) + 0.5D) / 1.5F; + + if (f5 < 0.0F) { + f5 = 0.0F; + } + + this.randomYawVelocity *= 0.8F; + float f6 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ) * 1.0F + 1.0F; + double d9 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ) * 1.0D + 1.0D; + + if (d9 > 40.0D) { + d9 = 40.0D; + } + + this.randomYawVelocity = (float) ((double) this.randomYawVelocity + d6 * (0.699999988079071D / d9 / (double) f6)); + this.rotationYaw += this.randomYawVelocity * 0.1F; + float f7 = (float) (2.0D / (d9 + 1.0D)); + float f8 = 0.06F; + this.moveFlying(0.0F, -1.0F, f8 * (f5 * f7 + (1.0F - f7))); + + if (this.slowed) { + this.moveEntity(this.motionX * 0.800000011920929D * moveSpeedMultiplier, this.motionY * 0.800000011920929D * moveSpeedMultiplier, this.motionZ * 0.800000011920929D * moveSpeedMultiplier); + } + else { + this.moveEntity(this.motionX * moveSpeedMultiplier, this.motionY * moveSpeedMultiplier, this.motionZ * moveSpeedMultiplier); + } + + Vec3 vec31 = Vec3.createVectorHelper(this.motionX, this.motionY, this.motionZ).normalize(); + float f9 = (float) (vec31.dotProduct(vec32) + 1.0D) / 2.0F; + f9 = 0.8F + 0.15F * f9; + this.motionX *= (double) f9; + this.motionZ *= (double) f9; + this.motionY *= 0.9100000262260437D; + } + + this.renderYawOffset = this.rotationYaw; + this.dragonPartHead.width = this.dragonPartHead.height = 3.0F; + this.dragonPartTail1.width = this.dragonPartTail1.height = 2.0F; + this.dragonPartTail2.width = this.dragonPartTail2.height = 2.0F; + this.dragonPartTail3.width = this.dragonPartTail3.height = 2.0F; + this.dragonPartBody.height = 3.0F; + this.dragonPartBody.width = 5.0F; + this.dragonPartWing1.height = 2.0F; + this.dragonPartWing1.width = 4.0F; + this.dragonPartWing2.height = 3.0F; + this.dragonPartWing2.width = 4.0F; + f1 = (float) (this.getMovementOffsets(5, 1.0F)[1] - this.getMovementOffsets(10, 1.0F)[1]) * 10.0F / 180.0F * (float) Math.PI; + f2 = MathHelper.cos(f1); + float f10 = -MathHelper.sin(f1); + float f3 = this.rotationYaw * (float) Math.PI / 180.0F; + float f11 = MathHelper.sin(f3); + float f4 = MathHelper.cos(f3); + this.dragonPartBody.onUpdate(); + this.dragonPartBody.setLocationAndAngles(this.posX + (double) (f11 * 0.5F), this.posY, this.posZ - (double) (f4 * 0.5F), 0.0F, 0.0F); + this.dragonPartWing1.onUpdate(); + this.dragonPartWing1.setLocationAndAngles(this.posX + (double) (f4 * 4.5F), this.posY + 2.0D, this.posZ + (double) (f11 * 4.5F), 0.0F, 0.0F); + this.dragonPartWing2.onUpdate(); + this.dragonPartWing2.setLocationAndAngles(this.posX - (double) (f4 * 4.5F), this.posY + 2.0D, this.posZ - (double) (f11 * 4.5F), 0.0F, 0.0F); + + if (!this.worldObj.isRemote && this.hurtTime == 0) { + this.collideWithEntities(this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.dragonPartWing1.boundingBox.expand(4.0D, 2.0D, 4.0D).offset(0.0D, -2.0D, 0.0D))); + this.collideWithEntities(this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.dragonPartWing2.boundingBox.expand(4.0D, 2.0D, 4.0D).offset(0.0D, -2.0D, 0.0D))); + this.attackEntitiesInList(this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.dragonPartHead.boundingBox.expand(1.0D, 1.0D, 1.0D))); + } + + double[] adouble1 = this.getMovementOffsets(5, 1.0F); + double[] adouble = this.getMovementOffsets(0, 1.0F); + f12 = MathHelper.sin(this.rotationYaw * (float) Math.PI / 180.0F - this.randomYawVelocity * 0.01F); + float f13 = MathHelper.cos(this.rotationYaw * (float) Math.PI / 180.0F - this.randomYawVelocity * 0.01F); + this.dragonPartHead.onUpdate(); + this.dragonPartHead.setLocationAndAngles(this.posX + (double) (f12 * 5.5F * f2), this.posY + (adouble[1] - adouble1[1]) * 1.0D + (double) (f10 * 5.5F), this.posZ - (double) (f13 * 5.5F * f2), 0.0F, 0.0F); + + for (int j = 0; j < 3; ++j) { + EntityDragonPart entitydragonpart = null; + + if (j == 0) { + entitydragonpart = this.dragonPartTail1; + } + + if (j == 1) { + entitydragonpart = this.dragonPartTail2; + } + + if (j == 2) { + entitydragonpart = this.dragonPartTail3; + } + + double[] adouble2 = this.getMovementOffsets(12 + j * 2, 1.0F); + float f14 = this.rotationYaw * (float) Math.PI / 180.0F + this.simplifyAngle(adouble2[0] - adouble1[0]) * (float) Math.PI / 180.0F * 1.0F; + float f15 = MathHelper.sin(f14); + float f16 = MathHelper.cos(f14); + float f17 = 1.5F; + float f18 = (float) (j + 1) * 2.0F; + entitydragonpart.onUpdate(); + entitydragonpart.setLocationAndAngles(this.posX - (double) ((f11 * f17 + f15 * f18) * f2), this.posY + (adouble2[1] - adouble1[1]) * 1.0D - (double) ((f18 + f17) * f10) + 1.5D, this.posZ + (double) ((f4 * f17 + f16 * f18) * f2), 0.0F, 0.0F); + } + + if (!this.worldObj.isRemote) { + this.slowed = this.destroyBlocksInAABB(this.dragonPartHead.boundingBox) | this.destroyBlocksInAABB(this.dragonPartBody.boundingBox); + } + } + + } + + + private void customAIUpdate(){ + + //LogHelper.info(homeX+" "+homeZ); + + switch (behaviour){ + case ROAMING: + if (worldObj.getClosestPlayer(homeX, homeY, homeZ, 200) != null) behaviour = EnumBehaviour.CIRCLE_PLAYER; + break; + case GO_HOME: + if (Utills.getDistanceAtoB(posX, posZ, homeX, homeZ) < 70 ) behaviour = EnumBehaviour.ROAMING; + break; + case GUARDING: + break; + case CHARGING: + if (Utills.getDistanceAtoB(posX, posZ, homeX, homeZ) > 300) behaviour = EnumBehaviour.GO_HOME; + break; + case CIRCLE_PLAYER: + circlePosition += (0.02F * circleDirection); + if (Utills.getDistanceAtoB(posX, posZ, homeX, homeZ) > 300) behaviour = EnumBehaviour.GO_HOME; + + + break; + case AVOID_PLAYERS: + break; + case RETREAT: + break; + case DEAD: + break; + } + + } + + private void updateTarget(){ + switch (behaviour){ + case ROAMING: + + + break; + case GO_HOME: + + + break; + case GUARDING: + + + break; + case CHARGING: + + + break; + case CIRCLE_PLAYER: + + + break; + case AVOID_PLAYERS: + + + break; + case RETREAT: + + + break; + case DEAD: + + + break; + } + } + + private void setNewTarget() { + this.forceNewTarget = false; + + + switch (behaviour){ + case ROAMING: + + boolean flag = false; + do { + this.targetX = homeX; + this.targetY = (double) (homeY + this.rand.nextFloat() * 50.0F); + this.targetZ = homeZ; + this.targetX += (double) (this.rand.nextFloat() * 120.0F - 60.0F); + this.targetZ += (double) (this.rand.nextFloat() * 120.0F - 60.0F); + double d0 = this.posX - this.targetX; + double d1 = this.posY - this.targetY; + double d2 = this.posZ - this.targetZ; + flag = d0 * d0 + d1 * d1 + d2 * d2 > 100.0D; + } while (!flag); + this.target = null; + + break; + case GO_HOME: + case GUARDING: + + this.targetX = homeX; + this.targetY = (double) (homeY + this.rand.nextFloat() * 50.0F); + this.targetZ = homeZ; + this.target = null; + + break; + case CHARGING: + case CIRCLE_PLAYER: + + if (worldObj.getClosestPlayer(homeX, homeY, homeZ, 200) != null) this.target = worldObj.getClosestPlayer(homeX, homeY, homeZ, 200); + + break; + case AVOID_PLAYERS: + + + break; + case RETREAT: + + + break; + case DEAD: + + + break; + } + + } + + private static enum EnumBehaviour { + ROAMING(1F), + GO_HOME(1F), + GUARDING(1F), + CHARGING(1F), + CIRCLE_PLAYER(1.2F), + AVOID_PLAYERS(1F), + RETREAT(1F), + DEAD(1F); + public float dragonSpeed; + private EnumBehaviour(float dragonSpeed) {this.dragonSpeed = dragonSpeed;} + + } + + + + + + + @Override + protected void onDeathUpdate() { +// if (deathTicks == 0 && !isUber) +// { +// for (int ix = -150; ix < 150; ix++) { +// for (int iz = -150; iz < 150; iz++) { +// if (worldObj.getBlock(ix, homeY, iz) == Blocks.bedrock && worldObj.getBlock(ix, homeY - 1, iz) == Blocks.bedrock) { +// homeX = ix; +// homeZ = iz; +// createPortal = false; +// break; +// } +// } +// } +// if (ConfigHandler.dragonEggSpawnLocation[0] != 0 || ConfigHandler.dragonEggSpawnLocation[1] != 0 || ConfigHandler.dragonEggSpawnLocation[1] != 0) { +// createPortal = false; +// homeX = ConfigHandler.dragonEggSpawnLocation[0]; +// homeY = ConfigHandler.dragonEggSpawnLocation[1]; +// homeZ = ConfigHandler.dragonEggSpawnLocation[2]; +// } +// } + + ++this.deathTicks; + + if (worldObj.rand.nextInt(5) == 2) + { + EntityLightningBolt bolt = new EntityLightningBolt(worldObj, homeX, homeY + 1, homeZ); + bolt.ignoreFrustumCheck = true; + worldObj.addWeatherEffect(bolt); + } + + if (this.deathTicks >= 180 && this.deathTicks <= 200) { + float f = (this.rand.nextFloat() - 0.5F) * 8.0F; + float f1 = (this.rand.nextFloat() - 0.5F) * 4.0F; + float f2 = (this.rand.nextFloat() - 0.5F) * 8.0F; + this.worldObj.spawnParticle("hugeexplosion", this.posX + (double) f, this.posY + 2.0D + (double) f1, this.posZ + (double) f2, 0.0D, 0.0D, 0.0D); + } + + int i; + int j; + + if (!this.worldObj.isRemote) { + if (this.deathTicks > 150 && this.deathTicks % 5 == 0) { + i = 1000; + + while (i > 0) { + j = EntityXPOrb.getXPSplit(i); + i -= j; + this.worldObj.spawnEntityInWorld(new EntityXPOrb(this.worldObj, this.posX, this.posY, this.posZ, j)); + } + } + + if (this.deathTicks == 1) { + this.worldObj.playBroadcastSound(1018, (int) this.posX, (int) this.posY, (int) this.posZ, 0); + } + } + + this.moveEntity(0.0D, 0.10000000149011612D, 0.0D); + this.renderYawOffset = this.rotationYaw += 20.0F; + + if (this.deathTicks == 200 && !this.worldObj.isRemote) { + i = 2000; + + while (i > 0) { + j = EntityXPOrb.getXPSplit(i); + i -= j; + this.worldObj.spawnEntityInWorld(new EntityXPOrb(this.worldObj, this.posX, this.posY, this.posZ, j)); + } + + spawnEgg(); + setDead(); + } + } + + private void collideWithEntities(List par1List) { +// if (true) return; +// +// double d0 = (this.dragonPartBody.boundingBox.minX + this.dragonPartBody.boundingBox.maxX) / 2.0D; +// double d1 = (this.dragonPartBody.boundingBox.minZ + this.dragonPartBody.boundingBox.maxZ) / 2.0D; +// Iterator iterator = par1List.iterator(); +// +// while (iterator.hasNext()) { +// Entity entity = (Entity) iterator.next(); +// +// if (entity instanceof EntityLivingBase) { +// double d2 = entity.posX - d0; +// double d3 = entity.posZ - d1; +// double d4 = d2 * d2 + d3 * d3; +// if (rand.nextInt(isUber ? 3 : 10) == 0) entity.addVelocity(d2 / d4 * 8.0D, 5.20000000298023224D, d3 / d4 * 8.0D); +// entity.velocityChanged = true; +// ((EntityLivingBase)entity).setLastAttacker(this); +// } +// if (entity instanceof EntityLivingBase && isUber){ +// ((EntityLivingBase)entity).setLastAttacker(this); +// entity.attackEntityFrom(new DamageSourceChaos(this), 20F); +// } +// } + } + + private void attackEntitiesInList(List par1List) { +// for (int i = 0; i < par1List.size(); ++i) { +// Entity entity = (Entity) par1List.get(i); +// +// if (entity instanceof EntityLivingBase && !isUber) { +// ((EntityLivingBase)entity).setLastAttacker(this); +// entity.attackEntityFrom(DamageSource.causeMobDamage(this), attackDamage); +// } +// if (entity instanceof EntityLivingBase && isUber){ +// ((EntityLivingBase)entity).setLastAttacker(this); +// entity.attackEntityFrom(new DamageSourceChaos(this), 50F); +// } +// } + } + + private void updateDragonEnderCrystal() { +// if (this.healingEnderCrystal != null) { +// if (this.healingEnderCrystal.isDead) { +// if (!this.worldObj.isRemote) { +// this.attackEntityFromPart(this.dragonPartHead, DamageSource.setExplosionSource((Explosion) null), 10.0F); +// } +// +// this.healingEnderCrystal = null; +// } else if (this.ticksExisted % 10 == 0 && this.getHealth() < this.getMaxHealth()) { +// if (isUber) this.setHealth(this.getHealth() + 10.0F); +// else this.setHealth(this.getHealth() + 1.0F); +// } +// } + + if (this.rand.nextInt(10) == 0) { + float f = 32.0F; + List list = this.worldObj.getEntitiesWithinAABB(EntityEnderCrystal.class, this.boundingBox.expand((double) f, (double) f, (double) f)); + EntityEnderCrystal entityendercrystal = null; + double d0 = Double.MAX_VALUE; + Iterator iterator = list.iterator(); + + while (iterator.hasNext()) { + EntityEnderCrystal entityendercrystal1 = (EntityEnderCrystal) iterator.next(); + double d1 = entityendercrystal1.getDistanceSqToEntity(this); + + if (d1 < d0) { + d0 = d1; + entityendercrystal = entityendercrystal1; + } + } + + this.healingEnderCrystal = entityendercrystal; + } + } + + private float simplifyAngle(double par1) { + return (float) MathHelper.wrapAngleTo180_double(par1); + } + + private boolean destroyBlocksInAABB(AxisAlignedBB par1AxisAlignedBB) { + if (!ConfigHandler.dragonBreaksBlocks) return false; + + int i = MathHelper.floor_double(par1AxisAlignedBB.minX); + int j = MathHelper.floor_double(par1AxisAlignedBB.minY); + int k = MathHelper.floor_double(par1AxisAlignedBB.minZ); + int l = MathHelper.floor_double(par1AxisAlignedBB.maxX); + int i1 = MathHelper.floor_double(par1AxisAlignedBB.maxY); + int j1 = MathHelper.floor_double(par1AxisAlignedBB.maxZ); + boolean flag = false; + boolean flag1 = false; + + for (int k1 = i; k1 <= l; ++k1) { + for (int l1 = j; l1 <= i1; ++l1) { + for (int i2 = k; i2 <= j1; ++i2) { + Block block = this.worldObj.getBlock(k1, l1, i2); + + if (!block.isAir(worldObj, k1, l1, i2)) { + if (block.canEntityDestroy(worldObj, k1, l1, i2, this) && this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing")) { + flag1 = this.worldObj.setBlockToAir(k1, l1, i2) || flag1; + } else { + flag = true; + } + } + } + } + } + + if (flag1) { + double d1 = par1AxisAlignedBB.minX + (par1AxisAlignedBB.maxX - par1AxisAlignedBB.minX) * (double) this.rand.nextFloat(); + double d2 = par1AxisAlignedBB.minY + (par1AxisAlignedBB.maxY - par1AxisAlignedBB.minY) * (double) this.rand.nextFloat(); + double d0 = par1AxisAlignedBB.minZ + (par1AxisAlignedBB.maxZ - par1AxisAlignedBB.minZ) * (double) this.rand.nextFloat(); + this.worldObj.spawnParticle("largeexplode", d1, d2, d0, 0.0D, 0.0D, 0.0D); + } + + return flag; + } + + private void spawnEgg() { +// if (ConfigHandler.dragonEggSpawnLocation[0] != 0 || ConfigHandler.dragonEggSpawnLocation[1] != 0 || ConfigHandler.dragonEggSpawnLocation[1] != 0 && !isUber) { +// homeX = ConfigHandler.dragonEggSpawnLocation[0]; +// homeY = ConfigHandler.dragonEggSpawnLocation[1]; +// homeZ = ConfigHandler.dragonEggSpawnLocation[2]; +// } +// +// BlockEndPortal.field_149948_a = true; +// +// if (createPortal || isUber) { +// createEnderPortal(homeX, homeZ); +// } +// LogHelper.info("spawn egg"); +// if (worldObj.getBlock(homeX, homeY + 1, homeZ) == Blocks.air) { +// worldObj.setBlock(homeX, homeY + 1, homeZ, Blocks.dragon_egg); +// LogHelper.info("spawn egg2 " + homeX + " " + homeY + " " + homeZ); +// }else { +// for (int i = homeY + 1; i < 250; i++) { +// if (worldObj.getBlock(homeX, i, homeZ) == Blocks.air) { +// worldObj.setBlock(homeX, i, homeZ, Blocks.dragon_egg); +// LogHelper.info("spawn egg3"); +// break; +// } +// } +// } +// +// for (int iX = homeX - 2; iX <= homeX + 2; iX++) +// { +// for (int iZ = homeZ - 2; iZ <= homeZ + 2; iZ++) +// { +// +// if (worldObj.getBlock(iX, homeY - 4, iZ) == Blocks.bedrock && !(iX == homeX && iZ == homeZ)) +// { +// worldObj.setBlock(iX, homeY - 3, iZ, Blocks.end_portal); +// } +// } +// } +// +// +// worldObj.setBlock(homeX - 1, homeY - 1, homeZ, Blocks.torch); +// worldObj.setBlock(homeX + 1, homeY - 1, homeZ, Blocks.torch); +// worldObj.setBlock(homeX, homeY - 1, homeZ - 1, Blocks.torch); +// worldObj.setBlock(homeX, homeY - 1, homeZ + 1, Blocks.torch); +// +// +// BlockEndPortal.field_149948_a = false; + } + + private void createEnderPortal(int par1, int par2) { + int b0 = homeY -3; + byte b1 = 4; + + for (int k = b0 - 1; k <= b0 + 32; ++k) + { + for (int l = par1 - b1; l <= par1 + b1; ++l) + { + for (int i1 = par2 - b1; i1 <= par2 + b1; ++i1) + { + double d0 = (double)(l - par1); + double d1 = (double)(i1 - par2); + double d2 = d0 * d0 + d1 * d1; + + if (d2 <= ((double)b1 - 0.5D) * ((double)b1 - 0.5D)) + { + if (k < b0) + { + if (d2 <= ((double)(b1 - 1) - 0.5D) * ((double)(b1 - 1) - 0.5D)) + { + this.worldObj.setBlock(l, k, i1, Blocks.bedrock); + } + } + else if (k > b0) + { + this.worldObj.setBlock(l, k, i1, Blocks.air); + } + else if (d2 > ((double)(b1 - 1) - 0.5D) * ((double)(b1 - 1) - 0.5D)) + { + this.worldObj.setBlock(l, k, i1, Blocks.bedrock); + } + } + } + } + } + + this.worldObj.setBlock(par1, b0 + 0, par2, Blocks.bedrock); + this.worldObj.setBlock(par1, b0 + 1, par2, Blocks.bedrock); + this.worldObj.setBlock(par1, b0 + 2, par2, Blocks.bedrock); + this.worldObj.setBlock(par1, b0 + 3, par2, Blocks.bedrock); + } + + @Override + public void writeToNBT(NBTTagCompound compound) { + super.writeToNBT(compound); + compound.setInteger("HomeX", homeX); + compound.setInteger("HomeY", homeY); + compound.setInteger("HomeZ", homeZ); + compound.setString("Behaviour", behaviour.name()); + } + + @Override + public void readFromNBT(NBTTagCompound compound) { + super.readFromNBT(compound); + + homeX = compound.getInteger("HomeX"); + homeY = compound.getInteger("HomeY"); + homeZ = compound.getInteger("HomeZ"); + if (compound.hasKey("Behaviour")) behaviour = EnumBehaviour.valueOf(compound.getString("Behaviour")); + } + + @Override + protected boolean canDespawn() { + return false; + } + + @Override + protected void despawnEntity() { + + } + + @Override + public boolean attackEntityFrom(DamageSource damageSource, float dmg) { +// if (damageSource.getEntity() != null && getDistanceToEntity(damageSource.getEntity()) > 100) { +// LogHelper.info("cancel attack"); +// return false; +// } + return super.attackEntityFrom(damageSource, dmg); + } + + @Override + public boolean attackEntityFromPart(EntityDragonPart p_70965_1_, DamageSource damageSource, float p_70965_3_) { +// if (damageSource.getEntity() != null && Utills.getDistanceAtoB(damageSource.getEntity().posX)getDistanceToEntity(damageSource.getEntity()) > 100) { +// LogHelper.info("cancel attack"); +// return false; +// } + return super.attackEntityFromPart(p_70965_1_, damageSource, p_70965_3_); + } + + @Override + public void travelToDimension(int p_71027_1_) {} +} diff --git a/src/main/java/com/brandon3055/draconicevolution/common/entity/EntityDragonProjectile.java b/src/main/java/com/brandon3055/draconicevolution/common/entity/EntityDragonProjectile.java new file mode 100644 index 00000000..2d7c61b5 --- /dev/null +++ b/src/main/java/com/brandon3055/draconicevolution/common/entity/EntityDragonProjectile.java @@ -0,0 +1,63 @@ +package com.brandon3055.draconicevolution.common.entity; + +import net.minecraft.entity.Entity; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +/** + * Created by brandon3055 on 23/8/2015. + */ +public class EntityDragonProjectile extends Entity { + + public int type; + public Entity target; + public float power; + public boolean isChaser; + + //public static final int FIREBALL = 0; /** Generic fireball a lot more powerful then ghast fireball */ + public static final int FIREBOMB = 1; /** Large fireball with a trail and large fiery AOE */ + public static final int ENDER_PORT = 2; /** Ender pearl which teleports the player away if it hits. */ + public static final int FIRE_CHASER = 3; /** Fireball that chases the player it is fired at (Explodes on impact with blocks) */ + public static final int ENERGY_CHASER = 4; /** Energy gall that chases the player. (Can pass through blocks) */ + public static final int CHAOS_CHASER = 5; /** Chases player. On impact splits into mini chaos charges which lock on to other or the same player (can pass through blocks) */ + public static final int MINI_CHAOS_CHASER = 6; /** ^ */ + public static final int IGNITION_CHARGE = 7; /** Reignites Crystals */ + + public EntityDragonProjectile(World world){ + this(world, 1, null, 5); + } + + public EntityDragonProjectile(World world, int type, Entity target, float power) { + super(world); + this.type = type; + this.target = target; + this.power = power; + this.isChaser = type == FIRE_CHASER || type == ENERGY_CHASER || type == CHAOS_CHASER || type == MINI_CHAOS_CHASER || type == IGNITION_CHARGE; + this.setSize(0.5F, 0.5F); + } + + @Override + protected void entityInit() { + + } + + @Override + public void onUpdate() { + super.onUpdate(); + } + + @Override + public void onEntityUpdate() { + super.onEntityUpdate(); + } + + @Override + protected void readEntityFromNBT(NBTTagCompound p_70037_1_) { + + } + + @Override + protected void writeEntityToNBT(NBTTagCompound p_70014_1_) { + + } +} 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 ce051811..4ce8c95a 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/handler/ConfigHandler.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/handler/ConfigHandler.java @@ -40,6 +40,8 @@ public class ConfigHandler { public static List speedLimitDimList = new ArrayList(); public static boolean speedLimitops; public static boolean rapidlyDespawnMinedItems; + public static boolean useOldArmorModel; + //spawner public static String[] spawnerList; public static boolean spawnerListType; @@ -104,6 +106,7 @@ public class ConfigHandler { speedDimBlackList = config.get(Configuration.CATEGORY_GENERAL, "Speed limit Dim black lack list", new int[] {1}, "A list of dimensions the speed limit will not effect (speed limit is not so really required in the end)").getIntList(); speedLimitops = config.get(Configuration.CATEGORY_GENERAL, "Speed limit effects ops", false, "Dose the speed limit effect ops").getBoolean(false); rapidlyDespawnMinedItems = config.get(Configuration.CATEGORY_GENERAL, "Rapidly despawn aoe mined items", false, "If true items dropped by a tool in aoe mode will despawn after 5 seconds").getBoolean(false); + useOldArmorModel = config.get(Configuration.CATEGORY_GENERAL, "Use old armor model", false, "If true the armor will use the original vanilla 2D model instead of the new 3D models").getBoolean(false); //Spawner spawnerListType = config.get("spawner", "listType", false, "Sets weather the spawner list is a white list or a black list (true = white list false = black list)").getBoolean(false); 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 c3517a16..21f36960 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 @@ -7,6 +7,7 @@ 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.handler.ConfigHandler; import com.brandon3055.draconicevolution.common.lib.References; import com.brandon3055.draconicevolution.common.utills.IConfigurableItem; import com.brandon3055.draconicevolution.common.utills.IInventoryTool; @@ -121,13 +122,12 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IEnergyCo @Override @SideOnly(Side.CLIENT) public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - 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"; -// } + if (!ConfigHandler.useOldArmorModel) 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 @@ -337,16 +337,18 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IEnergyCo } @SideOnly(Side.CLIENT) - private ModelBiped model = null; + public ModelBiped model; @SideOnly(Side.CLIENT) @Override public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + if (ConfigHandler.useOldArmorModel) return super.getArmorModel(entityLiving, itemStack, 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); + if (armorType == 0) model = new ModelDraconicArmor(1.1F, true, false, false, false, true); + else if (armorType == 1) model = new ModelDraconicArmor(1.1F, false, true, false, false, true); + else if (armorType == 2) model = new ModelDraconicArmor(1.1F, false, false, true, false, true); + else model = new ModelDraconicArmor(1.1F, false, false, false, true, true); this.model.bipedHead.showModel = (armorType == 0); this.model.bipedHeadwear.showModel = (armorType == 0); 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 cc92e871..1750f1c1 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 @@ -7,6 +7,7 @@ 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.handler.ConfigHandler; import com.brandon3055.draconicevolution.common.lib.References; import com.brandon3055.draconicevolution.common.utills.*; import cpw.mods.fml.common.registry.GameRegistry; @@ -103,12 +104,12 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IEnergyCont @Override @SideOnly(Side.CLIENT) public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { - 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"; -// } + if (!ConfigHandler.useOldArmorModel) 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 @@ -263,13 +264,15 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IEnergyCont } @SideOnly(Side.CLIENT) - ModelBiped model = null; + private ModelBiped model; @SideOnly(Side.CLIENT) @Override public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { + if (ConfigHandler.useOldArmorModel) return super.getArmorModel(entityLiving, itemStack, armorSlot); + if (model == null) { - if (armorType == 0) model = new ModelDraconicArmor(1F, true, false, false, false, false); + if (armorType == 0) model = new ModelDraconicArmor(1.0F, 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); diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/Wrench.java b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/Wrench.java index 34000a7f..24b5f689 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/Wrench.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/Wrench.java @@ -108,7 +108,7 @@ public class Wrench extends ItemDE implements IHudDisplayItem { @Override public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { Block clicked = world.getBlock(x, y, z); - if (clicked.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side)) && !world.isRemote) return true; + if (getMode(stack).equals(MODE_SWITCH) && clicked.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side)) && !world.isRemote) return true; if (world.isRemote) return false; 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 550a50b8..0c6fb283 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/lib/VersionHandler.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/lib/VersionHandler.java @@ -6,7 +6,7 @@ package com.brandon3055.draconicevolution.common.lib; public class VersionHandler { public static final String VERSION = "1.0.2"; - public static final int SNAPSHOT = 2; + public static final int SNAPSHOT = 3; public static final String MCVERSION = "1.7.10"; public static final String FULL_VERSION = VERSION + (SNAPSHOT > 0 ? "-snapshot_" + SNAPSHOT : ""); diff --git a/src/main/resources/assets/draconicevolution/textures/entity/projectileEnergy.png b/src/main/resources/assets/draconicevolution/textures/entity/projectileEnergy.png new file mode 100644 index 00000000..a801272b Binary files /dev/null and b/src/main/resources/assets/draconicevolution/textures/entity/projectileEnergy.png differ diff --git a/src/main/resources/assets/draconicevolution/textures/entity/projectileEnergy.png.mcmeta b/src/main/resources/assets/draconicevolution/textures/entity/projectileEnergy.png.mcmeta new file mode 100644 index 00000000..78b5f166 --- /dev/null +++ b/src/main/resources/assets/draconicevolution/textures/entity/projectileEnergy.png.mcmeta @@ -0,0 +1,16 @@ +{ + "texture": { "blur": true }, + "animation": { + "frametime": 1, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + } +} \ No newline at end of file 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 new file mode 100644 index 00000000..49cf85e4 Binary files /dev/null and b/src/main/resources/assets/draconicevolution/textures/models/armor/draconic_layer_1.png 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 new file mode 100644 index 00000000..58c4c865 Binary files /dev/null and b/src/main/resources/assets/draconicevolution/textures/models/armor/draconic_layer_2.png 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 new file mode 100644 index 00000000..215face3 Binary files /dev/null and b/src/main/resources/assets/draconicevolution/textures/models/armor/wyvern_layer_1.png 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 new file mode 100644 index 00000000..fb4e57bc Binary files /dev/null and b/src/main/resources/assets/draconicevolution/textures/models/armor/wyvern_layer_2.png differ