diff --git a/src/main/java/com/zivilon/cinder_loe/CinderLoE.java b/src/main/java/com/zivilon/cinder_loe/CinderLoE.java index 2baa3f9..8daaf6f 100644 --- a/src/main/java/com/zivilon/cinder_loe/CinderLoE.java +++ b/src/main/java/com/zivilon/cinder_loe/CinderLoE.java @@ -126,9 +126,10 @@ public class CinderLoE { public static LOTRMaterial MATERIAL_SERPENT; public static LOTRMaterial MATERIAL_USURPER; public static LOTRMaterial MATERIAL_WARLORD; + public static LOTRMaterial MATERIAL_ESGAROTH; public static LOTRMaterial MATERIAL_JADE; public static LOTRMaterial MATERIAL_GILDEDGALVORN; - + public static LOTRMaterial MATERIAL_ARTIFACT; // Blocks // public static Block barricade; public static Block cinderBlock; @@ -218,6 +219,11 @@ public class CinderLoE { public static Item bodyJade; public static Item legsJade; public static Item bootsJade; + public static Item helmetDorLomin; + public static Item bodyIsildur; + public static Item legsArtifact; + public static Item bootsArtifact; + public static Item bowLurtz; // Misc public static Item forgingKit; @@ -248,6 +254,10 @@ public class CinderLoE { public static Item bodyGildedGalvorn; public static Item legsGildedGalvorn; public static Item bootsGildedGalvorn; + public static Item helmetEsgaroth; + public static Item bodyEsgaroth; + public static Item legsEsgaroth; + public static Item bootsEsgaroth; // public static Item bowserpent; //public static Item swordUsurper; @@ -712,6 +722,7 @@ public class CinderLoE { ItemRegistration.register(spiceDwarven, "spiceDwarven",6921); ItemRegistration.register(spiceIngredient, "spiceIngredient",6922); ItemRegistration.register(flatbread, "flatbread",6923); + ItemRegistration.register(maggotlessbread, "maggotlessbread",6924); ItemRegistration.register(spawnEgg, "spawnEgg", 6003); @@ -752,6 +763,12 @@ public class CinderLoE { legsJade = (new LoEArmor(MATERIAL_JADE, 2,"leggings")).setUnlocalizedName("lotr:legsJade").setTextureName("lotr:legsJade").setCreativeTab(null); bootsJade = (new LoEArmor(MATERIAL_JADE, 3)).setUnlocalizedName("lotr:bootsJade").setTextureName("lotr:bootsJade").setCreativeTab(null); + helmetDorLomin = (new LoEArmor(MATERIAL_ARTIFACT, 0, "helmet")).setUnlocalizedName("lotr:helmetDorLomin").setTextureName("lotr:helmetDorLomin").setCreativeTab(null); + bodyIsildur = (new LoEArmor(MATERIAL_ARTIFACT, 1, "isildur")).setUnlocalizedName("lotr:bodyIsildur").setTextureName("lotr:bodyIsildur").setCreativeTab(null); + legsArtifact = (new LoEArmor(MATERIAL_ARTIFACT, 2,"leggings")).setUnlocalizedName("lotr:legsBronze").setTextureName("lotr:legsBronze").setCreativeTab(null); + bootsArtifact = (new LoEArmor(MATERIAL_ARTIFACT, 3)).setUnlocalizedName("lotr:legsBronze").setTextureName("lotr:legsBronze").setCreativeTab(null); + + forgingKit = (new ForgingKit()); fieldRepairKit = new FieldRepairKit().setUnlocalizedName("lotr:field_repair_kit").setTextureName("lotr:field_repair_kit"); @@ -767,6 +784,12 @@ public class CinderLoE { ItemRegistration.register(bodyJade, "chestplateJade", 6206); ItemRegistration.register(legsJade, "legsJade", 6207); ItemRegistration.register(bootsJade, "bootsJade", 6208); + + ItemRegistration.register(helmetDorLomin, "helmetDorLomin", 6209); + ItemRegistration.register(bodyIsildur, "bodyIsildur", 6210); + ItemRegistration.register(legsArtifact, "legsArtifact", 6211); + ItemRegistration.register(bootsArtifact, "bootsArtifact", 6212); + linkLOTRWeapon(frostblade, "frostblade"); linkLOTRWeapon(daggervoid, "daggerVoid"); linkLOTRWeapon(spearsolidgold, "spearsolidgold"); @@ -1005,6 +1028,22 @@ public class CinderLoE { } else { System.err.println("Failed to find WARLORD material for armor initialization."); } + MATERIAL_ESGAROTH = getLOTRMaterialByName("ESGAROTH"); + if (MATERIAL_ESGAROTH != null) { + helmetEsgaroth = (new LoEArmor(MATERIAL_ESGAROTH, 0, "helmet", Items.iron_ingot)).setUnlocalizedName("lotr:helmetEsgaroth").setTextureName("lotr:helmetEsgaroth").setCreativeTab(null); + bodyEsgaroth = (new LoEArmor(MATERIAL_ESGAROTH, 1, Items.iron_ingot)).setUnlocalizedName("lotr:bodyEsgaroth").setTextureName("lotr:bodyEsgaroth").setCreativeTab(null); + legsEsgaroth = (new LoEArmor(MATERIAL_ESGAROTH, 2, Items.iron_ingot)).setUnlocalizedName("lotr:legsEsgaroth").setTextureName("lotr:legsEsgaroth").setCreativeTab(null); + bootsEsgaroth = (new LoEArmor(MATERIAL_ESGAROTH, 3, Items.iron_ingot)).setUnlocalizedName("lotr:bootsEsgaroth").setTextureName("lotr:bootsEsgaroth").setCreativeTab(null); + + + ItemRegistration.register(helmetEsgaroth, "helmetEsgaroth", 6817); + ItemRegistration.register(bodyEsgaroth, "bodyEsgaroth", 6818); + ItemRegistration.register(legsEsgaroth, "legsEsgaroth", 6819); + ItemRegistration.register(bootsEsgaroth, "bootsEsgaroth", 6820); + + } else { + System.err.println("Failed to find ESGAROTH material for armor initialization."); + } //Rhudaur diff --git a/src/main/java/com/zivilon/cinder_loe/Materials.java b/src/main/java/com/zivilon/cinder_loe/Materials.java index 2a478d6..90cfe93 100644 --- a/src/main/java/com/zivilon/cinder_loe/Materials.java +++ b/src/main/java/com/zivilon/cinder_loe/Materials.java @@ -24,8 +24,10 @@ public class Materials { modifyMaterial("SERPENT", 700, 2.0F, 0.6F, 2, 6.0F, 10, LOTRMod.bronze); modifyMaterial("USURPER",700, 2.0F, 0.6F, 2, 6.0F, 10, Items.iron_ingot); modifyMaterial("WARLORD", 700, 2.0F, 0.6F, 2, 6.0F, 10, LOTRMod.bronze); + modifyMaterial("ESGAROTH",700, 2.0F, 0.6F, 2, 6.0F, 10, Items.iron_ingot); modifyMaterial("JADE",1000, 5.0F, 0.8F, 0, 9.0F, 10, LOTRMod.emerald); modifyMaterial("GILDEDGALVORN",700, 3.0F, 0.6F, 2, 7.0F, 15, LOTRMod.galvorn); + modifyMaterial("ARTIFACT",2000, 0.0F, 0.8F, 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/ModelDragonHelm.java b/src/main/java/com/zivilon/cinder_loe/client/model/ModelDragonHelm.java new file mode 100644 index 0000000..1f612ab --- /dev/null +++ b/src/main/java/com/zivilon/cinder_loe/client/model/ModelDragonHelm.java @@ -0,0 +1,76 @@ +package com.zivilon.cinder_loe.client.model; +// Made with Blockbench 4.12.4 +// Exported for Minecraft version 1.7 - 1.12 +// Paste this class into your mod and generate all required imports + + +import lotr.client.model.LOTRModelBiped; +import net.minecraft.client.model.ModelBox; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelDragonHelm extends LOTRModelBiped { + private final ModelRenderer Hemlet; + private final ModelRenderer Backer2_r1; + private final ModelRenderer DragonBottom_r1; + private final ModelRenderer DragonTop_r1; + + public ModelDragonHelm(float f) { + super(f); + textureWidth = 64; + textureHeight = 64; + + Hemlet = new ModelRenderer(this); + Hemlet.setRotationPoint(0.0F, -9.0F, 8.0F); + Hemlet.cubeList.add(new ModelBox(Hemlet, 0, 16, -4.0F, 1.0F, -12.0F, 8, 8, 8, 1.0F)); + Hemlet.cubeList.add(new ModelBox(Hemlet, 57, 25, -3.0F, 1.0F, -2.8F, 3, 6, 0, 0.0F)); + Hemlet.cubeList.add(new ModelBox(Hemlet, 33, 14, 5.2F, 1.0F, -15.0F, 0, 7, 11, 0.0F)); + Hemlet.cubeList.add(new ModelBox(Hemlet, 33, 14, -5.2F, 1.0F, -15.0F, 0, 7, 11, 0.0F)); + + Backer2_r1 = new ModelRenderer(this); + Backer2_r1.setRotationPoint(1.0F, 7.0F, -2.5F); + setRotationAngle(Backer2_r1, 0.0F, 3.1416F, 0.0F); + Backer2_r1.cubeList.add(new ModelBox(Backer2_r1, 57, 25, -2.0F, -6.0F, 0.7F, 3, 6, 0, 0.0F)); + + DragonBottom_r1 = new ModelRenderer(this); + DragonBottom_r1.setRotationPoint(1.0F, 10.0F, 0.0F); + setRotationAngle(DragonBottom_r1, 0.0F, 3.1416F, 0.0F); + DragonBottom_r1.cubeList.add(new ModelBox(DragonBottom_r1, 23, 45, 1.0F, -10.0F, -1.5F, 0, 10, 7, 0.0F)); + + DragonTop_r1 = new ModelRenderer(this); + DragonTop_r1.setRotationPoint(0.0F, 0.0F, 0.0F); + setRotationAngle(DragonTop_r1, 0.0F, 3.1416F, 0.0F); + DragonTop_r1.cubeList.add(new ModelBox(DragonTop_r1, 17, 32, 0.0F, -5.0F, -0.5F, 0, 5, 15, 0.0F)); + + // Added biped head to recognize that everything is a child of the head + 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)); + + //Move the children to after setting up biped head for readability, assigned Hemlet to be child of bipedHead + Hemlet.addChild(Backer2_r1); + Hemlet.addChild(DragonBottom_r1); + Hemlet.addChild(DragonTop_r1); + this.bipedHead.addChild(this.Hemlet); + + //Clear all other body parts from model + 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); + } + + public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { + modelRenderer.rotateAngleX = x; + modelRenderer.rotateAngleY = y; + modelRenderer.rotateAngleZ = z; + } +} \ No newline at end of file diff --git a/src/main/java/com/zivilon/cinder_loe/client/model/ModelEsgarothHelmet.java b/src/main/java/com/zivilon/cinder_loe/client/model/ModelEsgarothHelmet.java new file mode 100644 index 0000000..157bb7b --- /dev/null +++ b/src/main/java/com/zivilon/cinder_loe/client/model/ModelEsgarothHelmet.java @@ -0,0 +1,117 @@ +package com.zivilon.cinder_loe.client.model;// Made with Blockbench 4.12.4 +// Exported for Minecraft version 1.7 - 1.12 +// Paste this class into your mod and generate all required imports + + +import lotr.client.model.LOTRModelBiped; +import net.minecraft.client.model.ModelBox; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelEsgarothHelmet extends LOTRModelBiped { + private final ModelRenderer Hemlet; + private final ModelRenderer FrontVisor; + private final ModelRenderer bb_main2; + private final ModelRenderer bb_main; + private final ModelRenderer plumeee; + private final ModelRenderer plume4_r1; + private final ModelRenderer plume3_r1; + private final ModelRenderer plume2_r1; + private final ModelRenderer plume_r1; + private final ModelRenderer plume5_r1; + private final ModelRenderer cube_r1; + + public ModelEsgarothHelmet(float f) { + super(f); + textureWidth = 64; + textureHeight = 64; + + Hemlet = new ModelRenderer(this); + Hemlet.setRotationPoint(0.0F, 24.0F, 0.0F); + + + FrontVisor = new ModelRenderer(this); + FrontVisor.setRotationPoint(0.0F, 0.0F, 0.0F); + FrontVisor.cubeList.add(new ModelBox(FrontVisor, 32, 0, -6.0F, -29.3F, -6.0F, 12, -1, 4, 0.0F)); + FrontVisor.cubeList.add(new ModelBox(FrontVisor, 14, 43, 0.0F, -35.0F, -6.0F, 0, 11, 12, 0.0F)); + + bb_main2 = new ModelRenderer(this); + bb_main2.setRotationPoint(0.0F, 0.0F, 0.0F); + bb_main2.cubeList.add(new ModelBox(bb_main2, 0, 21, -3.5F, -30.4F, -5.5F, 7, -3, 11, 0.0F)); + + bb_main = new ModelRenderer(this); + bb_main.setRotationPoint(0.0F, 0.0F, 0.0F); + bb_main.cubeList.add(new ModelBox(bb_main, 0, 0, -4.0F, -32.0F, -4.0F, 8, 8, 8, 1.0F)); + bb_main.cubeList.add(new ModelBox(bb_main, 0, 33, -5.5F, -28.0F, -6.0F, 11, 5, 12, 0.0F)); + + plumeee = new ModelRenderer(this); + plumeee.setRotationPoint(0.0F, 0.0F, 0.0F); + + + plume4_r1 = new ModelRenderer(this); + plume4_r1.setRotationPoint(0.0F, -35.0F, 0.0F); + setRotationAngle(plume4_r1, -0.829F, 1.2217F, -1.309F); + plume4_r1.cubeList.add(new ModelBox(plume4_r1, 44, 14, 0.0F, -9.0F, -3.0F, 0, 9, 6, 0.0F)); + + plume3_r1 = new ModelRenderer(this); + plume3_r1.setRotationPoint(0.0F, -35.0F, 0.0F); + setRotationAngle(plume3_r1, -0.3054F, -0.829F, 0.829F); + plume3_r1.cubeList.add(new ModelBox(plume3_r1, 44, 14, 0.0F, -9.0F, -3.0F, 0, 9, 6, 0.0F)); + + plume2_r1 = new ModelRenderer(this); + plume2_r1.setRotationPoint(0.0F, -35.0F, 0.0F); + setRotationAngle(plume2_r1, -0.9163F, -1.0036F, 0.8727F); + plume2_r1.cubeList.add(new ModelBox(plume2_r1, 44, 14, 0.0F, -9.0F, -3.0F, 0, 9, 6, 0.0F)); + + plume_r1 = new ModelRenderer(this); + plume_r1.setRotationPoint(0.0F, -35.0F, 0.0F); + setRotationAngle(plume_r1, 0.0873F, 1.1345F, -0.6981F); + plume_r1.cubeList.add(new ModelBox(plume_r1, 44, 14, 0.0F, -9.0F, -3.0F, 0, 9, 6, 0.0F)); + + plume5_r1 = new ModelRenderer(this); + plume5_r1.setRotationPoint(0.0F, -35.0F, 0.0F); + setRotationAngle(plume5_r1, -0.5672F, -1.1781F, 0.3927F); + plume5_r1.cubeList.add(new ModelBox(plume5_r1, 44, 14, 0.0F, -9.0F, -3.0F, 0, 9, 6, 0.0F)); + + cube_r1 = new ModelRenderer(this); + cube_r1.setRotationPoint(0.0F, -33.0F, 0.0F); + setRotationAngle(cube_r1, 0.0F, -0.8727F, 0.0F); + cube_r1.cubeList.add(new ModelBox(cube_r1, 0, 51, -1.0F, -2.0F, -1.0F, 2, 2, 2, 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.bipedHead.addChild(Hemlet); + this.bipedHead.addChild(FrontVisor); + this.bipedHead.addChild(bb_main2); + this.bipedHead.addChild(bb_main); + this.bipedHead.addChild(plumeee); + this.bipedHead.addChild(plume4_r1); + this.bipedHead.addChild(plume3_r1); + this.bipedHead.addChild(plume2_r1); + this.bipedHead.addChild(plume_r1); + this.bipedHead.addChild(plume5_r1); + this.bipedHead.addChild(cube_r1); + + 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); + } + + public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { + modelRenderer.rotateAngleX = x; + modelRenderer.rotateAngleY = y; + modelRenderer.rotateAngleZ = z; + } +} \ No newline at end of file diff --git a/src/main/java/com/zivilon/cinder_loe/client/model/ModelFangornAuroch.java b/src/main/java/com/zivilon/cinder_loe/client/model/npc/ModelFangornAuroch.java similarity index 99% rename from src/main/java/com/zivilon/cinder_loe/client/model/ModelFangornAuroch.java rename to src/main/java/com/zivilon/cinder_loe/client/model/npc/ModelFangornAuroch.java index 2921aa7..b4a976f 100644 --- a/src/main/java/com/zivilon/cinder_loe/client/model/ModelFangornAuroch.java +++ b/src/main/java/com/zivilon/cinder_loe/client/model/npc/ModelFangornAuroch.java @@ -1,4 +1,4 @@ -package com.zivilon.cinder_loe.client.model; +package com.zivilon.cinder_loe.client.model.npc; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/src/main/java/com/zivilon/cinder_loe/client/model/ModelFangornElk.java b/src/main/java/com/zivilon/cinder_loe/client/model/npc/ModelFangornElk.java similarity index 99% rename from src/main/java/com/zivilon/cinder_loe/client/model/ModelFangornElk.java rename to src/main/java/com/zivilon/cinder_loe/client/model/npc/ModelFangornElk.java index 62d5b9a..023c606 100644 --- a/src/main/java/com/zivilon/cinder_loe/client/model/ModelFangornElk.java +++ b/src/main/java/com/zivilon/cinder_loe/client/model/npc/ModelFangornElk.java @@ -1,4 +1,4 @@ -package com.zivilon.cinder_loe.client.model; +package com.zivilon.cinder_loe.client.model.npc; import lotr.common.LOTRMod; import net.minecraft.client.model.ModelBase; diff --git a/src/main/java/com/zivilon/cinder_loe/client/model/ModelFangornWolf.java b/src/main/java/com/zivilon/cinder_loe/client/model/npc/ModelFangornWolf.java similarity index 99% rename from src/main/java/com/zivilon/cinder_loe/client/model/ModelFangornWolf.java rename to src/main/java/com/zivilon/cinder_loe/client/model/npc/ModelFangornWolf.java index d7db6fe..3c37b25 100644 --- a/src/main/java/com/zivilon/cinder_loe/client/model/ModelFangornWolf.java +++ b/src/main/java/com/zivilon/cinder_loe/client/model/npc/ModelFangornWolf.java @@ -1,4 +1,4 @@ -package com.zivilon.cinder_loe.client.model; +package com.zivilon.cinder_loe.client.model.npc; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/src/main/java/com/zivilon/cinder_loe/client/model/ModelSunkenSkeleton.java b/src/main/java/com/zivilon/cinder_loe/client/model/npc/ModelSunkenSkeleton.java similarity index 94% rename from src/main/java/com/zivilon/cinder_loe/client/model/ModelSunkenSkeleton.java rename to src/main/java/com/zivilon/cinder_loe/client/model/npc/ModelSunkenSkeleton.java index 7c9ac1b..9f215d6 100644 --- a/src/main/java/com/zivilon/cinder_loe/client/model/ModelSunkenSkeleton.java +++ b/src/main/java/com/zivilon/cinder_loe/client/model/npc/ModelSunkenSkeleton.java @@ -1,9 +1,8 @@ -package com.zivilon.cinder_loe.client.model; +package com.zivilon.cinder_loe.client.model.npc; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; /** * ModelSunkenSkeleton - Cleric_red diff --git a/src/main/java/com/zivilon/cinder_loe/client/render/RenderFangornAuroch.java b/src/main/java/com/zivilon/cinder_loe/client/render/RenderFangornAuroch.java index 8378879..c6ec4b1 100644 --- a/src/main/java/com/zivilon/cinder_loe/client/render/RenderFangornAuroch.java +++ b/src/main/java/com/zivilon/cinder_loe/client/render/RenderFangornAuroch.java @@ -7,7 +7,7 @@ import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import com.zivilon.cinder_loe.client.model.ModelFangornAuroch; +import com.zivilon.cinder_loe.client.model.npc.ModelFangornAuroch; import com.zivilon.cinder_loe.entity.npc.radagast.FangornAuroch; public class RenderFangornAuroch extends RenderLiving { diff --git a/src/main/java/com/zivilon/cinder_loe/client/render/RenderFangornElk.java b/src/main/java/com/zivilon/cinder_loe/client/render/RenderFangornElk.java index a34b632..23c8706 100644 --- a/src/main/java/com/zivilon/cinder_loe/client/render/RenderFangornElk.java +++ b/src/main/java/com/zivilon/cinder_loe/client/render/RenderFangornElk.java @@ -7,7 +7,7 @@ import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import com.zivilon.cinder_loe.client.model.ModelFangornElk; +import com.zivilon.cinder_loe.client.model.npc.ModelFangornElk; import com.zivilon.cinder_loe.entity.npc.radagast.FangornElk; public class RenderFangornElk extends RenderLiving { diff --git a/src/main/java/com/zivilon/cinder_loe/client/render/RenderFangornWolf.java b/src/main/java/com/zivilon/cinder_loe/client/render/RenderFangornWolf.java index 454233e..6984f99 100644 --- a/src/main/java/com/zivilon/cinder_loe/client/render/RenderFangornWolf.java +++ b/src/main/java/com/zivilon/cinder_loe/client/render/RenderFangornWolf.java @@ -5,7 +5,7 @@ import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import com.zivilon.cinder_loe.client.model.ModelFangornWolf; +import com.zivilon.cinder_loe.client.model.npc.ModelFangornWolf; public class RenderFangornWolf extends RenderLiving { public static final ResourceLocation wolfSkin = new ResourceLocation("minecraft:textures/entity/wolf/wolf.png"); diff --git a/src/main/java/com/zivilon/cinder_loe/client/render/corrupt/RenderCorruptSkeleton.java b/src/main/java/com/zivilon/cinder_loe/client/render/corrupt/RenderCorruptSkeleton.java index f827d0b..7241b64 100644 --- a/src/main/java/com/zivilon/cinder_loe/client/render/corrupt/RenderCorruptSkeleton.java +++ b/src/main/java/com/zivilon/cinder_loe/client/render/corrupt/RenderCorruptSkeleton.java @@ -1,20 +1,8 @@ package com.zivilon.cinder_loe.client.render.corrupt; -import com.zivilon.cinder_loe.client.model.ModelFangornElk; -import com.zivilon.cinder_loe.client.model.ModelSunkenSkeleton; -import com.zivilon.cinder_loe.entity.corrupt.CorruptMan; -import lotr.client.model.LOTRModelHuman; -import lotr.client.model.LOTRModelSkeleton; -import lotr.client.render.entity.LOTRRandomSkins; -import lotr.client.render.entity.LOTRRenderBiped; -import lotr.client.render.entity.LOTRRenderGondorMan; -import lotr.client.render.entity.LOTRRenderSkeleton; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelBiped; +import com.zivilon.cinder_loe.client.model.npc.ModelSunkenSkeleton; import net.minecraft.client.renderer.entity.RenderBiped; -import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; import net.minecraft.util.ResourceLocation; public class RenderCorruptSkeleton extends RenderBiped { 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 98ea8e3..13cc2ec 100644 --- a/src/main/java/com/zivilon/cinder_loe/coremod/LOTRMaterialTransformer.java +++ b/src/main/java/com/zivilon/cinder_loe/coremod/LOTRMaterialTransformer.java @@ -66,8 +66,11 @@ public class LOTRMaterialTransformer implements IClassTransformer { addMaterial("SERPENT", classNode); addMaterial("USURPER", classNode); addMaterial("WARLORD",classNode); + addMaterial("ESGAROTH",classNode); addMaterial("JADE",classNode); addMaterial("GILDEDGALVORN",classNode); + addMaterial("ARTIFACT",classNode); + // Protection Conversion diff --git a/src/main/java/com/zivilon/cinder_loe/entity/SpeechBankModifier.java b/src/main/java/com/zivilon/cinder_loe/entity/SpeechBankModifier.java index 32217e8..da953c4 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/SpeechBankModifier.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/SpeechBankModifier.java @@ -72,6 +72,9 @@ public class SpeechBankModifier { speechBanks.put("limwaith/moredain/hostile", loadSpeechLines("limwaith/moredain/hostile")); speechBanks.put("limwaith/chieftain/friendly", loadSpeechLines("limwaith/chieftain/friendly")); speechBanks.put("limwaith/chieftain/neutral", loadSpeechLines("limwaith/chieftain/neutral")); + speechBanks.put("limwaith/shaman/friendly", loadSpeechLines("limwaith/shaman/friendly")); + speechBanks.put("limwaith/shaman/neutral", loadSpeechLines("limwaith/shaman/neutral")); + speechBanks.put("limwaith/shaman/hostile", loadSpeechLines("limwaith/shaman/hostile")); speechBanks.put("arnorSoldier/captain/friendly", loadSpeechLines("arnorSoldier/captain/friendly")); speechBanks.put("arnorSoldier/captain/neutral", loadSpeechLines("arnorSoldier/captain/neutral")); speechBanks.put("arnorSoldier/soldier/friendly", loadSpeechLines("arnorSoldier/soldier/friendly")); diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/AngmarOrcBrewer.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/AngmarOrcBrewer.java index bed877c..170840d 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/AngmarOrcBrewer.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/AngmarOrcBrewer.java @@ -3,15 +3,14 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; import com.zivilon.cinder_loe.mixins.MixinLOTRTradeEntries; import com.zivilon.cinder_loe.mixins.overrides.MixinLOTRTradeEntriesOverrides; +import lotr.common.LOTRAchievement; import lotr.common.LOTRFoods; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; -import lotr.common.entity.npc.LOTRTradeEntries; +import lotr.common.entity.npc.*; import lotr.common.entity.npc.LOTRTradeEntries.TradeType; -import lotr.common.entity.npc.LOTRTradeEntry; -import lotr.common.entity.npc.LOTRTradeEntryBarrel; -import lotr.common.entity.npc.LOTRTradeable; import lotr.common.item.LOTRItemMug; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -19,7 +18,7 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class AngmarOrcBrewer extends AngmarOrcButcher implements LOTRTradeable { +public class AngmarOrcBrewer extends LOTREntityAngmarOrc implements LOTRTradeable { public static LOTRTradeEntries ANGMAR_BREWER_BUY; public static LOTRTradeEntries ANGMAR_BREWER_SELL; @@ -35,6 +34,8 @@ public class AngmarOrcBrewer extends AngmarOrcButcher implements LOTRTradeable { return ANGMAR_BREWER_SELL; } + + public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) { data = super.onSpawnWithEgg(data); this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.daggerAngmarPoisoned)); @@ -49,17 +50,17 @@ public class AngmarOrcBrewer extends AngmarOrcButcher implements LOTRTradeable { static { ANGMAR_BREWER_BUY = new LOTRTradeEntries(TradeType.BUY, - new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 2), 8), - new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 2), 8), - new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 3), 8), - new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 4), 8), + new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), + new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), + new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), + new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 3), 180), new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 4), 300), new LOTRTradeEntry(new ItemStack(LOTRMod.mugMorgulDraught, 1, 9999), 8), new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugMorgulDraught, 1, 3), 150), new LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 200), new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 2), 6666)); - ((MixinLOTRTradeEntries)ANGMAR_BUTCHER_BUY).vessels(LOTRFoods.ORC_DRINK); + ((MixinLOTRTradeEntries)ANGMAR_BREWER_BUY).vessels(LOTRFoods.ORC_DRINK); ANGMAR_BREWER_SELL = new LOTRTradeEntries(TradeType.SELL, new LOTRTradeEntry(new ItemStack(LOTRMod.mug), 1), @@ -74,4 +75,26 @@ public class AngmarOrcBrewer extends AngmarOrcButcher implements LOTRTradeable { new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3)); } + @Override + public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { + + } + @Override + public String getSpeechBank(EntityPlayer entityplayer) { + if (this.isFriendlyAndAligned(entityplayer)) { + if (this.canTradeWith(entityplayer)) { + return "angmar/trader/friendly"; + } + return "angmar/trader/neutral"; + } + return "angmar/orc/hostile"; + } + public boolean canTradeWith(EntityPlayer entityplayer) { + return (LOTRLevelData.getData(entityplayer).getAlignment(getFaction()) >= 100.0F && isFriendlyAndAligned(entityplayer)); + } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeAngmarTrader); + } } diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/AngmarOrcButcher.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/AngmarOrcButcher.java index 6274018..d9b9224 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/AngmarOrcButcher.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/AngmarOrcButcher.java @@ -2,6 +2,7 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; import com.zivilon.cinder_loe.entity.npc.evil_human.Limwaith; +import lotr.common.LOTRAchievement; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; import lotr.common.entity.npc.*; @@ -16,7 +17,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class AngmarOrcButcher extends LOTREntityAngmarOrcTrader implements LOTRTradeable { +public class AngmarOrcButcher extends LOTREntityAngmarOrc implements LOTRTradeable { public static LOTRTradeEntries ANGMAR_BUTCHER_BUY; public static LOTRTradeEntries ANGMAR_BUTCHER_SELL; @@ -47,10 +48,6 @@ public class AngmarOrcButcher extends LOTREntityAngmarOrcTrader implements LOTRT return 2.0F; } - public boolean canTradeWith(EntityPlayer entityplayer) { - return (LOTRLevelData.getData(entityplayer).getAlignment(getFaction()) >= 100.0F && isFriendlyAndAligned(entityplayer)); - } - static { ANGMAR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY, @@ -79,7 +76,7 @@ public class AngmarOrcButcher extends LOTREntityAngmarOrcTrader implements LOTRT new LOTRTradeEntry(new ItemStack(LOTRMod.hobbitBone), 1), new LOTRTradeEntry(new ItemStack(LOTRMod.maggotyBread, 2), 2), new LOTRTradeEntry(new ItemStack(Items.bread, 1), 2), - new LOTRTradeEntry(new ItemStack(Items.rotten_flesh, 3, 15), 1), + new LOTRTradeEntry(new ItemStack(Items.rotten_flesh, 2), 2), new LOTRTradeEntry(new ItemStack(Items.chicken), 3), new LOTRTradeEntry(new ItemStack(Items.beef), 3), new LOTRTradeEntry(new ItemStack(Items.porkchop), 3), @@ -94,8 +91,8 @@ public class AngmarOrcButcher extends LOTREntityAngmarOrcTrader implements LOTRT @Override public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { - } + } @Override public String getSpeechBank(EntityPlayer entityplayer) { if (this.isFriendlyAndAligned(entityplayer)) { @@ -106,6 +103,14 @@ public class AngmarOrcButcher extends LOTREntityAngmarOrcTrader implements LOTRT } return "angmar/orc/hostile"; } + public boolean canTradeWith(EntityPlayer entityplayer) { + return (LOTRLevelData.getData(entityplayer).getAlignment(getFaction()) >= 100.0F && isFriendlyAndAligned(entityplayer)); + } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeAngmarTrader); + } @Override public ItemStack getPickedResult(MovingObjectPosition target) { return null; diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/AngmarOrcSmith.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/AngmarOrcSmith.java index 9b591dc..0b5a0c0 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/AngmarOrcSmith.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/AngmarOrcSmith.java @@ -1,13 +1,11 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; +import lotr.common.LOTRAchievement; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; -import lotr.common.entity.npc.LOTREntityAngmarOrcTrader; -import lotr.common.entity.npc.LOTRTradeEntries; +import lotr.common.entity.npc.*; import lotr.common.entity.npc.LOTRTradeEntries.TradeType; -import lotr.common.entity.npc.LOTRTradeEntry; -import lotr.common.entity.npc.LOTRTradeable; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.player.EntityPlayer; @@ -17,7 +15,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class AngmarOrcSmith extends AngmarOrcButcher implements LOTRTradeable.Smith { +public class AngmarOrcSmith extends LOTREntityAngmarOrc implements LOTRTradeable.Smith { public static LOTRTradeEntries ANGMAR_SMITH_BUY; public static LOTRTradeEntries ANGMAR_SMITH_SELL; @@ -94,5 +92,24 @@ public class AngmarOrcSmith extends AngmarOrcButcher implements LOTRTradeable.Sm new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17), new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3)); } + @Override + public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { + + } + @Override + public String getSpeechBank(EntityPlayer entityplayer) { + if (this.isFriendlyAndAligned(entityplayer)) { + if (this.canTradeWith(entityplayer)) { + return "angmar/trader/friendly"; + } + return "angmar/trader/neutral"; + } + return "angmar/orc/hostile"; + } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeAngmarTrader); + } } diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/DolGuldurOrcBrewer.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/DolGuldurOrcBrewer.java index f5a3e36..e796b6c 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/DolGuldurOrcBrewer.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/DolGuldurOrcBrewer.java @@ -2,23 +2,22 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; import com.zivilon.cinder_loe.mixins.MixinLOTRTradeEntries; +import lotr.common.LOTRAchievement; import lotr.common.LOTRFoods; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; -import lotr.common.entity.npc.LOTRTradeEntries; +import lotr.common.entity.npc.*; import lotr.common.entity.npc.LOTRTradeEntries.TradeType; -import lotr.common.entity.npc.LOTRTradeEntry; -import lotr.common.entity.npc.LOTRTradeEntryBarrel; -import lotr.common.entity.npc.LOTRTradeable; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class DolGuldurOrcBrewer extends DolGuldurOrcButcher implements LOTRTradeable { - public static LOTRTradeEntries ANGMAR_BUTCHER_BUY; - public static LOTRTradeEntries ANGMAR_BUTCHER_SELL; +public class DolGuldurOrcBrewer extends LOTREntityDolGuldurOrc implements LOTRTradeable { + public static LOTRTradeEntries DOLGULDUR_BREWER_BUY; + public static LOTRTradeEntries DOLGULDUR_BREWER_SELL; public DolGuldurOrcBrewer(World world) { super(world); @@ -26,11 +25,11 @@ public class DolGuldurOrcBrewer extends DolGuldurOrcButcher implements LOTRTrade public LOTRTradeEntries getBuyPool() { - return ANGMAR_BUTCHER_BUY; + return DOLGULDUR_BREWER_BUY; } public LOTRTradeEntries getSellPool() { - return ANGMAR_BUTCHER_SELL; + return DOLGULDUR_BREWER_SELL; } public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) { @@ -53,7 +52,7 @@ public class DolGuldurOrcBrewer extends DolGuldurOrcButcher implements LOTRTrade } static { - ANGMAR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY, + DOLGULDUR_BREWER_BUY = new LOTRTradeEntries(TradeType.BUY, new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), @@ -64,9 +63,9 @@ public class DolGuldurOrcBrewer extends DolGuldurOrcButcher implements LOTRTrade new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugMorgulDraught, 1, 3), 150), new LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 200), new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 2), 6666)); - ((MixinLOTRTradeEntries)ANGMAR_BUTCHER_BUY).vessels(LOTRFoods.ORC_DRINK); + ((MixinLOTRTradeEntries)DOLGULDUR_BREWER_BUY).vessels(LOTRFoods.ORC_DRINK); - ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL, + DOLGULDUR_BREWER_SELL = new LOTRTradeEntries(TradeType.SELL, new LOTRTradeEntry(new ItemStack(LOTRMod.mug), 1), new LOTRTradeEntry(new ItemStack(LOTRMod.waterskin), 2), new LOTRTradeEntry(new ItemStack(LOTRMod.barrel), 10), @@ -78,5 +77,24 @@ public class DolGuldurOrcBrewer extends DolGuldurOrcButcher implements LOTRTrade new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17), new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3)); } + @Override + public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { + + } + @Override + public String getSpeechBank(EntityPlayer entityplayer) { + if (this.isFriendlyAndAligned(entityplayer)) { + if (this.canTradeWith(entityplayer)) { + return "dolGuldur/trader/friendly"; + } + return "dolGuldur/trader/neutral"; + } + return "dolGuldur/orc/hostile"; + } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeDolGuldurTrader); + } } diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/DolGuldurOrcButcher.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/DolGuldurOrcButcher.java index b218845..ffd4340 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/DolGuldurOrcButcher.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/DolGuldurOrcButcher.java @@ -1,6 +1,7 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; +import lotr.common.LOTRAchievement; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; import lotr.common.entity.npc.*; @@ -13,7 +14,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class DolGuldurOrcButcher extends LOTREntityDolGuldurOrcTrader implements LOTRTradeable { +public class DolGuldurOrcButcher extends LOTREntityDolGuldurOrc implements LOTRTradeable { public static LOTRTradeEntries DOLGULDUR_BUTCHER_BUY; public static LOTRTradeEntries DOLGULDUR_BUTCHER_SELL; @@ -91,8 +92,8 @@ public class DolGuldurOrcButcher extends LOTREntityDolGuldurOrcTrader implements @Override public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { - } + } @Override public String getSpeechBank(EntityPlayer entityplayer) { if (this.isFriendlyAndAligned(entityplayer)) { @@ -103,6 +104,11 @@ public class DolGuldurOrcButcher extends LOTREntityDolGuldurOrcTrader implements } return "dolGuldur/orc/hostile"; } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeDolGuldurTrader); + } @Override public ItemStack getPickedResult(MovingObjectPosition target) { return null; diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/DolGuldurOrcSmith.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/DolGuldurOrcSmith.java index 5b7112d..24fdf5f 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/DolGuldurOrcSmith.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/DolGuldurOrcSmith.java @@ -1,8 +1,10 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; +import lotr.common.LOTRAchievement; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; +import lotr.common.entity.npc.LOTREntityDolGuldurOrc; import lotr.common.entity.npc.LOTRTradeEntries; import lotr.common.entity.npc.LOTRTradeEntries.TradeType; import lotr.common.entity.npc.LOTRTradeEntry; @@ -16,9 +18,9 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class DolGuldurOrcSmith extends DolGuldurOrcButcher implements LOTRTradeable.Smith { - public static LOTRTradeEntries ANGMAR_BUTCHER_BUY; - public static LOTRTradeEntries ANGMAR_BUTCHER_SELL; +public class DolGuldurOrcSmith extends LOTREntityDolGuldurOrc implements LOTRTradeable.Smith { + public static LOTRTradeEntries DOLGULDUR_SMITH_BUY; + public static LOTRTradeEntries DOLGULDUR_SMITH_SELL; public DolGuldurOrcSmith(World world) { super(world); @@ -26,11 +28,11 @@ public class DolGuldurOrcSmith extends DolGuldurOrcButcher implements LOTRTradea public LOTRTradeEntries getBuyPool() { - return ANGMAR_BUTCHER_BUY; + return DOLGULDUR_SMITH_BUY; } public LOTRTradeEntries getSellPool() { - return ANGMAR_BUTCHER_SELL; + return DOLGULDUR_SMITH_SELL; } public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) { @@ -54,7 +56,7 @@ public class DolGuldurOrcSmith extends DolGuldurOrcButcher implements LOTRTradea static { - ANGMAR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY, + DOLGULDUR_SMITH_BUY = new LOTRTradeEntries(TradeType.BUY, new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200), new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200), new LOTRTradeEntry(new ItemStack(LOTRMod.blacksmithHammer), 20), @@ -74,7 +76,7 @@ public class DolGuldurOrcSmith extends DolGuldurOrcButcher implements LOTRTradea new LOTRTradeEntry(new ItemStack(Items.arrow, 4), 3), new LOTRTradeEntry(new ItemStack(LOTRMod.hammerDolGuldur), 16)); - ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL, + DOLGULDUR_SMITH_SELL = new LOTRTradeEntries(TradeType.SELL, new LOTRTradeEntry(new ItemStack(LOTRMod.orcSteel), 3), new LOTRTradeEntry(new ItemStack(Items.leather), 2), new LOTRTradeEntry(new ItemStack(Items.string, 3), 1), @@ -87,5 +89,24 @@ public class DolGuldurOrcSmith extends DolGuldurOrcButcher implements LOTRTradea new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17), new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3)); } + @Override + public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { + + } + @Override + public String getSpeechBank(EntityPlayer entityplayer) { + if (this.isFriendlyAndAligned(entityplayer)) { + if (this.canTradeWith(entityplayer)) { + return "dolGuldur/trader/friendly"; + } + return "dolGuldur/trader/neutral"; + } + return "dolGuldur/orc/hostile"; + } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeDolGuldurTrader); + } } diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/GundabadOrcBrewer.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/GundabadOrcBrewer.java index 23ec920..12d8644 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/GundabadOrcBrewer.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/GundabadOrcBrewer.java @@ -2,23 +2,22 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; import com.zivilon.cinder_loe.mixins.MixinLOTRTradeEntries; +import lotr.common.LOTRAchievement; import lotr.common.LOTRFoods; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; -import lotr.common.entity.npc.LOTRTradeEntries; +import lotr.common.entity.npc.*; import lotr.common.entity.npc.LOTRTradeEntries.TradeType; -import lotr.common.entity.npc.LOTRTradeEntry; -import lotr.common.entity.npc.LOTRTradeEntryBarrel; -import lotr.common.entity.npc.LOTRTradeable; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class GundabadOrcBrewer extends GundabadOrcButcher implements LOTRTradeable { - public static LOTRTradeEntries ANGMAR_BUTCHER_BUY; - public static LOTRTradeEntries ANGMAR_BUTCHER_SELL; +public class GundabadOrcBrewer extends LOTREntityGundabadOrc implements LOTRTradeable { + public static LOTRTradeEntries GUNDABAD_BREWER_BUY; + public static LOTRTradeEntries GUNDABAD_BREWER_SELL; public GundabadOrcBrewer(World world) { super(world); @@ -26,11 +25,11 @@ public class GundabadOrcBrewer extends GundabadOrcButcher implements LOTRTradeab public LOTRTradeEntries getBuyPool() { - return ANGMAR_BUTCHER_BUY; + return GUNDABAD_BREWER_BUY; } public LOTRTradeEntries getSellPool() { - return ANGMAR_BUTCHER_SELL; + return GUNDABAD_BREWER_SELL; } public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) { @@ -53,7 +52,7 @@ public class GundabadOrcBrewer extends GundabadOrcButcher implements LOTRTradeab } static { - ANGMAR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY, + GUNDABAD_BREWER_BUY = new LOTRTradeEntries(TradeType.BUY, new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), @@ -62,9 +61,9 @@ public class GundabadOrcBrewer extends GundabadOrcButcher implements LOTRTradeab new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 4), 300), new LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 200), new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 2), 6666)); - ((MixinLOTRTradeEntries)ANGMAR_BUTCHER_BUY).vessels(LOTRFoods.ORC_DRINK); + ((MixinLOTRTradeEntries)GUNDABAD_BREWER_BUY).vessels(LOTRFoods.ORC_DRINK); - ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL, + GUNDABAD_BREWER_SELL = new LOTRTradeEntries(TradeType.SELL, new LOTRTradeEntry(new ItemStack(LOTRMod.mug), 1), new LOTRTradeEntry(new ItemStack(LOTRMod.waterskin), 2), new LOTRTradeEntry(new ItemStack(LOTRMod.barrel), 10), @@ -75,5 +74,23 @@ public class GundabadOrcBrewer extends GundabadOrcButcher implements LOTRTradeab new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17), new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3)); } + @Override + public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { + } + @Override + public String getSpeechBank(EntityPlayer entityplayer) { + if (this.isFriendlyAndAligned(entityplayer)) { + if (this.canTradeWith(entityplayer)) { + return "gundabad/trader/friendly"; + } + return "gundabad/trader/neutral"; + } + return "gundabad/orc/hostile"; + } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeGundabadTrader); + } } diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/GundabadOrcButcher.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/GundabadOrcButcher.java index 8314528..9932b8d 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/GundabadOrcButcher.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/GundabadOrcButcher.java @@ -14,7 +14,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class GundabadOrcButcher extends LOTREntityGundabadOrcTrader implements LOTRTradeable { +public class GundabadOrcButcher extends LOTREntityGundabadOrc implements LOTRTradeable { public static LOTRTradeEntries GUNDABAD_BUTCHER_BUY; public static LOTRTradeEntries GUNDABAD_BUTCHER_SELL; @@ -91,10 +91,10 @@ public class GundabadOrcButcher extends LOTREntityGundabadOrcTrader implements L new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3)); } - @Override + @Override public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { - } + } @Override public String getSpeechBank(EntityPlayer entityplayer) { if (this.isFriendlyAndAligned(entityplayer)) { @@ -105,6 +105,11 @@ public class GundabadOrcButcher extends LOTREntityGundabadOrcTrader implements L } return "gundabad/orc/hostile"; } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeGundabadTrader); + } @Override public ItemStack getPickedResult(MovingObjectPosition target) { return null; diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/GundabadOrcSmith.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/GundabadOrcSmith.java index 83c0fbb..20f18cd 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/GundabadOrcSmith.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/GundabadOrcSmith.java @@ -1,12 +1,15 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; +import lotr.common.LOTRAchievement; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; +import lotr.common.entity.npc.LOTREntityGundabadUruk; import lotr.common.entity.npc.LOTRTradeEntries; import lotr.common.entity.npc.LOTRTradeEntries.TradeType; import lotr.common.entity.npc.LOTRTradeEntry; import lotr.common.entity.npc.LOTRTradeable; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.player.EntityPlayer; @@ -15,32 +18,21 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class GundabadOrcSmith extends GundabadOrcButcher implements LOTRTradeable.Smith { - public static LOTRTradeEntries ANGMAR_BUTCHER_BUY; - public static LOTRTradeEntries ANGMAR_BUTCHER_SELL; +public class GundabadOrcSmith extends LOTREntityGundabadUruk implements LOTRTradeable.Smith { + public static LOTRTradeEntries GUNDABAD_SMITH_BUY; + public static LOTRTradeEntries GUNDABAD_SMITH_SELL; public GundabadOrcSmith(World world) { super(world); - this.setSize(0.6f, 1.8f); - this.isWeakOrc = false; - } - protected float getSoundPitch() { - return super.getSoundPitch() * 0.75f; - } - @Override - protected void applyEntityAttributes() { - super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(26.0); - this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(24.0); - this.getEntityAttribute(npcRangedAccuracy).setBaseValue(0.5); + this.npcShield = null; } public LOTRTradeEntries getBuyPool() { - return ANGMAR_BUTCHER_BUY; + return GUNDABAD_SMITH_BUY; } public LOTRTradeEntries getSellPool() { - return ANGMAR_BUTCHER_SELL; + return GUNDABAD_SMITH_SELL; } public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) { @@ -64,7 +56,7 @@ public class GundabadOrcSmith extends GundabadOrcButcher implements LOTRTradeabl static { - ANGMAR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY, + GUNDABAD_SMITH_BUY = new LOTRTradeEntries(TradeType.BUY, new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200), new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200), new LOTRTradeEntry(new ItemStack(LOTRMod.blacksmithHammer), 20), @@ -88,7 +80,7 @@ public class GundabadOrcSmith extends GundabadOrcButcher implements LOTRTradeabl new LOTRTradeEntry(new ItemStack(Items.arrow, 4), 3), new LOTRTradeEntry(new ItemStack(Items.iron_axe), 14)); - ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL, + GUNDABAD_SMITH_SELL = new LOTRTradeEntries(TradeType.SELL, new LOTRTradeEntry(new ItemStack(LOTRMod.bronze), 3), new LOTRTradeEntry(new ItemStack(Items.iron_ingot), 3), new LOTRTradeEntry(new ItemStack(Items.string, 3), 1), @@ -103,5 +95,23 @@ public class GundabadOrcSmith extends GundabadOrcButcher implements LOTRTradeabl new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17), new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3)); } + @Override + public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { + + } + @Override + public String getSpeechBank(EntityPlayer entityplayer) { + if (this.isFriendlyAndAligned(entityplayer)) { + if (this.canTradeWith(entityplayer)) { + return "gundabad/trader/friendly"; + } + return "gundabad/trader/neutral"; + } + return "gundabad/orc/hostile"; + } + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeGundabadTrader); + } } diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/HalfTrollBrewer.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/HalfTrollBrewer.java index 8064147..50454c0 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/HalfTrollBrewer.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/HalfTrollBrewer.java @@ -2,14 +2,13 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; import com.zivilon.cinder_loe.mixins.MixinLOTRTradeEntries; +import lotr.common.LOTRAchievement; import lotr.common.LOTRFoods; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; -import lotr.common.entity.npc.LOTRTradeEntries; +import lotr.common.entity.npc.*; import lotr.common.entity.npc.LOTRTradeEntries.TradeType; -import lotr.common.entity.npc.LOTRTradeEntry; -import lotr.common.entity.npc.LOTRTradeEntryBarrel; -import lotr.common.entity.npc.LOTRTradeable; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -17,20 +16,20 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class HalfTrollBrewer extends HalfTrollButcher implements LOTRTradeable { - public static LOTRTradeEntries ANGMAR_BUTCHER_BUY; - public static LOTRTradeEntries ANGMAR_BUTCHER_SELL; +public class HalfTrollBrewer extends LOTREntityHalfTroll implements LOTRTradeable { + public static LOTRTradeEntries HALF_TROLL_BREWER_BUY; + public static LOTRTradeEntries HALF_TROLL_BREWER_SELL; public HalfTrollBrewer(World world) { super(world); } public LOTRTradeEntries getBuyPool() { - return ANGMAR_BUTCHER_BUY; + return HALF_TROLL_BREWER_BUY; } public LOTRTradeEntries getSellPool() { - return ANGMAR_BUTCHER_SELL; + return HALF_TROLL_BREWER_SELL; } public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) { @@ -50,7 +49,7 @@ public class HalfTrollBrewer extends HalfTrollButcher implements LOTRTradeable { } static { - ANGMAR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY, + HALF_TROLL_BREWER_BUY = new LOTRTradeEntries(TradeType.BUY, new LOTRTradeEntry(new ItemStack(LOTRMod.mugTorogDraught, 1, 9999), 8), new LOTRTradeEntry(new ItemStack(LOTRMod.mugTorogDraught, 1, 9999), 8), new LOTRTradeEntry(new ItemStack(LOTRMod.mugTorogDraught, 1, 9999), 8), @@ -61,9 +60,9 @@ public class HalfTrollBrewer extends HalfTrollButcher implements LOTRTradeable { new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 3), 150), new LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 200), new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 2), 6666)); - ((MixinLOTRTradeEntries)ANGMAR_BUTCHER_BUY).vessels(LOTRFoods.HALF_TROLL_DRINK); + ((MixinLOTRTradeEntries)HALF_TROLL_BREWER_BUY).vessels(LOTRFoods.HALF_TROLL_DRINK); - ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL, + HALF_TROLL_BREWER_SELL = new LOTRTradeEntries(TradeType.SELL, new LOTRTradeEntry(new ItemStack(LOTRMod.mug), 1), new LOTRTradeEntry(new ItemStack(Items.rotten_flesh), 2), new LOTRTradeEntry(new ItemStack(Items.reeds, 2), 2), @@ -78,5 +77,24 @@ public class HalfTrollBrewer extends HalfTrollButcher implements LOTRTradeable { new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17), new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3)); } + @Override + public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { + } + + @Override + public String getSpeechBank(EntityPlayer entityplayer) { + if (this.isFriendlyAndAligned(entityplayer)) { + if (this.canTradeWith(entityplayer)) { + return "halfTroll/scavenger/friendly"; + } + return "halfTroll/scavenger/neutral"; + } + return "halfTroll/halfTroll/hostile"; + } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeHalfTrollScavenger); + } } diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/HalfTrollButcher.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/HalfTrollButcher.java index 96b03d6..46944f8 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/HalfTrollButcher.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/HalfTrollButcher.java @@ -1,6 +1,7 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; +import lotr.common.LOTRAchievement; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; import lotr.common.entity.npc.*; @@ -13,7 +14,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class HalfTrollButcher extends LOTREntityHalfTrollScavenger implements LOTRTradeable { +public class HalfTrollButcher extends LOTREntityHalfTroll implements LOTRTradeable { public static LOTRTradeEntries HALF_TROLL_BUTCHER_BUY; public static LOTRTradeEntries HALF_TROLL_BUTCHER_SELL; @@ -94,6 +95,11 @@ public class HalfTrollButcher extends LOTREntityHalfTrollScavenger implements LO } return "halfTroll/halfTroll/hostile"; } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeHalfTrollScavenger); + } @Override public ItemStack getPickedResult(MovingObjectPosition target) { return null; diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/IsengardOrcBrewer.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/IsengardOrcBrewer.java index 4772992..fbf8c8c 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/IsengardOrcBrewer.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/IsengardOrcBrewer.java @@ -2,34 +2,33 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; import com.zivilon.cinder_loe.mixins.MixinLOTRTradeEntries; +import lotr.common.LOTRAchievement; import lotr.common.LOTRFoods; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; -import lotr.common.entity.npc.LOTRTradeEntries; +import lotr.common.entity.npc.*; import lotr.common.entity.npc.LOTRTradeEntries.TradeType; -import lotr.common.entity.npc.LOTRTradeEntry; -import lotr.common.entity.npc.LOTRTradeEntryBarrel; -import lotr.common.entity.npc.LOTRTradeable; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class IsengardOrcBrewer extends IsengardOrcButcher implements LOTRTradeable { - public static LOTRTradeEntries ANGMAR_BUTCHER_BUY; - public static LOTRTradeEntries ANGMAR_BUTCHER_SELL; +public class IsengardOrcBrewer extends LOTREntityIsengardSnaga implements LOTRTradeable { + public static LOTRTradeEntries URUK_BREWER_BUY; + public static LOTRTradeEntries URUK_BREWER_SELL; public IsengardOrcBrewer(World world) { super(world); } public LOTRTradeEntries getBuyPool() { - return ANGMAR_BUTCHER_BUY; + return URUK_BREWER_BUY; } public LOTRTradeEntries getSellPool() { - return ANGMAR_BUTCHER_SELL; + return URUK_BREWER_SELL; } public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) { @@ -52,7 +51,7 @@ public class IsengardOrcBrewer extends IsengardOrcButcher implements LOTRTradeab } static { - ANGMAR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY, + URUK_BREWER_BUY = new LOTRTradeEntries(TradeType.BUY, new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), @@ -61,9 +60,9 @@ public class IsengardOrcBrewer extends IsengardOrcButcher implements LOTRTradeab new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 4), 300), new LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 200), new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 2), 6666)); - ((MixinLOTRTradeEntries)ANGMAR_BUTCHER_BUY).vessels(LOTRFoods.ORC_DRINK); + ((MixinLOTRTradeEntries)URUK_BREWER_BUY).vessels(LOTRFoods.ORC_DRINK); - ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL, + URUK_BREWER_SELL = new LOTRTradeEntries(TradeType.SELL, new LOTRTradeEntry(new ItemStack(LOTRMod.mug), 1), new LOTRTradeEntry(new ItemStack(LOTRMod.waterskin), 2), new LOTRTradeEntry(new ItemStack(LOTRMod.barrel), 10), @@ -74,5 +73,24 @@ public class IsengardOrcBrewer extends IsengardOrcButcher implements LOTRTradeab new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17), new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3)); } + @Override + public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { + } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeUrukTrader); + } + + @Override + public String getSpeechBank(EntityPlayer entityplayer) { + if (this.isFriendlyAndAligned(entityplayer)) { + if (this.canTradeWith(entityplayer)) { + return "isengard/trader/friendly"; + } + return "isengard/trader/neutral"; + } + return "isengard/orc/hostile"; + } } diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/IsengardOrcButcher.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/IsengardOrcButcher.java index 455fd5e..90d9ff9 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/IsengardOrcButcher.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/IsengardOrcButcher.java @@ -50,11 +50,6 @@ public class IsengardOrcButcher extends LOTREntityIsengardSnaga implements LOTRT return (LOTRLevelData.getData(entityplayer).getAlignment(getFaction()) >= 100.0F && isFriendlyAndAligned(entityplayer)); } - @Override - public void onPlayerTrade(EntityPlayer entityPlayer, TradeType tradeType, ItemStack itemStack) { - LOTRLevelData.getData(entityPlayer).addAchievement(LOTRAchievement.tradeUrukTrader); - } - static { URUK_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY, @@ -110,6 +105,13 @@ public class IsengardOrcButcher extends LOTREntityIsengardSnaga implements LOTRT } return "isengard/orc/hostile"; } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeUrukTrader); + } + + @Override public ItemStack getPickedResult(MovingObjectPosition target) { return null; diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/IsengardOrcSmith.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/IsengardOrcSmith.java index 0c073fb..61dfe9f 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/IsengardOrcSmith.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/IsengardOrcSmith.java @@ -1,13 +1,11 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; +import lotr.common.LOTRAchievement; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; -import lotr.common.entity.npc.LOTREntityUrukHaiTrader; -import lotr.common.entity.npc.LOTRTradeEntries; +import lotr.common.entity.npc.*; import lotr.common.entity.npc.LOTRTradeEntries.TradeType; -import lotr.common.entity.npc.LOTRTradeEntry; -import lotr.common.entity.npc.LOTRTradeable; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.player.EntityPlayer; @@ -16,20 +14,20 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class IsengardOrcSmith extends LOTREntityUrukHaiTrader implements LOTRTradeable.Smith { - public static LOTRTradeEntries ANGMAR_BUTCHER_BUY; - public static LOTRTradeEntries ANGMAR_BUTCHER_SELL; +public class IsengardOrcSmith extends LOTREntityUrukHai implements LOTRTradeable.Smith { + public static LOTRTradeEntries URUK_SMITH_BUY; + public static LOTRTradeEntries URUK_SMITH_SELL; public IsengardOrcSmith(World world) { super(world); } public LOTRTradeEntries getBuyPool() { - return ANGMAR_BUTCHER_BUY; + return URUK_SMITH_BUY; } public LOTRTradeEntries getSellPool() { - return ANGMAR_BUTCHER_SELL; + return URUK_SMITH_SELL; } public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) { @@ -53,7 +51,7 @@ public class IsengardOrcSmith extends LOTREntityUrukHaiTrader implements LOTRTra static { - ANGMAR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY, + URUK_SMITH_BUY = new LOTRTradeEntries(TradeType.BUY, new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200), new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200), new LOTRTradeEntry(new ItemStack(LOTRMod.blacksmithHammer), 20), @@ -77,7 +75,7 @@ public class IsengardOrcSmith extends LOTREntityUrukHaiTrader implements LOTRTra new LOTRTradeEntry(new ItemStack(LOTRMod.axeUruk), 16), new LOTRTradeEntry(new ItemStack(LOTRMod.wargArmorUruk), 25)); - ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL, + URUK_SMITH_SELL = new LOTRTradeEntries(TradeType.SELL, new LOTRTradeEntry(new ItemStack(LOTRMod.bronze), 3), new LOTRTradeEntry(new ItemStack(Items.iron_ingot), 3), new LOTRTradeEntry(new ItemStack(Items.leather), 2), @@ -89,9 +87,24 @@ public class IsengardOrcSmith extends LOTREntityUrukHaiTrader implements LOTRTra new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17), new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3)); } - @Override public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeUrukTrader); + } + + @Override + public String getSpeechBank(EntityPlayer entityplayer) { + if (this.isFriendlyAndAligned(entityplayer)) { + if (this.canTradeWith(entityplayer)) { + return "isengard/trader/friendly"; + } + return "isengard/trader/neutral"; + } + return "isengard/orc/hostile"; + } } diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/MordorOrcBrewer.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/MordorOrcBrewer.java index 62534c8..0a25a4b 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/MordorOrcBrewer.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/MordorOrcBrewer.java @@ -2,23 +2,22 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; import com.zivilon.cinder_loe.mixins.MixinLOTRTradeEntries; +import lotr.common.LOTRAchievement; import lotr.common.LOTRFoods; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; -import lotr.common.entity.npc.LOTRTradeEntries; +import lotr.common.entity.npc.*; import lotr.common.entity.npc.LOTRTradeEntries.TradeType; -import lotr.common.entity.npc.LOTRTradeEntry; -import lotr.common.entity.npc.LOTRTradeEntryBarrel; -import lotr.common.entity.npc.LOTRTradeable; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class MordorOrcBrewer extends MordorOrcButcher implements LOTRTradeable { - public static LOTRTradeEntries ANGMAR_BUTCHER_BUY; - public static LOTRTradeEntries ANGMAR_BUTCHER_SELL; +public class MordorOrcBrewer extends LOTREntityMordorOrc implements LOTRTradeable { + public static LOTRTradeEntries MORDOR_BREWER_BUY; + public static LOTRTradeEntries MORDOR_BREWER_SELL; public MordorOrcBrewer(World world) { super(world); @@ -26,11 +25,11 @@ public class MordorOrcBrewer extends MordorOrcButcher implements LOTRTradeable { public LOTRTradeEntries getBuyPool() { - return ANGMAR_BUTCHER_BUY; + return MORDOR_BREWER_BUY; } public LOTRTradeEntries getSellPool() { - return ANGMAR_BUTCHER_SELL; + return MORDOR_BREWER_SELL; } public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) { @@ -53,7 +52,7 @@ public class MordorOrcBrewer extends MordorOrcButcher implements LOTRTradeable { } static { - ANGMAR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY, + MORDOR_BREWER_BUY = new LOTRTradeEntries(TradeType.BUY, new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8), @@ -64,9 +63,9 @@ public class MordorOrcBrewer extends MordorOrcButcher implements LOTRTradeable { new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugMorgulDraught, 1, 3), 150), new LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 200), new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 2), 6666)); - ((MixinLOTRTradeEntries)ANGMAR_BUTCHER_BUY).vessels(LOTRFoods.ORC_DRINK); + ((MixinLOTRTradeEntries)MORDOR_BREWER_BUY).vessels(LOTRFoods.ORC_DRINK); - ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL, + MORDOR_BREWER_SELL = new LOTRTradeEntries(TradeType.SELL, new LOTRTradeEntry(new ItemStack(LOTRMod.mug), 1), new LOTRTradeEntry(new ItemStack(LOTRMod.waterskin), 2), new LOTRTradeEntry(new ItemStack(LOTRMod.barrel), 10), @@ -78,5 +77,24 @@ public class MordorOrcBrewer extends MordorOrcButcher implements LOTRTradeable { new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17), new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3)); } + @Override + public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { + } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeOrcTrader); + } + + @Override + public String getSpeechBank(EntityPlayer entityplayer) { + if (this.isFriendlyAndAligned(entityplayer)) { + if (this.canTradeWith(entityplayer)) { + return "mordor/trader/friendly"; + } + return "mordor/trader/neutral"; + } + return "mordor/orc/hostile"; + } } diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/MordorOrcButcher.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/MordorOrcButcher.java index 80184d6..ba6f51e 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/MordorOrcButcher.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/MordorOrcButcher.java @@ -1,6 +1,7 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; +import lotr.common.LOTRAchievement; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; import lotr.common.entity.npc.*; @@ -13,7 +14,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class MordorOrcButcher extends LOTREntityMordorOrcTrader implements LOTRTradeable { +public class MordorOrcButcher extends LOTREntityMordorOrc implements LOTRTradeable { public static LOTRTradeEntries MORDOR_BUTCHER_BUY; public static LOTRTradeEntries MORDOR_BUTCHER_SELL; @@ -90,6 +91,12 @@ public class MordorOrcButcher extends LOTREntityMordorOrcTrader implements LOTRT @Override public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { + + } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeOrcTrader); } @Override diff --git a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/MordorOrcSmith.java b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/MordorOrcSmith.java index ef67d2d..bc5cc71 100644 --- a/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/MordorOrcSmith.java +++ b/src/main/java/com/zivilon/cinder_loe/entity/npc/orc/trader/MordorOrcSmith.java @@ -2,13 +2,16 @@ package com.zivilon.cinder_loe.entity.npc.orc.trader; import com.zivilon.cinder_loe.CinderLoE; import com.zivilon.cinder_loe.mixins.overrides.MixinLOTRTradeEntriesOverrides; +import lotr.common.LOTRAchievement; import lotr.common.LOTRFoods; import lotr.common.LOTRLevelData; import lotr.common.LOTRMod; +import lotr.common.entity.npc.LOTREntityBlackUruk; import lotr.common.entity.npc.LOTRTradeEntries; import lotr.common.entity.npc.LOTRTradeEntries.TradeType; import lotr.common.entity.npc.LOTRTradeEntry; import lotr.common.entity.npc.LOTRTradeable; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IEntityLivingData; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -16,20 +19,21 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public class MordorOrcSmith extends MordorOrcButcher implements LOTRTradeable.Smith { - public static LOTRTradeEntries ANGMAR_BUTCHER_BUY; - public static LOTRTradeEntries ANGMAR_BUTCHER_SELL; +public class MordorOrcSmith extends LOTREntityBlackUruk implements LOTRTradeable.Smith { + public static LOTRTradeEntries MORDOR_SMITH_BUY; + public static LOTRTradeEntries MORDOR_SMITH_SELL; public MordorOrcSmith(World world) { super(world); + this.npcShield = null; } public LOTRTradeEntries getBuyPool() { - return ANGMAR_BUTCHER_BUY; + return MORDOR_SMITH_BUY; } public LOTRTradeEntries getSellPool() { - return ANGMAR_BUTCHER_SELL; + return MORDOR_SMITH_SELL; } public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) { @@ -38,8 +42,8 @@ public class MordorOrcSmith extends MordorOrcButcher implements LOTRTradeable.Sm this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon()); this.setCurrentItemOrArmor(1, new ItemStack(LOTRMod.bootsFur)); this.setCurrentItemOrArmor(2, new ItemStack(LOTRMod.legsFur)); - this.setCurrentItemOrArmor(3, new ItemStack(LOTRMod.bodyBone)); - this.setCurrentItemOrArmor(4, new ItemStack(LOTRMod.helmetAngmar)); + this.setCurrentItemOrArmor(3, new ItemStack(LOTRMod.bodyFur)); + this.setCurrentItemOrArmor(4, new ItemStack(LOTRMod.helmetBone)); return data; } @@ -53,7 +57,7 @@ public class MordorOrcSmith extends MordorOrcButcher implements LOTRTradeable.Sm static { - ANGMAR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY, + MORDOR_SMITH_BUY = new LOTRTradeEntries(TradeType.BUY, new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught), 24), new LOTRTradeEntry(new ItemStack(LOTRMod.bodyBlackUruk), 36), new LOTRTradeEntry(new ItemStack(LOTRMod.legsBlackUruk), 30), @@ -85,7 +89,7 @@ public class MordorOrcSmith extends MordorOrcButcher implements LOTRTradeable.Sm new LOTRTradeEntry(new ItemStack(LOTRMod.wargArmorMordor), 25), new LOTRTradeEntry(new ItemStack(Items.arrow, 4), 3)); - ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL, + MORDOR_SMITH_SELL = new LOTRTradeEntries(TradeType.SELL, new LOTRTradeEntry(new ItemStack(LOTRMod.orcSteel), 3), new LOTRTradeEntry(new ItemStack(Items.string, 3), 1), new LOTRTradeEntry(new ItemStack(LOTRMod.blackUrukSteel), 4), @@ -100,5 +104,24 @@ public class MordorOrcSmith extends MordorOrcButcher implements LOTRTradeable.Sm new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17), new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3)); } + @Override + public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) { + } + + @Override + public void onPlayerTrade(EntityPlayer entityplayer, LOTRTradeEntries.TradeType type, ItemStack itemstack) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.tradeOrcTrader); + } + + @Override + public String getSpeechBank(EntityPlayer entityplayer) { + if (this.isFriendlyAndAligned(entityplayer)) { + if (this.canTradeWith(entityplayer)) { + return "mordor/trader/friendly"; + } + return "mordor/trader/neutral"; + } + return "mordor/orc/hostile"; + } } 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 0409601..d22106e 100644 --- a/src/main/java/com/zivilon/cinder_loe/mixins/MixinLOTRArmorModels.java +++ b/src/main/java/com/zivilon/cinder_loe/mixins/MixinLOTRArmorModels.java @@ -103,6 +103,8 @@ public class MixinLOTRArmorModels { map.put(CinderLoE.legsJade, new ModelLegsJade(1.0f)); map.put(CinderLoE.helmetJade, new ModelJadeHelmet(1.0f)); map.put(CinderLoE.helmetGildedGalvorn, new ModelGalvornHelmet(1.0f)); + map.put(CinderLoE.helmetEsgaroth, new ModelEsgarothHelmet(1.0f)); + map.put(CinderLoE.helmetDorLomin, new ModelDragonHelm(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/mixins/MixinLOTRContainerAnvil.java b/src/main/java/com/zivilon/cinder_loe/mixins/MixinLOTRContainerAnvil.java index 7f96f88..74d75a4 100644 --- a/src/main/java/com/zivilon/cinder_loe/mixins/MixinLOTRContainerAnvil.java +++ b/src/main/java/com/zivilon/cinder_loe/mixins/MixinLOTRContainerAnvil.java @@ -128,6 +128,8 @@ public abstract class MixinLOTRContainerAnvil { return (materialItem.getItem() == Items.iron_ingot); if (material == CinderLoE.MATERIAL_WARLORD.toToolMaterial()) return (materialItem.getItem() == LOTRMod.bronze); + if (material == CinderLoE.MATERIAL_ESGAROTH.toToolMaterial()) + return (materialItem.getItem() == Items.iron_ingot); if (item instanceof ItemArmor armor) { ItemArmor.ArmorMaterial armorMaterial = armor.getArmorMaterial(); if (armorMaterial == LOTRMaterial.BONE.toArmorMaterial()) @@ -154,6 +156,9 @@ public abstract class MixinLOTRContainerAnvil { return (materialItem.getItem() == Items.iron_ingot); if (armorMaterial == CinderLoE.MATERIAL_GILDEDGALVORN.toArmorMaterial()) return (materialItem.getItem() == LOTRMod.galvorn); + if (armorMaterial == CinderLoE.MATERIAL_ESGAROTH.toArmorMaterial()) + return (materialItem.getItem() == Items.iron_ingot); + } return false; diff --git a/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenAngmarCamp.java b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenAngmarCamp.java new file mode 100644 index 0000000..d8499e2 --- /dev/null +++ b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenAngmarCamp.java @@ -0,0 +1,34 @@ +package com.zivilon.cinder_loe.mixins.structures; + +import com.zivilon.cinder_loe.entity.npc.orc.trader.AngmarOrcBrewer; +import com.zivilon.cinder_loe.entity.npc.orc.trader.AngmarOrcButcher; +import com.zivilon.cinder_loe.entity.npc.orc.trader.AngmarOrcSmith; +import lotr.common.entity.npc.LOTREntityAngmarOrcTrader; +import lotr.common.entity.npc.LOTREntityNPC; +import lotr.common.world.structure2.LOTRWorldGenAngmarCamp; +import net.minecraft.world.World; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; + +import java.util.Random; + +@Mixin(LOTRWorldGenAngmarCamp.class) +public class MixinLOTRWorldGenAngmarCamp { + + @Overwrite(remap = false) + protected LOTREntityNPC getCampCaptain(World world, Random random) { + int pick = random.nextInt(5); + switch (pick) { + case 1: + return new AngmarOrcBrewer(world); + case 2: + return new AngmarOrcButcher(world); + case 3: + return new AngmarOrcSmith(world); + case 4: + return new LOTREntityAngmarOrcTrader(world); + default: + return null; + } + } +} diff --git a/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenDolGuldurCamp.java b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenDolGuldurCamp.java new file mode 100644 index 0000000..0f2282d --- /dev/null +++ b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenDolGuldurCamp.java @@ -0,0 +1,32 @@ +package com.zivilon.cinder_loe.mixins.structures; + +import com.zivilon.cinder_loe.entity.npc.orc.trader.*; +import lotr.common.entity.npc.LOTREntityDolGuldurOrcTrader; +import lotr.common.entity.npc.LOTREntityNPC; +import lotr.common.world.structure2.LOTRWorldGenDolGuldurCamp; +import net.minecraft.world.World; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; + +import java.util.Random; + +@Mixin(LOTRWorldGenDolGuldurCamp.class) +public class MixinLOTRWorldGenDolGuldurCamp { + + @Overwrite(remap = false) + protected LOTREntityNPC getCampCaptain(World world, Random random) { + int pick = random.nextInt(5); + switch (pick) { + case 1: + return new DolGuldurOrcBrewer(world); + case 2: + return new DolGuldurOrcButcher(world); + case 3: + return new DolGuldurOrcSmith(world); + case 4: + return new LOTREntityDolGuldurOrcTrader(world); + default: + return null; + } + } +} diff --git a/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenGundabadCamp.java b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenGundabadCamp.java new file mode 100644 index 0000000..7ff34d5 --- /dev/null +++ b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenGundabadCamp.java @@ -0,0 +1,35 @@ +package com.zivilon.cinder_loe.mixins.structures; + +import com.zivilon.cinder_loe.entity.npc.orc.trader.*; +import lotr.common.entity.npc.LOTREntityDolGuldurOrcTrader; +import lotr.common.entity.npc.LOTREntityGundabadOrcMercenaryCaptain; +import lotr.common.entity.npc.LOTREntityGundabadOrcTrader; +import lotr.common.entity.npc.LOTREntityNPC; +import lotr.common.world.structure2.LOTRWorldGenDolGuldurCamp; +import lotr.common.world.structure2.LOTRWorldGenGundabadCamp; +import net.minecraft.world.World; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; + +import java.util.Random; + +@Mixin(LOTRWorldGenGundabadCamp.class) +public class MixinLOTRWorldGenGundabadCamp { + + @Overwrite(remap = false) + protected LOTREntityNPC getCampCaptain(World world, Random random) { + int pick = random.nextInt(5); + switch (pick) { + case 1: + return new GundabadOrcBrewer(world); + case 2: + return new GundabadOrcButcher(world); + case 3: + return new GundabadOrcSmith(world); + case 4: + return new LOTREntityGundabadOrcTrader(world); + default: + return new LOTREntityGundabadOrcMercenaryCaptain(world); + } + } +} diff --git a/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenHalfTrollHouse.java b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenHalfTrollHouse.java new file mode 100644 index 0000000..ab5e70e --- /dev/null +++ b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenHalfTrollHouse.java @@ -0,0 +1,149 @@ +package com.zivilon.cinder_loe.mixins.structures; + +import com.google.common.math.IntMath; +import com.zivilon.cinder_loe.entity.npc.orc.trader.HalfTrollBrewer; +import com.zivilon.cinder_loe.entity.npc.orc.trader.HalfTrollButcher; +import lotr.common.LOTRMod; +import lotr.common.entity.npc.LOTREntityHalfTroll; +import lotr.common.world.structure.LOTRChestContents; +import lotr.common.world.structure2.LOTRWorldGenStructureBase2; +import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import org.spongepowered.asm.mixin.Mixin; +import lotr.common.world.structure2.LOTRWorldGenHalfTrollHouse; +import org.spongepowered.asm.mixin.Overwrite; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.ModifyVariable; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +import org.spongepowered.asm.mixin.injection.callback.LocalCapture; + +import java.util.Random; + +@Mixin(LOTRWorldGenHalfTrollHouse.class) +public abstract class MixinLOTRWorldGenHalfTrollHouse extends LOTRWorldGenStructureBase2 { + public MixinLOTRWorldGenHalfTrollHouse(boolean flag) { + super(flag); + } + + /** + * @author KeyLime + Mevans + * @reason Adding 2 other traders with a 1/5 chance of spawning inside a regular half troll house + */ + @Overwrite(remap = false) + public boolean generateWithSetRotation(World world, Random random, int i, int j, int k, int rotation) { + int j1; + int k1; + int i1; + int radius = 5; + int height = 6 + random.nextInt(4); + this.setOriginAndRotation(world, i, j, k, rotation, radius + 1); + if (this.restrictions) { + for (i1 = -radius; i1 <= radius; ++i1) { + for (k1 = -radius; k1 <= radius; ++k1) { + j1 = this.getTopBlock(world, i1, k1); + Block block = this.getBlock(world, i1, j1 - 1, k1); + if (block == Blocks.grass) continue; + return false; + } + } + } + for (i1 = -radius; i1 <= radius; ++i1) { + for (k1 = -radius; k1 <= radius; ++k1) { + for (j1 = 0; j1 <= height; ++j1) { + double f = (double)(i1 * i1 + k1 * k1) / 2.0 - (double)(8 - j1); + if (!(f < 8.0)) continue; + if (j1 == 0) { + for (int j2 = 0; !(j2 != 0 && this.isOpaque(world, i1, j2, k1) || this.getY(j2) < 0); --j2) { + this.setBlockAndMetadata(world, i1, j2, k1, Blocks.hardened_clay, 0); + this.setGrassToDirt(world, i1, j2 - 1, k1); + } + } + if (f > 0.0) { + if (j1 <= 1 || j1 == height - 1) { + this.setBlockAndMetadata(world, i1, j1, k1, Blocks.stained_hardened_clay, 12); + continue; + } + this.setBlockAndMetadata(world, i1, j1, k1, Blocks.hardened_clay, 0); + continue; + } + if (j1 == 0) { + this.setBlockAndMetadata(world, i1, j1, k1, Blocks.cobblestone, 0); + continue; + } + this.setAir(world, i1, j1, k1); + } + } + } + for (i1 = -1; i1 <= 1; ++i1) { + for (k1 = -radius; k1 <= -radius + 1; ++k1) { + this.setBlockAndMetadata(world, i1, 0, k1, Blocks.cobblestone, 0); + for (j1 = 1; j1 <= 3; ++j1) { + this.setAir(world, i1, j1, k1); + } + } + this.setBlockAndMetadata(world, i1, 4, -radius, LOTRMod.woodSlabSingle, 3); + } + this.setBlockAndMetadata(world, -2, 2, -radius, LOTRMod.fence, 3); + this.setBlockAndMetadata(world, -2, 3, -radius, LOTRMod.woodSlabSingle, 3); + this.setBlockAndMetadata(world, 2, 2, -radius, LOTRMod.fence, 3); + this.setBlockAndMetadata(world, 2, 3, -radius, LOTRMod.woodSlabSingle, 3); + for (i1 = -2; i1 <= 2; ++i1) { + for (k1 = -2; k1 <= 2; ++k1) { + int i2 = Math.abs(i1); + int k2 = Math.abs(k1); + if (i2 == 2 || k2 == 2 || i2 == 0 && k2 == 0) { + for (int j12 = -4; j12 <= 0; ++j12) { + this.setBlockAndMetadata(world, i1, j12, k1, Blocks.stained_hardened_clay, 12); + } + continue; + } + if (i2 != 1 && k2 != 1) continue; + this.setBlockAndMetadata(world, i1, -4, k1, LOTRMod.hearth, 0); + this.setBlockAndMetadata(world, i1, -3, k1, (Block)Blocks.fire, 0); + this.setBlockAndMetadata(world, i1, -2, k1, Blocks.air, 0); + this.setBlockAndMetadata(world, i1, -1, k1, Blocks.air, 0); + this.setBlockAndMetadata(world, i1, 0, k1, Blocks.iron_bars, 0); + } + } + this.setBlockAndMetadata(world, 0, 0, 0, Blocks.cobblestone, 0); + for (int l = 0; l < 8; ++l) { + int i12 = (2 + (l + 1) / 2 % 2) * IntMath.pow((int)-1, (int)(l / 4)); + int k12 = (2 + (l + 3) / 2 % 2) * IntMath.pow((int)-1, (int)((l + 2) / 4)); + this.setBlockAndMetadata(world, i12, 1, k12, Blocks.cobblestone, 0); + this.setBlockAndMetadata(world, i12, 2, k12, LOTRMod.fence, 3); + this.setBlockAndMetadata(world, i12, 3, k12, LOTRMod.fence, 3); + } + this.setBlockAndMetadata(world, -4, 3, 0, LOTRMod.fence, 3); + this.setAir(world, -5, 3, 0); + this.setBlockAndMetadata(world, 4, 3, 0, LOTRMod.fence, 3); + this.setAir(world, 5, 3, 0); + this.setBlockAndMetadata(world, 0, 3, 4, LOTRMod.fence, 3); + this.setAir(world, 0, 3, 5); + for (i1 = -3; i1 <= 3; i1 += 6) { + this.setBlockAndMetadata(world, i1, 1, -1, (Block)Blocks.stone_slab, 11); + this.setBlockAndMetadata(world, i1, 1, 1, (Block)Blocks.stone_slab, 11); + this.placeChest(world, random, i1, 1, 0, LOTRMod.chestBasket, 0, LOTRChestContents.HALF_TROLL_HOUSE); + } + this.setBlockAndMetadata(world, -1, 1, 3, Blocks.crafting_table, 0); + this.setBlockAndMetadata(world, 0, 1, 3, (Block)Blocks.stone_slab, 11); + this.setBlockAndMetadata(world, 1, 1, 3, LOTRMod.halfTrollTable, 0); + + // choose random HalfTroll variant + LOTREntityHalfTroll halfTroll; + int pick = random.nextInt(5); + if (pick < 3) { + halfTroll = new LOTREntityHalfTroll(world); + } else if (pick == 3) { + halfTroll = new HalfTrollBrewer(world); + } else { + halfTroll = new HalfTrollButcher(world); + } + + // spawn with home + this.spawnNPCAndSetHome(halfTroll, world, 0, 1, 0, 16); + return true; + } +} + diff --git a/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenIsengardCamp.java b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenIsengardCamp.java new file mode 100644 index 0000000..0809c95 --- /dev/null +++ b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenIsengardCamp.java @@ -0,0 +1,35 @@ +package com.zivilon.cinder_loe.mixins.structures; + +import com.zivilon.cinder_loe.entity.npc.orc.trader.*; +import lotr.common.entity.npc.LOTREntityAngmarOrcTrader; +import lotr.common.entity.npc.LOTREntityNPC; +import lotr.common.entity.npc.LOTREntityUrukHaiMercenaryCaptain; +import lotr.common.entity.npc.LOTREntityUrukHaiTrader; +import lotr.common.world.structure2.LOTRWorldGenAngmarCamp; +import lotr.common.world.structure2.LOTRWorldGenUrukCamp; +import net.minecraft.world.World; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; + +import java.util.Random; + +@Mixin(LOTRWorldGenUrukCamp.class) +public class MixinLOTRWorldGenIsengardCamp { + + @Overwrite(remap = false) + protected LOTREntityNPC getCampCaptain(World world, Random random) { + int pick = random.nextInt(5); + switch (pick) { + case 1: + return new IsengardOrcBrewer(world); + case 2: + return new IsengardOrcButcher(world); + case 3: + return new IsengardOrcSmith(world); + case 4: + return new LOTREntityUrukHaiTrader(world); + default: + return new LOTREntityUrukHaiMercenaryCaptain(world); + } + } +} diff --git a/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenMordorCamp.java b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenMordorCamp.java new file mode 100644 index 0000000..628fa6b --- /dev/null +++ b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenMordorCamp.java @@ -0,0 +1,34 @@ +package com.zivilon.cinder_loe.mixins.structures; + +import com.zivilon.cinder_loe.entity.npc.orc.trader.*; +import lotr.common.entity.npc.LOTREntityDolGuldurOrcTrader; +import lotr.common.entity.npc.LOTREntityMordorOrcTrader; +import lotr.common.entity.npc.LOTREntityNPC; +import lotr.common.world.structure2.LOTRWorldGenDolGuldurCamp; +import lotr.common.world.structure2.LOTRWorldGenMordorCamp; +import net.minecraft.world.World; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; + +import java.util.Random; + +@Mixin(LOTRWorldGenMordorCamp.class) +public class MixinLOTRWorldGenMordorCamp { + + @Overwrite(remap = false) + protected LOTREntityNPC getCampCaptain(World world, Random random) { + int pick = random.nextInt(5); + switch (pick) { + case 1: + return new MordorOrcBrewer(world); + case 2: + return new MordorOrcButcher(world); + case 3: + return new MordorOrcSmith(world); + case 4: + return new LOTREntityMordorOrcTrader(world); + default: + return null; + } + } +} diff --git a/src/main/java/com/zivilon/cinder_loe/mixins/MixinLOTRWorldGenMumakSkeleton.java b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenMumakSkeleton.java similarity index 94% rename from src/main/java/com/zivilon/cinder_loe/mixins/MixinLOTRWorldGenMumakSkeleton.java rename to src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenMumakSkeleton.java index 89e5633..02b5d77 100644 --- a/src/main/java/com/zivilon/cinder_loe/mixins/MixinLOTRWorldGenMumakSkeleton.java +++ b/src/main/java/com/zivilon/cinder_loe/mixins/structures/MixinLOTRWorldGenMumakSkeleton.java @@ -1,4 +1,4 @@ -package com.zivilon.cinder_loe.mixins; +package com.zivilon.cinder_loe.mixins.structures; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; diff --git a/src/main/resources/assets/lotr/armor/artifact_dorlomin.png b/src/main/resources/assets/lotr/armor/artifact_dorlomin.png new file mode 100644 index 0000000..c9b82f5 Binary files /dev/null and b/src/main/resources/assets/lotr/armor/artifact_dorlomin.png differ diff --git a/src/main/resources/assets/lotr/armor/artifact_isildur.png b/src/main/resources/assets/lotr/armor/artifact_isildur.png new file mode 100644 index 0000000..eadfd90 Binary files /dev/null and b/src/main/resources/assets/lotr/armor/artifact_isildur.png differ diff --git a/src/main/resources/assets/lotr/armor/esgaroth_1.png b/src/main/resources/assets/lotr/armor/esgaroth_1.png new file mode 100644 index 0000000..e65ebe0 Binary files /dev/null and b/src/main/resources/assets/lotr/armor/esgaroth_1.png differ diff --git a/src/main/resources/assets/lotr/armor/esgaroth_2.png b/src/main/resources/assets/lotr/armor/esgaroth_2.png new file mode 100644 index 0000000..b5f796a Binary files /dev/null and b/src/main/resources/assets/lotr/armor/esgaroth_2.png differ diff --git a/src/main/resources/assets/lotr/armor/esgaroth_helmet.png b/src/main/resources/assets/lotr/armor/esgaroth_helmet.png new file mode 100644 index 0000000..32679ec Binary files /dev/null and b/src/main/resources/assets/lotr/armor/esgaroth_helmet.png differ diff --git a/src/main/resources/assets/lotr/textures/items/bodyEsgaroth.png b/src/main/resources/assets/lotr/textures/items/bodyEsgaroth.png new file mode 100644 index 0000000..6fdfe6d Binary files /dev/null and b/src/main/resources/assets/lotr/textures/items/bodyEsgaroth.png differ diff --git a/src/main/resources/assets/lotr/textures/items/bootsEsgaroth.png b/src/main/resources/assets/lotr/textures/items/bootsEsgaroth.png new file mode 100644 index 0000000..038fe11 Binary files /dev/null and b/src/main/resources/assets/lotr/textures/items/bootsEsgaroth.png differ diff --git a/src/main/resources/assets/lotr/textures/items/helmetEsgaroth.png b/src/main/resources/assets/lotr/textures/items/helmetEsgaroth.png new file mode 100644 index 0000000..1158470 Binary files /dev/null and b/src/main/resources/assets/lotr/textures/items/helmetEsgaroth.png differ diff --git a/src/main/resources/assets/lotr/textures/items/legsEsgaroth.png b/src/main/resources/assets/lotr/textures/items/legsEsgaroth.png new file mode 100644 index 0000000..dc5286f Binary files /dev/null and b/src/main/resources/assets/lotr/textures/items/legsEsgaroth.png differ diff --git a/src/main/resources/mixins.cinder_loe.json b/src/main/resources/mixins.cinder_loe.json index 6f4c2cd..1f8e142 100644 --- a/src/main/resources/mixins.cinder_loe.json +++ b/src/main/resources/mixins.cinder_loe.json @@ -36,7 +36,13 @@ "MixinLOTRTileEntityDwarvenForge", "MixinLOTRTileEntityForgeBase", "MixinLOTRTradeEntries", - "MixinLOTRWorldGenMumakSkeleton", + "structures.MixinLOTRWorldGenMumakSkeleton", + "structures.MixinLOTRWorldGenHalfTrollHouse", + "structures.MixinLOTRWorldGenDolGuldurCamp", + "structures.MixinLOTRWorldGenGundabadCamp", + "structures.MixinLOTRWorldGenAngmarCamp", + "structures.MixinLOTRWorldGenMordorCamp", + "structures.MixinLOTRWorldGenIsengardCamp", "MixinRendererLivingEntity", "MixinRenderItem", "MixinSlotCrafting",