From a170a43026cc060331e732222c254ddd14cd2799 Mon Sep 17 00:00:00 2001 From: KeyLime17 Date: Sat, 10 May 2025 23:32:42 -0400 Subject: [PATCH] Added Gilded Galvorn armor set, and fixed model file --- .../com/zivilon/cinder_loe/CinderLoE.java | 33 +++++++- .../com/zivilon/cinder_loe/Materials.java | 1 + .../client/model/ModelGalvornHelmet.java | 42 +++++++---- .../client/model/ModelJadeHelmet.java | 1 + .../client/render/RenderCryptBoss.java | 43 +++++++++++ .../render/projectile/RenderMorgulBlast.java | 15 ++++ .../RenderSarumanFireball.java | 3 +- .../RenderSarumanWhiteFireball.java | 3 +- .../coremod/LOTRMaterialTransformer.java | 1 + .../cinder_loe/entity/boss/CryptBoss.java | 42 +++++++---- .../projectile/EntityMorgulBlast.java} | 71 +++++++++++++++--- .../mixins/MixinLOTRArmorModels.java | 2 +- .../java/com/zivilon/cinder_loe/recipes.java | 2 +- .../assets/lotr/armor/gildedgalvorn_1.png | Bin 0 -> 1148 bytes .../assets/lotr/armor/gildedgalvorn_2.png | Bin 0 -> 636 bytes ...rn_helmet.png => gildedgalvorn_helmet.png} | Bin .../lotr/textures/items/bodyGildedGalvorn.png | Bin 0 -> 546 bytes .../textures/items/bootsGildedGalvorn.png | Bin 0 -> 378 bytes .../assets/lotr/textures/items/flatbread.png | Bin 0 -> 840 bytes .../textures/items/helmetGildedGalvorn.png | Bin 0 -> 440 bytes .../lotr/textures/items/legsGildedGalvorn.png | Bin 0 -> 387 bytes 21 files changed, 213 insertions(+), 46 deletions(-) create mode 100644 src/main/java/com/zivilon/cinder_loe/client/render/RenderCryptBoss.java create mode 100644 src/main/java/com/zivilon/cinder_loe/client/render/projectile/RenderMorgulBlast.java rename src/main/java/com/zivilon/cinder_loe/client/render/{ => projectile}/RenderSarumanFireball.java (96%) rename src/main/java/com/zivilon/cinder_loe/client/render/{ => projectile}/RenderSarumanWhiteFireball.java (96%) rename src/main/java/com/zivilon/cinder_loe/{projectiles/MorgulBlast.java => entity/projectile/EntityMorgulBlast.java} (68%) create mode 100644 src/main/resources/assets/lotr/armor/gildedgalvorn_1.png create mode 100644 src/main/resources/assets/lotr/armor/gildedgalvorn_2.png rename src/main/resources/assets/lotr/armor/{galvorn_helmet.png => gildedgalvorn_helmet.png} (100%) create mode 100644 src/main/resources/assets/lotr/textures/items/bodyGildedGalvorn.png create mode 100644 src/main/resources/assets/lotr/textures/items/bootsGildedGalvorn.png create mode 100644 src/main/resources/assets/lotr/textures/items/flatbread.png create mode 100644 src/main/resources/assets/lotr/textures/items/helmetGildedGalvorn.png create mode 100644 src/main/resources/assets/lotr/textures/items/legsGildedGalvorn.png diff --git a/src/main/java/com/zivilon/cinder_loe/CinderLoE.java b/src/main/java/com/zivilon/cinder_loe/CinderLoE.java index 70bde55..756c587 100644 --- a/src/main/java/com/zivilon/cinder_loe/CinderLoE.java +++ b/src/main/java/com/zivilon/cinder_loe/CinderLoE.java @@ -121,6 +121,7 @@ public class CinderLoE { public static LOTRMaterial MATERIAL_USURPER; public static LOTRMaterial MATERIAL_WARLORD; public static LOTRMaterial MATERIAL_JADE; + public static LOTRMaterial MATERIAL_GILDEDGALVORN; // Blocks // public static Block barricade; @@ -235,6 +236,10 @@ public class CinderLoE { public static Item legsWarlord; public static Item bootsWarlord; public static Item maceWarlord; + public static Item helmetGildedGalvorn; + public static Item bodyGildedGalvorn; + public static Item legsGildedGalvorn; + public static Item bootsGildedGalvorn; // public static Item bowserpent; //public static Item swordUsurper; @@ -374,7 +379,7 @@ public class CinderLoE { // event.registerServerCommand(new CommandMobileSound()); } - public void registerEntities() { // Last ID added: 64 + public void registerEntities() { // Last ID added: 65 ///GameRegistry.registerTileEntity(TileEntityMistBlock.class, "TileEntityMistBlock"); ///.registerBlock(TileEntityRustedSword, "TileEntityRustedSword"); @@ -414,6 +419,7 @@ public class CinderLoE { EntityRegistry.registerModEntity(UtumnoSlaveTrader.class, "UtumnoSlaveTrader", (entityID + 30), this, 64, 1, true); EntityRegistry.registerModEntity(Monkey.class, "Monkey", (entityID + 62), this, 64, 1, true); EntityRegistry.registerModEntity(CryptBoss.class, "CryptBoss", (entityID + 63), this, 64, 1, true); + EntityRegistry.registerModEntity(EntityMorgulBlast.class, "EntityMorgulBlast", (entityID + 65), this, 64, 1, true); @@ -742,11 +748,13 @@ public class CinderLoE { warDartHeads = (new WarDartHeads()).setUnlocalizedName("war_dart_heads").setTextureName("lotr:war_dart_heads_0"); ItemRegistration.register(cleaver,"cleaver",6109); - linkLOTRWeapon(cleaver, "cleaver"); + ItemRegistration.register(warDart,"warDart",6111); ItemRegistration.register(warDartHeads,"warDartHeads",6500); + //Override Galvorn Helmet with new model texture + LOTRMod.helmetGalvorn = new LOTRItemArmor(LOTRMaterial.GALVORN, 0, "helmet").setUnlocalizedName("lotr:helmetGalvorn"); //ASH MATERIAL_ASH = getLOTRMaterialByName("ASH"); @@ -906,7 +914,7 @@ public class CinderLoE { linkLOTRWeapon(swordBree, "swordBree"); //Elite Armors - //Elite Armors + MATERIAL_SERPENT = getLOTRMaterialByName("SERPENT"); if (MATERIAL_SERPENT != null) { helmetserpent = (new LOTRItemArmor(MATERIAL_SERPENT, 0)).setUnlocalizedName("lotr:helmetserpent").setTextureName("lotr:helmetserpent").setCreativeTab(null); @@ -955,6 +963,22 @@ public class CinderLoE { } linkLOTRWeapon(maceWarlord, "maceWarlord"); + MATERIAL_GILDEDGALVORN = getLOTRMaterialByName("GILDEDGALVORN"); + if (MATERIAL_GILDEDGALVORN != null) { + helmetGildedGalvorn = (new LOTRItemArmor(MATERIAL_GILDEDGALVORN, 0, "helmet")).setUnlocalizedName("lotr:helmetGildedGalvorn").setTextureName("lotr:helmetGildedGalvorn").setCreativeTab(null); + bodyGildedGalvorn = (new LOTRItemArmor(MATERIAL_GILDEDGALVORN, 1)).setUnlocalizedName("lotr:bodyGildedGalvorn").setTextureName("lotr:bodyGildedGalvorn").setCreativeTab(null); + legsGildedGalvorn = (new LOTRItemArmor(MATERIAL_GILDEDGALVORN, 2)).setUnlocalizedName("lotr:legsGildedGalvorn").setTextureName("lotr:legsGildedGalvorn").setCreativeTab(null); + bootsGildedGalvorn = (new LOTRItemArmor(MATERIAL_GILDEDGALVORN, 3)).setUnlocalizedName("lotr:bootsGildedGalvorn").setTextureName("lotr:bootsGildedGalvorn").setCreativeTab(null); + + ItemRegistration.register(helmetGildedGalvorn, "helmetGildedGalvorn", 6813); + ItemRegistration.register(bodyGildedGalvorn, "bodyGildedGalvorn", 6814); + ItemRegistration.register(legsGildedGalvorn, "legsGildedGalvorn", 6815); + ItemRegistration.register(bootsGildedGalvorn, "bootsGildedGalvorn", 6816); + } else { + System.err.println("Failed to find WARLORD material for armor initialization."); + } + + //Rhudaur MATERIAL_RHUDAUR = getLOTRMaterialByName("RHUDAUR"); if (MATERIAL_RHUDAUR != null) { @@ -1016,6 +1040,7 @@ public class CinderLoE { // RenderingRegistry.registerEntityRenderingHandler(DwarfLevy.class, new LOTRRenderDwarf()); RenderingRegistry.registerEntityRenderingHandler(EntityWarDart.class, new RenderWarDart()); + RenderingRegistry.registerEntityRenderingHandler(EntityMorgulBlast.class, new RenderMorgulBlast()); RenderingRegistry.registerEntityRenderingHandler(BladorthinSmith.class, new LOTRRenderDorwinionElfVintner()); RenderingRegistry.registerEntityRenderingHandler(DarkSpider.class, new RenderDarkSpider()); RenderingRegistry.registerEntityRenderingHandler(CorruptDwarf.class, new RenderCorruptDwarf()); @@ -1033,6 +1058,7 @@ public class CinderLoE { RenderingRegistry.registerEntityRenderingHandler(RenegadeCaptain.class, new RenderRenegade()); RenderingRegistry.registerEntityRenderingHandler(Wraith.class, new RenderWraith()); RenderingRegistry.registerEntityRenderingHandler(Monkey.class, new RenderMonkey()); + RenderingRegistry.registerEntityRenderingHandler(CryptBoss.class, new RenderCryptBoss()); RenderingRegistry.registerEntityRenderingHandler(RedDwarfWarrior.class, new LOTRRenderDwarf()); RenderingRegistry.registerEntityRenderingHandler(RedDwarfArbalest.class, new LOTRRenderDwarf()); @@ -1336,6 +1362,7 @@ public class CinderLoE { CinderCore.registerEntityFallback(Renegade.class, LOTREntityBandit.class, "cinder_loe", "1.0"); CinderCore.registerEntityFallback(RenegadeCaptain.class, LOTREntityBandit.class, "cinder_loe", "1.1"); CinderCore.registerEntityFallback(Wraith.class, LOTREntityMarshWraith.class, "cinder_loe", "1.0"); + CinderCore.registerEntityFallback(CryptBoss.class, LOTREntityMarshWraith.class, "cinder_loe", "1.0"); CinderCore.registerEntityFallback(LOTREntitySauron.class, LOTREntityBarrowWight.class, "cinder_loe", "1.1"); CinderCore.registerEntityFallback(RedDwarfWarrior.class, LOTREntityDwarfWarrior.class, "cinder_loe", "1.0"); diff --git a/src/main/java/com/zivilon/cinder_loe/Materials.java b/src/main/java/com/zivilon/cinder_loe/Materials.java index da30bc0..829ba7f 100644 --- a/src/main/java/com/zivilon/cinder_loe/Materials.java +++ b/src/main/java/com/zivilon/cinder_loe/Materials.java @@ -25,6 +25,7 @@ public class Materials { modifyMaterial("USURPER",650, 2.0F, 0.6F, 2, 6.0F, 10, Items.iron_ingot); modifyMaterial("WARLORD", 650, 2.0F, 0.6F, 2, 6.0F, 10, LOTRMod.bronze); modifyMaterial("JADE",2400, 5.0F, 0.8F, 0, 9.0F, 10, LOTRMod.emerald); + modifyMaterial("GILDEDGALVORN",600, 3.0F, 0.6F, 2, 7.0F, 15, LOTRMod.galvorn); } public static void modifyMaterial(String fieldName, int uses, float weapon_damage, float protection, int harvest_level, float speed, int enchantability, Item crafting_item) { diff --git a/src/main/java/com/zivilon/cinder_loe/client/model/ModelGalvornHelmet.java b/src/main/java/com/zivilon/cinder_loe/client/model/ModelGalvornHelmet.java index 468f115..f5cc786 100644 --- a/src/main/java/com/zivilon/cinder_loe/client/model/ModelGalvornHelmet.java +++ b/src/main/java/com/zivilon/cinder_loe/client/model/ModelGalvornHelmet.java @@ -10,7 +10,6 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelGalvornHelmet extends LOTRModelBiped { - private final ModelRenderer bipedHead; private final ModelRenderer crest; private final ModelRenderer shape12; private final ModelRenderer shape3; @@ -20,51 +19,68 @@ public class ModelGalvornHelmet extends LOTRModelBiped { public ModelGalvornHelmet(float f) { super(f); + this.textureWidth = 64; + this.textureHeight = 32; - textureWidth = 64; - textureHeight = 32; - bipedHead = new ModelRenderer(this); - bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F); - bipedHead.cubeList.add(new ModelBox(bipedHead, 0, 0, -4.0F, -8.0F, -4.0F, 8, 8, 8, 1.0F)); crest = new ModelRenderer(this); crest.setRotationPoint(0.0F, -1.0F, 0.55F); - shape12 = new ModelRenderer(this); shape12.setRotationPoint(0.5F, -4.0F, -6.35F); - crest.addChild(shape12); setRotationAngle(shape12, 1.5708F, 0.0F, 0.0F); shape12.cubeList.add(new ModelBox(shape12, 43, 22, -1.0F, 0.0F, -1.5F, 1, 1, 9, 0.0F)); shape3 = new ModelRenderer(this); shape3.setRotationPoint(0.0F, 0.0F, 0.0F); - shape12.addChild(shape3); setRotationAngle(shape3, 0.0F, -0.2276F, 0.0F); shape3.cubeList.add(new ModelBox(shape3, 0, 25, -1.0F, 0.1F, 0.0F, 1, 0, 6, 0.0F)); shape4 = new ModelRenderer(this); shape4.setRotationPoint(0.0F, 0.0F, 0.0F); - shape3.addChild(shape4); setRotationAngle(shape4, 0.0F, -0.2731F, 0.0F); shape4.cubeList.add(new ModelBox(shape4, 16, 23, -1.0F, 0.2F, 0.0F, 1, 0, 5, 0.0F)); shape5 = new ModelRenderer(this); shape5.setRotationPoint(-1.0F, 0.0F, 0.0F); - shape12.addChild(shape5); setRotationAngle(shape5, 0.0F, 0.2276F, 0.0F); shape5.cubeList.add(new ModelBox(shape5, 50, 3, 0.0F, 0.1F, 0.0F, 1, 0, 6, 0.0F)); shape6 = new ModelRenderer(this); shape6.setRotationPoint(0.0F, 0.0F, 0.0F); - shape5.addChild(shape6); + setRotationAngle(shape6, 0.0F, 0.2731F, 0.0F); shape6.cubeList.add(new ModelBox(shape6, 49, 13, 0.0F, 0.2F, 0.0F, 1, 0, 5, 0.0F)); + + this.bipedHead.cubeList.clear(); + + bipedHead = new ModelRenderer(this); + bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F); + bipedHead.cubeList.add(new ModelBox(bipedHead, 0, 0, -4.0F, -8.0F, -4.0F, 8, 8, 8, 1.0F)); + +// this.crest.addChild(this.shape12); +// this.crest.addChild(this.shape3); +// this.crest.addChild(this.shape4); +// this.crest.addChild(this.shape5); +// this.crest.addChild(this.shape6); + crest.addChild(shape12); + shape12.addChild(shape3); + shape3.addChild(shape4); + shape12.addChild(shape5); + shape5.addChild(shape6); + this.bipedHead.addChild(this.crest); + + this.bipedHeadwear.cubeList.clear(); + this.bipedBody.cubeList.clear(); + this.bipedRightArm.cubeList.clear(); + this.bipedLeftArm.cubeList.clear(); + this.bipedRightLeg.cubeList.clear(); + this.bipedLeftLeg.cubeList.clear(); + } @Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { bipedHead.render(f5); - crest.render(f5); } public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { diff --git a/src/main/java/com/zivilon/cinder_loe/client/model/ModelJadeHelmet.java b/src/main/java/com/zivilon/cinder_loe/client/model/ModelJadeHelmet.java index 2e0b612..f0fde8a 100644 --- a/src/main/java/com/zivilon/cinder_loe/client/model/ModelJadeHelmet.java +++ b/src/main/java/com/zivilon/cinder_loe/client/model/ModelJadeHelmet.java @@ -26,6 +26,7 @@ public class ModelJadeHelmet extends LOTRModelBiped { public ModelJadeHelmet(float f) { super (f); + this.textureWidth = 64; this.textureHeight = 32; this.bipedHead.cubeList.clear(); diff --git a/src/main/java/com/zivilon/cinder_loe/client/render/RenderCryptBoss.java b/src/main/java/com/zivilon/cinder_loe/client/render/RenderCryptBoss.java new file mode 100644 index 0000000..ce3c1b0 --- /dev/null +++ b/src/main/java/com/zivilon/cinder_loe/client/render/RenderCryptBoss.java @@ -0,0 +1,43 @@ +package com.zivilon.cinder_loe.client.render; + +import com.zivilon.cinder_loe.entity.Wraith; +import com.zivilon.cinder_loe.entity.boss.CryptBoss; +import lotr.client.model.LOTRModelMarshWraith; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.renderer.entity.RenderLiving; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class RenderCryptBoss extends RenderLiving { + private static ResourceLocation skin = new ResourceLocation("cinder_loe:mob/wraith/wraith.png"); + + public RenderCryptBoss() { + super((ModelBase)new LOTRModelMarshWraith(), 0.5F); + } + + protected ResourceLocation getEntityTexture(Entity entity) { + return skin; + } + + protected void preRenderCallback(EntityLivingBase entity, float f) { + super.preRenderCallback(entity, f); + float f1 = 0.9375F; + float hover = MathHelper.sin((((Entity)entity).ticksExisted + f) * 0.15F) * 0.2F - 0.5F; + GL11.glScalef(f1, f1, f1); + GL11.glTranslatef(0.0F, hover, 0.0F); + CryptBoss wraith = (CryptBoss)entity; + if (wraith.getDeathFadeTime() > 0) { + GL11.glEnable(3042); + GL11.glBlendFunc(770, 771); + GL11.glEnable(3008); + GL11.glColor4f(1.0F, 1.0F, 1.0F, wraith.getDeathFadeTime() / 30.0F); + } + } + + protected float getDeathMaxRotation(EntityLivingBase entity) { + return 0.0F; + } +} diff --git a/src/main/java/com/zivilon/cinder_loe/client/render/projectile/RenderMorgulBlast.java b/src/main/java/com/zivilon/cinder_loe/client/render/projectile/RenderMorgulBlast.java new file mode 100644 index 0000000..f062335 --- /dev/null +++ b/src/main/java/com/zivilon/cinder_loe/client/render/projectile/RenderMorgulBlast.java @@ -0,0 +1,15 @@ +package com.zivilon.cinder_loe.client.render.projectile; + +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; + +public class RenderMorgulBlast extends Render { + protected ResourceLocation getEntityTexture(Entity entity) { + return TextureMap.locationBlocksTexture; + } + + public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) { + } +} diff --git a/src/main/java/com/zivilon/cinder_loe/client/render/RenderSarumanFireball.java b/src/main/java/com/zivilon/cinder_loe/client/render/projectile/RenderSarumanFireball.java similarity index 96% rename from src/main/java/com/zivilon/cinder_loe/client/render/RenderSarumanFireball.java rename to src/main/java/com/zivilon/cinder_loe/client/render/projectile/RenderSarumanFireball.java index fad8631..f0f6fc4 100644 --- a/src/main/java/com/zivilon/cinder_loe/client/render/RenderSarumanFireball.java +++ b/src/main/java/com/zivilon/cinder_loe/client/render/projectile/RenderSarumanFireball.java @@ -1,6 +1,5 @@ -package com.zivilon.cinder_loe.client.render; +package com.zivilon.cinder_loe.client.render.projectile; -import lotr.client.LOTRClientProxy; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/zivilon/cinder_loe/client/render/RenderSarumanWhiteFireball.java b/src/main/java/com/zivilon/cinder_loe/client/render/projectile/RenderSarumanWhiteFireball.java similarity index 96% rename from src/main/java/com/zivilon/cinder_loe/client/render/RenderSarumanWhiteFireball.java rename to src/main/java/com/zivilon/cinder_loe/client/render/projectile/RenderSarumanWhiteFireball.java index ec581ab..6da4f50 100644 --- a/src/main/java/com/zivilon/cinder_loe/client/render/RenderSarumanWhiteFireball.java +++ b/src/main/java/com/zivilon/cinder_loe/client/render/projectile/RenderSarumanWhiteFireball.java @@ -1,6 +1,5 @@ -package com.zivilon.cinder_loe.client.render; +package com.zivilon.cinder_loe.client.render.projectile; -import lotr.client.LOTRClientProxy; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/zivilon/cinder_loe/coremod/LOTRMaterialTransformer.java b/src/main/java/com/zivilon/cinder_loe/coremod/LOTRMaterialTransformer.java index 12f87c3..642a09b 100644 --- a/src/main/java/com/zivilon/cinder_loe/coremod/LOTRMaterialTransformer.java +++ b/src/main/java/com/zivilon/cinder_loe/coremod/LOTRMaterialTransformer.java @@ -67,6 +67,7 @@ public class LOTRMaterialTransformer implements IClassTransformer { addMaterial("USURPER", classNode); addMaterial("WARLORD",classNode); addMaterial("JADE",classNode); + addMaterial("GILDEDGALVORN",classNode); // Protection Conversion diff --git a/src/main/java/com/zivilon/cinder_loe/entity/boss/CryptBoss.java b/src/main/java/com/zivilon/cinder_loe/entity/boss/CryptBoss.java index 93c6fcd..02c397c 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/boss/CryptBoss.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/boss/CryptBoss.java @@ -1,10 +1,11 @@ package com.zivilon.cinder_loe.entity.boss; -import com.zivilon.cinder_loe.CinderLoE; -import com.zivilon.cinder_loe.projectiles.MorgulBlast; +import com.zivilon.cinder_loe.entity.projectile.EntityMorgulBlast; +import lotr.common.LOTRMod; import lotr.common.enchant.LOTREnchantment; import lotr.common.enchant.LOTREnchantmentHelper; import lotr.common.entity.ai.*; +import lotr.common.entity.npc.LOTREntityMarshWraith; import lotr.common.entity.npc.LOTREntityNPC; import lotr.common.fac.LOTRFaction; import lotr.common.quest.LOTRMiniQuest; @@ -21,10 +22,12 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; +import java.util.Random; + public class CryptBoss extends LOTREntityNPC { private EntityAIBase meleeAttackAI = new LOTREntityAIAttackOnCollide(this, 2.0, false); - private EntityAIBase rangedAttackAI = new LOTREntityAIRangedAttack(this, 1.5, 30, 50, 24.0f); + private EntityAIBase rangedAttackAI = new LOTREntityAIRangedAttack(this, 1.5, 30, 50, 60.0f); //Copying Wraith temporarily public CryptBoss(World world) { @@ -32,7 +35,8 @@ public class CryptBoss extends LOTREntityNPC { setSize(0.8F, 2.5F); this.tasks.taskEntries.clear(); this.tasks.addTask(0, (EntityAIBase)new EntityAISwimming((EntityLiving)this)); - this.tasks.addTask(0, (EntityAIBase)new LOTREntityAIBossJumpAttack(this, 1.5, 0.02f)); + //Causes crash + //this.tasks.addTask(0, (EntityAIBase)new LOTREntityAIBossJumpAttack(this, 1.5, 0.02f)); this.tasks.addTask(2, (EntityAIBase)new EntityAIWander((EntityCreature)this, 1.0)); this.tasks.addTask(3, (EntityAIBase)new EntityAIWatchClosest2((EntityLiving)this, EntityPlayer.class, 12.0f, 0.02f)); this.tasks.addTask(3, (EntityAIBase)new EntityAIWatchClosest2((EntityLiving)this, LOTREntityNPC.class, 8.0f, 0.02f)); @@ -105,15 +109,23 @@ public class CryptBoss extends LOTREntityNPC { public void setInWeb() {} + @Override public void onLivingUpdate() { super.onLivingUpdate(); - if (rand.nextBoolean()) - ((Entity)this).worldObj.spawnParticle("morgulPortal", ((Entity)this).posX + (rand.nextDouble() - 0.5D) * ((Entity)this).width, ((Entity)this).posY + rand.nextDouble() * ((Entity)this).height, ((Entity)this).posZ + (rand.nextDouble() - 0.5D) * ((Entity)this).width, 0.0D, 0.0D, 0.0D); - if (!((Entity)this).worldObj.isRemote) { - if (getDeathFadeTime() > 0) - setDeathFadeTime(getDeathFadeTime() - 1); - if (getDeathFadeTime() == 1) - setDead(); + if (this.worldObj.isRemote) { + for (int l = 0; l < 1; ++l) { + double d = this.posX + (double)this.width * MathHelper.getRandomDoubleInRange((Random)this.rand, (double)-0.5, (double)0.5); + double d1 = this.posY + (double)this.height * MathHelper.getRandomDoubleInRange((Random)this.rand, (double)0.4, (double)0.8); + double d2 = this.posZ + (double)this.width * MathHelper.getRandomDoubleInRange((Random)this.rand, (double)-0.5, (double)0.5); + double d3 = MathHelper.getRandomDoubleInRange((Random)this.rand, (double)-0.1, (double)0.1); + double d4 = MathHelper.getRandomDoubleInRange((Random)this.rand, (double)-0.2, (double)-0.05); + double d5 = MathHelper.getRandomDoubleInRange((Random)this.rand, (double)-0.1, (double)0.1); + if (this.rand.nextBoolean()) { + LOTRMod.proxy.spawnParticle("morgulPortal", d, d1, d2, d3, d4, d5); + continue; + } + this.worldObj.spawnParticle("smoke", d, d1, d2, d3, d4, d5); + } } } @@ -138,10 +150,10 @@ public class CryptBoss extends LOTREntityNPC { @Override public void attackEntityWithRangedAttack(EntityLivingBase target, float f) { - MorgulBlast projectile = new MorgulBlast(this.worldObj, (EntityLivingBase)this, target); - projectile.leavesDamage = 6.0f; + EntityMorgulBlast projectile = new EntityMorgulBlast(this.worldObj, (EntityLivingBase)this, target); + projectile.leavesDamage = 16.0f; this.worldObj.spawnEntityInWorld((Entity)projectile); - this.playSound("lotr:wraith.marchWraith_shoot", this.getSoundVolume(), this.getSoundPitch()); + this.playSound("lotr:wraith.marshWraith_shoot", this.getSoundVolume(), this.getSoundPitch()); this.swingItem(); } @@ -150,7 +162,7 @@ public class CryptBoss extends LOTREntityNPC { Entity entity = damagesource.getEntity(); if (entity instanceof EntityLivingBase && entity == damagesource.getSourceOfDamage()) { ItemStack itemstack = ((EntityLivingBase)entity).getHeldItem(); - if (itemstack != null && LOTREnchantmentHelper.hasEnchant(itemstack, LOTREnchantment.baneWraith)) + if (itemstack != null && LOTREnchantmentHelper.hasEnchant(itemstack, LOTREnchantment.baneWight)) vulnerable = true; } if (vulnerable && getDeathFadeTime() == 0) { diff --git a/src/main/java/com/zivilon/cinder_loe/projectiles/MorgulBlast.java b/src/main/java/com/zivilon/cinder_loe/entity/projectile/EntityMorgulBlast.java similarity index 68% rename from src/main/java/com/zivilon/cinder_loe/projectiles/MorgulBlast.java rename to src/main/java/com/zivilon/cinder_loe/entity/projectile/EntityMorgulBlast.java index ea2b655..728e987 100644 --- a/src/main/java/com/zivilon/cinder_loe/projectiles/MorgulBlast.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/projectile/EntityMorgulBlast.java @@ -1,9 +1,7 @@ -package com.zivilon.cinder_loe.projectiles; +package com.zivilon.cinder_loe.entity.projectile; import lotr.common.LOTRMod; import lotr.common.entity.npc.LOTREntityNPC; -import lotr.common.entity.projectile.LOTREntityMallornLeafBomb; -import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.projectile.EntityThrowable; @@ -17,20 +15,20 @@ import net.minecraft.world.World; import java.util.List; import java.util.UUID; -public class MorgulBlast extends LOTREntityMallornLeafBomb { +public class EntityMorgulBlast extends EntityThrowable { private UUID throwerUUID; private int leavesAge; private static int MAX_LEAVES_AGE = 200; - public float leavesDamage = 10; + public float leavesDamage; - public MorgulBlast(World world) { + public EntityMorgulBlast(World world) { super(world); this.setSize(2.0f, 2.0f); this.setPosition(this.posX, this.posY, this.posZ); } - public MorgulBlast(World world, EntityLivingBase thrower, EntityLivingBase target) { + public EntityMorgulBlast(World world, EntityLivingBase thrower, EntityLivingBase target) { super(world, thrower); this.setSize(2.0f, 2.0f); this.setPosition(this.posX, this.posY, this.posZ); @@ -51,9 +49,44 @@ public class MorgulBlast extends LOTREntityMallornLeafBomb { } } + public EntityMorgulBlast(World world, double d, double d1, double d2) { + super(world, d, d1, d2); + this.setSize(2.0f, 2.0f); + this.setPosition(this.posX, this.posY, this.posZ); + } + + public void writeEntityToNBT(NBTTagCompound nbt) { + super.writeEntityToNBT(nbt); + nbt.setInteger("LeavesAge", this.leavesAge); + nbt.setFloat("LeavesDamage", this.leavesDamage); + if (this.throwerUUID != null) { + nbt.setString("ThrowerUUID", this.throwerUUID.toString()); + } + } + + public void readEntityFromNBT(NBTTagCompound nbt) { + super.readEntityFromNBT(nbt); + this.leavesAge = nbt.getInteger("LeavesAge"); + this.leavesDamage = nbt.getFloat("LeavesDamage"); + if (nbt.hasKey("ThrowerUUID")) { + this.throwerUUID = UUID.fromString(nbt.getString("ThrowerUUID")); + } + } + + protected void onImpact(MovingObjectPosition m) { + if (!this.worldObj.isRemote) { + Entity entity; + if (m.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) { + this.explode(null); + } else if (m.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && this.isEntityVulnerable(entity = m.entityHit)) { + this.explode(entity); + } + } + } + private void explode(Entity target) { if (!this.worldObj.isRemote) { - double range = 2.0; + double range = 3.0; List entities = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.boundingBox.expand(range, range, range)); if (!entities.isEmpty()) { for (int i = 0; i < entities.size(); ++i) { @@ -114,8 +147,28 @@ public class MorgulBlast extends LOTREntityMallornLeafBomb { double d4 = result.yCoord / 10.0; double d5 = result.zCoord / 10.0; LOTRMod.proxy.spawnParticle("morgulPortal", d, d1, d2, d3, d4, d5); - LOTRMod.proxy.spawnParticle("smoke", d, d1, d2, d3 * 0.5, d4 * 0.5, d5 * 0.5); + // LOTRMod.proxy.spawnParticle("smoke", d, d1, d2, d3 * 0.5, d4 * 0.5, d5 * 0.5); + worldObj.spawnParticle("smoke", d, d1, d2, d3 * 0.5, d4 * 0.5, d5 * 0.5); + + } + } + } + public EntityLivingBase getThrower() { + if (this.throwerUUID != null) { + for (Object obj : this.worldObj.loadedEntityList) { + Entity entity = (Entity)obj; + if (!(entity instanceof EntityLivingBase) || !entity.getUniqueID().equals(this.throwerUUID)) continue; + return (EntityLivingBase)entity; } } + return null; + } + + protected float func_70182_d() { + return 1.0f; + } + + protected float getGravityVelocity() { + return 0.0f; } } diff --git a/src/main/java/com/zivilon/cinder_loe/mixins/MixinLOTRArmorModels.java b/src/main/java/com/zivilon/cinder_loe/mixins/MixinLOTRArmorModels.java index f3ab789..0409601 100644 --- a/src/main/java/com/zivilon/cinder_loe/mixins/MixinLOTRArmorModels.java +++ b/src/main/java/com/zivilon/cinder_loe/mixins/MixinLOTRArmorModels.java @@ -102,7 +102,7 @@ public class MixinLOTRArmorModels { map.put(CinderLoE.bodyJade, new ModelBodyJade(1.0f)); map.put(CinderLoE.legsJade, new ModelLegsJade(1.0f)); map.put(CinderLoE.helmetJade, new ModelJadeHelmet(1.0f)); - map.put(LOTRMod.helmetGalvorn, new ModelGalvornHelmet(1.0f)); + map.put(CinderLoE.helmetGildedGalvorn, new ModelGalvornHelmet(1.0f)); map.put(LOTRMod.plate, new LOTRModelHeadPlate()); map.put(LOTRMod.woodPlate, new LOTRModelHeadPlate()); map.put(LOTRMod.ceramicPlate, new LOTRModelHeadPlate()); diff --git a/src/main/java/com/zivilon/cinder_loe/recipes.java b/src/main/java/com/zivilon/cinder_loe/recipes.java index 1bf759b..44843e1 100644 --- a/src/main/java/com/zivilon/cinder_loe/recipes.java +++ b/src/main/java/com/zivilon/cinder_loe/recipes.java @@ -127,7 +127,7 @@ public class recipes { GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(CinderLoE.fieldRepairKit), new ItemStack(CinderLoE.forgingKit, 1, 0), - new ItemStack(CinderLoE.spiceIngredient, 1, 1))); + new ItemStack(CinderLoE.forgingKit, 1, 1))); OreDictionary.registerOre("vegetable1", CinderLoE.onion); diff --git a/src/main/resources/assets/lotr/armor/gildedgalvorn_1.png b/src/main/resources/assets/lotr/armor/gildedgalvorn_1.png new file mode 100644 index 0000000000000000000000000000000000000000..a3186dc792752cc09b20a075fb785c0999e3ace0 GIT binary patch literal 1148 zcmV-?1cUpDP)z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^000SaNLh0L01m(a01m(bYSxJf00007 zbV*G`2k8X~7ArRC7MCIb00X8;L_t(&-tCt`NSkLE$A2--(S*d5nh;|a?Wr-gFc@MS zf*!~4ROn6{Qzr}@cxc_&Zf+FTgS}X=r_CJ(JM_98w!@l@FeAasa8cQzt;{%Tq{$b) zugo?5c4(h>?-x5$&{$#L|B~;0-zRUL|Ns3z&-VsgxNzaZg$oxhT)1%I!i5VL|2KFV z1-v%!y1jXC6M#f_f|cc8JTEfgFBUU4KsKKNU~ysgQ2DezPf(~mK)F&qF{d_=?qwj| z%W`gw#Y67Z(kQ?vKOh)7O{hI^BFJa+8TyhD`jU|&*{`7k%9SeRN)^jAPK*mCKKS(b zdO#z*@#ecWz@;dX_c$)FCmA zdW7dFn$pLgybZwZ+bi@XBkF{Nuq2rtOp!VlCerx|0M|bMn)F}_fZS5SAXH1PR@T)%PC zL0l3O0=cCEbMsFKTBboZpCOyiFf%>H#MrRfGd-9hw^UHV0ob;U?jT((A*|00qq`_PG6t1Or!Y@2uI^~qC3HQVU<{{OI>>8WQBA`#~Jkh z1VSX4IifsPLYT+m0M!Izv95hr;DfHmQw$>K4rygIwhx80_+|HkW98VLhS6?63H@-$S8ji+oafA>* zsH2CYaa%+XN0lqprjrNw2ceGyi)SYpF#rGn4rN$LW=%~1DgXcg2mk;800000(o>TF O0000jA5L~c#`DCC7XMsm#F#`kNArNL1)$nQn3bL1Y`ns~eWaSjoVgB&s=rN!RmU+53 zhGg7(JN;l*vx7j}{}mnCJ|=A{6Fm4TJLI@(e>w5*6|d5;o#Nu*yPie+oNQTN3q zmMtPz{`$Q(+PrD=|8r-UggRZ6CVHqqs9SE!Z62N#-LJU^5=PdUv-cifQz)-)lX`R-K@4L>PXEfhlZuvaMWB!9Vk6(XgW;if|m7(LY z0E2-H}A*mFQuWD8`gdm-H^lXIZM&g*k`ZgvU@yjCpX-E z>u;4?UM-<^_{!|7b_}!j$8=uiGjF_6vH!a0Bz@;^z5$I%Gk82_9o!@vu}yi^0ZY~i zNm=U|v`Xtj_WoZR=rdESQ_fB;%=j`D7>RtT5uRzjz6@GGHU|)cz@=bNoHKa3 L`njxgN@xNA@rVT6 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/lotr/armor/galvorn_helmet.png b/src/main/resources/assets/lotr/armor/gildedgalvorn_helmet.png similarity index 100% rename from src/main/resources/assets/lotr/armor/galvorn_helmet.png rename to src/main/resources/assets/lotr/armor/gildedgalvorn_helmet.png diff --git a/src/main/resources/assets/lotr/textures/items/bodyGildedGalvorn.png b/src/main/resources/assets/lotr/textures/items/bodyGildedGalvorn.png new file mode 100644 index 0000000000000000000000000000000000000000..8e5c836e6db1a26aefa09f1793c3ccc83d50681b GIT binary patch literal 546 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jPK-BC>eK@{Ea{HEjtmSN z`?>!lvI6-E$sR$z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZKG z?e4D{~g9WG)FH||=p2wYXoI-)A({b1g_i~mpi_eU@l z{bbsk*S@ik{dxFR{ZkL03NY-=JD#+RIZQ14?zvGap3D&&9~ROQ|H$P z9DO)v(cgOue%?vRtz~wo@2_D$b>Qj8ReB6NY~mQ^OcrJ^k$bh6_g6yw=v%)dDKIlC7z3l`cQ0R}Z+YJ_K+ buP=iZkj(+aAaE%d6f+E-u6{1-oD!MeK@{Ea{HEjtmSN z`?>!lvI6-E$sR$z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZKG z?e4*+P_B01C y4~wVm77PrlnN1#^-;iktbT40OglC$sFM}44%>l$9a48t%V+K!GKbLh*2~7a5qI!A& literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/lotr/textures/items/flatbread.png b/src/main/resources/assets/lotr/textures/items/flatbread.png new file mode 100644 index 0000000000000000000000000000000000000000..32847c65fa018c2c0f6926342cc8eef7b514c76c GIT binary patch literal 840 zcmV-O1GoH%P)z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^000SaNLh0L01m?d01m?e$8V@)00007 zbV*G`2k8Y06f-&MgK26200MGJL_t(I%cYZDNK;`L$A9PSxSit%wpojW=*n)C5DJ8f zE()YV2wG$y1l>emNOj?j5Nb#eNF*jvL05feP^RDOSeR&_=-}Ci<;6F{+`q1jCF?08D#6yL>3II*l(RBlxwFrRDfl1*XK&z|9 zJbttqHIqRQBoxI4!0W+&I-cGKz%%@frAU~s6LXt0Xm!J!~VUbJ)wQ;VYOG1TN+nj7|Q>X)Xk0{{e3SwCfN zoUBBWogm6c@=jXLAEVfDghwOGn*eXzV+DYgi6MwKOe0N?JAk1@5Jeq;9(Mpp0AR6} zkqAWrkc&$SfSgkh<-&|bnaKQ03?oVBrDm?zJMfNo<^5_lTL7eEM8t=DWLG&7d3ztmX{Ks>qv zfOzVF-MriXo@j6w!%WiB+r@2HEr=2ke;?Vj57S(WvvCT4=EHOjObViafVnz~z49Ef zpc_#tNMQtDcREuLViU7z{cw!bEUmd&E8e$t6a zEEa`Kauz|9$i&ka%mQly3QYO%Ew1ooI@B&~w?sK>Xga~}UF9r%|ILecA5bi%2%@v;Y*OoZGG~mWTF^ENTF0000eK@{Ea{HEjtmSN z`?>!lvI6-E$sR$z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZKG z?e421szhvbSl~(r=o-hR{^vKi2 zF~s8Z-bov|ngT@H{!8ncy70O-ub$GTV8P+n`|z4@#1>cn2eVB&*FSRRIJ?zUlh^d0 zZqY`Q%ZvD8cC;6tuisaEjrUJw80sQ9|&5_r$PFHP6#!OV<0DOjzUV zbh=EUMeyeK@{Ea{HEjtmSN z`?>!lvI6-E$sR$z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZKG z?e4Zf2prZwU{HQ8t8KFSI^#35f{%ZA`k0*!2->p4 z^%uW5Y~bML$GQHizuaBti^rSRIe59vYHVy|%v0w1@PRv_Ba!+4)-9#~oewjzF77N*jw6OK0wmF literal 0 HcmV?d00001