2
0
Fork 0

Added Gilded Galvorn armor set, and fixed model file

main
KeyLime17 6 months ago
parent 2ff8836ed3
commit a170a43026

@ -121,6 +121,7 @@ public class CinderLoE {
public static LOTRMaterial MATERIAL_USURPER; public static LOTRMaterial MATERIAL_USURPER;
public static LOTRMaterial MATERIAL_WARLORD; public static LOTRMaterial MATERIAL_WARLORD;
public static LOTRMaterial MATERIAL_JADE; public static LOTRMaterial MATERIAL_JADE;
public static LOTRMaterial MATERIAL_GILDEDGALVORN;
// Blocks // Blocks
// public static Block barricade; // public static Block barricade;
@ -235,6 +236,10 @@ public class CinderLoE {
public static Item legsWarlord; public static Item legsWarlord;
public static Item bootsWarlord; public static Item bootsWarlord;
public static Item maceWarlord; public static Item maceWarlord;
public static Item helmetGildedGalvorn;
public static Item bodyGildedGalvorn;
public static Item legsGildedGalvorn;
public static Item bootsGildedGalvorn;
// public static Item bowserpent; // public static Item bowserpent;
//public static Item swordUsurper; //public static Item swordUsurper;
@ -374,7 +379,7 @@ public class CinderLoE {
// event.registerServerCommand(new CommandMobileSound()); // event.registerServerCommand(new CommandMobileSound());
} }
public void registerEntities() { // Last ID added: 64 public void registerEntities() { // Last ID added: 65
///GameRegistry.registerTileEntity(TileEntityMistBlock.class, "TileEntityMistBlock"); ///GameRegistry.registerTileEntity(TileEntityMistBlock.class, "TileEntityMistBlock");
///.registerBlock(TileEntityRustedSword, "TileEntityRustedSword"); ///.registerBlock(TileEntityRustedSword, "TileEntityRustedSword");
@ -414,6 +419,7 @@ public class CinderLoE {
EntityRegistry.registerModEntity(UtumnoSlaveTrader.class, "UtumnoSlaveTrader", (entityID + 30), this, 64, 1, true); EntityRegistry.registerModEntity(UtumnoSlaveTrader.class, "UtumnoSlaveTrader", (entityID + 30), this, 64, 1, true);
EntityRegistry.registerModEntity(Monkey.class, "Monkey", (entityID + 62), this, 64, 1, true); EntityRegistry.registerModEntity(Monkey.class, "Monkey", (entityID + 62), this, 64, 1, true);
EntityRegistry.registerModEntity(CryptBoss.class, "CryptBoss", (entityID + 63), this, 64, 1, true); EntityRegistry.registerModEntity(CryptBoss.class, "CryptBoss", (entityID + 63), this, 64, 1, true);
EntityRegistry.registerModEntity(EntityMorgulBlast.class, "EntityMorgulBlast", (entityID + 65), this, 64, 1, true);
@ -742,11 +748,13 @@ public class CinderLoE {
warDartHeads = (new WarDartHeads()).setUnlocalizedName("war_dart_heads").setTextureName("lotr:war_dart_heads_0"); warDartHeads = (new WarDartHeads()).setUnlocalizedName("war_dart_heads").setTextureName("lotr:war_dart_heads_0");
ItemRegistration.register(cleaver,"cleaver",6109); ItemRegistration.register(cleaver,"cleaver",6109);
linkLOTRWeapon(cleaver, "cleaver");
ItemRegistration.register(warDart,"warDart",6111); ItemRegistration.register(warDart,"warDart",6111);
ItemRegistration.register(warDartHeads,"warDartHeads",6500); ItemRegistration.register(warDartHeads,"warDartHeads",6500);
//Override Galvorn Helmet with new model texture
LOTRMod.helmetGalvorn = new LOTRItemArmor(LOTRMaterial.GALVORN, 0, "helmet").setUnlocalizedName("lotr:helmetGalvorn");
//ASH //ASH
MATERIAL_ASH = getLOTRMaterialByName("ASH"); MATERIAL_ASH = getLOTRMaterialByName("ASH");
@ -906,7 +914,7 @@ public class CinderLoE {
linkLOTRWeapon(swordBree, "swordBree"); linkLOTRWeapon(swordBree, "swordBree");
//Elite Armors //Elite Armors
//Elite Armors
MATERIAL_SERPENT = getLOTRMaterialByName("SERPENT"); MATERIAL_SERPENT = getLOTRMaterialByName("SERPENT");
if (MATERIAL_SERPENT != null) { if (MATERIAL_SERPENT != null) {
helmetserpent = (new LOTRItemArmor(MATERIAL_SERPENT, 0)).setUnlocalizedName("lotr:helmetserpent").setTextureName("lotr:helmetserpent").setCreativeTab(null); helmetserpent = (new LOTRItemArmor(MATERIAL_SERPENT, 0)).setUnlocalizedName("lotr:helmetserpent").setTextureName("lotr:helmetserpent").setCreativeTab(null);
@ -955,6 +963,22 @@ public class CinderLoE {
} }
linkLOTRWeapon(maceWarlord, "maceWarlord"); linkLOTRWeapon(maceWarlord, "maceWarlord");
MATERIAL_GILDEDGALVORN = getLOTRMaterialByName("GILDEDGALVORN");
if (MATERIAL_GILDEDGALVORN != null) {
helmetGildedGalvorn = (new LOTRItemArmor(MATERIAL_GILDEDGALVORN, 0, "helmet")).setUnlocalizedName("lotr:helmetGildedGalvorn").setTextureName("lotr:helmetGildedGalvorn").setCreativeTab(null);
bodyGildedGalvorn = (new LOTRItemArmor(MATERIAL_GILDEDGALVORN, 1)).setUnlocalizedName("lotr:bodyGildedGalvorn").setTextureName("lotr:bodyGildedGalvorn").setCreativeTab(null);
legsGildedGalvorn = (new LOTRItemArmor(MATERIAL_GILDEDGALVORN, 2)).setUnlocalizedName("lotr:legsGildedGalvorn").setTextureName("lotr:legsGildedGalvorn").setCreativeTab(null);
bootsGildedGalvorn = (new LOTRItemArmor(MATERIAL_GILDEDGALVORN, 3)).setUnlocalizedName("lotr:bootsGildedGalvorn").setTextureName("lotr:bootsGildedGalvorn").setCreativeTab(null);
ItemRegistration.register(helmetGildedGalvorn, "helmetGildedGalvorn", 6813);
ItemRegistration.register(bodyGildedGalvorn, "bodyGildedGalvorn", 6814);
ItemRegistration.register(legsGildedGalvorn, "legsGildedGalvorn", 6815);
ItemRegistration.register(bootsGildedGalvorn, "bootsGildedGalvorn", 6816);
} else {
System.err.println("Failed to find WARLORD material for armor initialization.");
}
//Rhudaur //Rhudaur
MATERIAL_RHUDAUR = getLOTRMaterialByName("RHUDAUR"); MATERIAL_RHUDAUR = getLOTRMaterialByName("RHUDAUR");
if (MATERIAL_RHUDAUR != null) { if (MATERIAL_RHUDAUR != null) {
@ -1016,6 +1040,7 @@ public class CinderLoE {
// RenderingRegistry.registerEntityRenderingHandler(DwarfLevy.class, new LOTRRenderDwarf()); // RenderingRegistry.registerEntityRenderingHandler(DwarfLevy.class, new LOTRRenderDwarf());
RenderingRegistry.registerEntityRenderingHandler(EntityWarDart.class, new RenderWarDart()); RenderingRegistry.registerEntityRenderingHandler(EntityWarDart.class, new RenderWarDart());
RenderingRegistry.registerEntityRenderingHandler(EntityMorgulBlast.class, new RenderMorgulBlast());
RenderingRegistry.registerEntityRenderingHandler(BladorthinSmith.class, new LOTRRenderDorwinionElfVintner()); RenderingRegistry.registerEntityRenderingHandler(BladorthinSmith.class, new LOTRRenderDorwinionElfVintner());
RenderingRegistry.registerEntityRenderingHandler(DarkSpider.class, new RenderDarkSpider()); RenderingRegistry.registerEntityRenderingHandler(DarkSpider.class, new RenderDarkSpider());
RenderingRegistry.registerEntityRenderingHandler(CorruptDwarf.class, new RenderCorruptDwarf()); RenderingRegistry.registerEntityRenderingHandler(CorruptDwarf.class, new RenderCorruptDwarf());
@ -1033,6 +1058,7 @@ public class CinderLoE {
RenderingRegistry.registerEntityRenderingHandler(RenegadeCaptain.class, new RenderRenegade()); RenderingRegistry.registerEntityRenderingHandler(RenegadeCaptain.class, new RenderRenegade());
RenderingRegistry.registerEntityRenderingHandler(Wraith.class, new RenderWraith()); RenderingRegistry.registerEntityRenderingHandler(Wraith.class, new RenderWraith());
RenderingRegistry.registerEntityRenderingHandler(Monkey.class, new RenderMonkey()); RenderingRegistry.registerEntityRenderingHandler(Monkey.class, new RenderMonkey());
RenderingRegistry.registerEntityRenderingHandler(CryptBoss.class, new RenderCryptBoss());
RenderingRegistry.registerEntityRenderingHandler(RedDwarfWarrior.class, new LOTRRenderDwarf()); RenderingRegistry.registerEntityRenderingHandler(RedDwarfWarrior.class, new LOTRRenderDwarf());
RenderingRegistry.registerEntityRenderingHandler(RedDwarfArbalest.class, new LOTRRenderDwarf()); RenderingRegistry.registerEntityRenderingHandler(RedDwarfArbalest.class, new LOTRRenderDwarf());
@ -1336,6 +1362,7 @@ public class CinderLoE {
CinderCore.registerEntityFallback(Renegade.class, LOTREntityBandit.class, "cinder_loe", "1.0"); CinderCore.registerEntityFallback(Renegade.class, LOTREntityBandit.class, "cinder_loe", "1.0");
CinderCore.registerEntityFallback(RenegadeCaptain.class, LOTREntityBandit.class, "cinder_loe", "1.1"); CinderCore.registerEntityFallback(RenegadeCaptain.class, LOTREntityBandit.class, "cinder_loe", "1.1");
CinderCore.registerEntityFallback(Wraith.class, LOTREntityMarshWraith.class, "cinder_loe", "1.0"); CinderCore.registerEntityFallback(Wraith.class, LOTREntityMarshWraith.class, "cinder_loe", "1.0");
CinderCore.registerEntityFallback(CryptBoss.class, LOTREntityMarshWraith.class, "cinder_loe", "1.0");
CinderCore.registerEntityFallback(LOTREntitySauron.class, LOTREntityBarrowWight.class, "cinder_loe", "1.1"); CinderCore.registerEntityFallback(LOTREntitySauron.class, LOTREntityBarrowWight.class, "cinder_loe", "1.1");
CinderCore.registerEntityFallback(RedDwarfWarrior.class, LOTREntityDwarfWarrior.class, "cinder_loe", "1.0"); CinderCore.registerEntityFallback(RedDwarfWarrior.class, LOTREntityDwarfWarrior.class, "cinder_loe", "1.0");

@ -25,6 +25,7 @@ public class Materials {
modifyMaterial("USURPER",650, 2.0F, 0.6F, 2, 6.0F, 10, Items.iron_ingot); modifyMaterial("USURPER",650, 2.0F, 0.6F, 2, 6.0F, 10, Items.iron_ingot);
modifyMaterial("WARLORD", 650, 2.0F, 0.6F, 2, 6.0F, 10, LOTRMod.bronze); modifyMaterial("WARLORD", 650, 2.0F, 0.6F, 2, 6.0F, 10, LOTRMod.bronze);
modifyMaterial("JADE",2400, 5.0F, 0.8F, 0, 9.0F, 10, LOTRMod.emerald); modifyMaterial("JADE",2400, 5.0F, 0.8F, 0, 9.0F, 10, LOTRMod.emerald);
modifyMaterial("GILDEDGALVORN",600, 3.0F, 0.6F, 2, 7.0F, 15, LOTRMod.galvorn);
} }
public static void modifyMaterial(String fieldName, int uses, float weapon_damage, float protection, int harvest_level, float speed, int enchantability, Item crafting_item) { public static void modifyMaterial(String fieldName, int uses, float weapon_damage, float protection, int harvest_level, float speed, int enchantability, Item crafting_item) {

@ -10,7 +10,6 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class ModelGalvornHelmet extends LOTRModelBiped { public class ModelGalvornHelmet extends LOTRModelBiped {
private final ModelRenderer bipedHead;
private final ModelRenderer crest; private final ModelRenderer crest;
private final ModelRenderer shape12; private final ModelRenderer shape12;
private final ModelRenderer shape3; private final ModelRenderer shape3;
@ -20,51 +19,68 @@ public class ModelGalvornHelmet extends LOTRModelBiped {
public ModelGalvornHelmet(float f) { public ModelGalvornHelmet(float f) {
super(f); super(f);
this.textureWidth = 64;
this.textureHeight = 32;
textureWidth = 64;
textureHeight = 32;
bipedHead = new ModelRenderer(this);
bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
bipedHead.cubeList.add(new ModelBox(bipedHead, 0, 0, -4.0F, -8.0F, -4.0F, 8, 8, 8, 1.0F));
crest = new ModelRenderer(this); crest = new ModelRenderer(this);
crest.setRotationPoint(0.0F, -1.0F, 0.55F); crest.setRotationPoint(0.0F, -1.0F, 0.55F);
shape12 = new ModelRenderer(this); shape12 = new ModelRenderer(this);
shape12.setRotationPoint(0.5F, -4.0F, -6.35F); shape12.setRotationPoint(0.5F, -4.0F, -6.35F);
crest.addChild(shape12);
setRotationAngle(shape12, 1.5708F, 0.0F, 0.0F); setRotationAngle(shape12, 1.5708F, 0.0F, 0.0F);
shape12.cubeList.add(new ModelBox(shape12, 43, 22, -1.0F, 0.0F, -1.5F, 1, 1, 9, 0.0F)); shape12.cubeList.add(new ModelBox(shape12, 43, 22, -1.0F, 0.0F, -1.5F, 1, 1, 9, 0.0F));
shape3 = new ModelRenderer(this); shape3 = new ModelRenderer(this);
shape3.setRotationPoint(0.0F, 0.0F, 0.0F); shape3.setRotationPoint(0.0F, 0.0F, 0.0F);
shape12.addChild(shape3);
setRotationAngle(shape3, 0.0F, -0.2276F, 0.0F); setRotationAngle(shape3, 0.0F, -0.2276F, 0.0F);
shape3.cubeList.add(new ModelBox(shape3, 0, 25, -1.0F, 0.1F, 0.0F, 1, 0, 6, 0.0F)); shape3.cubeList.add(new ModelBox(shape3, 0, 25, -1.0F, 0.1F, 0.0F, 1, 0, 6, 0.0F));
shape4 = new ModelRenderer(this); shape4 = new ModelRenderer(this);
shape4.setRotationPoint(0.0F, 0.0F, 0.0F); shape4.setRotationPoint(0.0F, 0.0F, 0.0F);
shape3.addChild(shape4);
setRotationAngle(shape4, 0.0F, -0.2731F, 0.0F); setRotationAngle(shape4, 0.0F, -0.2731F, 0.0F);
shape4.cubeList.add(new ModelBox(shape4, 16, 23, -1.0F, 0.2F, 0.0F, 1, 0, 5, 0.0F)); shape4.cubeList.add(new ModelBox(shape4, 16, 23, -1.0F, 0.2F, 0.0F, 1, 0, 5, 0.0F));
shape5 = new ModelRenderer(this); shape5 = new ModelRenderer(this);
shape5.setRotationPoint(-1.0F, 0.0F, 0.0F); shape5.setRotationPoint(-1.0F, 0.0F, 0.0F);
shape12.addChild(shape5);
setRotationAngle(shape5, 0.0F, 0.2276F, 0.0F); setRotationAngle(shape5, 0.0F, 0.2276F, 0.0F);
shape5.cubeList.add(new ModelBox(shape5, 50, 3, 0.0F, 0.1F, 0.0F, 1, 0, 6, 0.0F)); shape5.cubeList.add(new ModelBox(shape5, 50, 3, 0.0F, 0.1F, 0.0F, 1, 0, 6, 0.0F));
shape6 = new ModelRenderer(this); shape6 = new ModelRenderer(this);
shape6.setRotationPoint(0.0F, 0.0F, 0.0F); shape6.setRotationPoint(0.0F, 0.0F, 0.0F);
shape5.addChild(shape6);
setRotationAngle(shape6, 0.0F, 0.2731F, 0.0F); setRotationAngle(shape6, 0.0F, 0.2731F, 0.0F);
shape6.cubeList.add(new ModelBox(shape6, 49, 13, 0.0F, 0.2F, 0.0F, 1, 0, 5, 0.0F)); shape6.cubeList.add(new ModelBox(shape6, 49, 13, 0.0F, 0.2F, 0.0F, 1, 0, 5, 0.0F));
this.bipedHead.cubeList.clear();
bipedHead = new ModelRenderer(this);
bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
bipedHead.cubeList.add(new ModelBox(bipedHead, 0, 0, -4.0F, -8.0F, -4.0F, 8, 8, 8, 1.0F));
// this.crest.addChild(this.shape12);
// this.crest.addChild(this.shape3);
// this.crest.addChild(this.shape4);
// this.crest.addChild(this.shape5);
// this.crest.addChild(this.shape6);
crest.addChild(shape12);
shape12.addChild(shape3);
shape3.addChild(shape4);
shape12.addChild(shape5);
shape5.addChild(shape6);
this.bipedHead.addChild(this.crest);
this.bipedHeadwear.cubeList.clear();
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
} }
@Override @Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
bipedHead.render(f5); bipedHead.render(f5);
crest.render(f5);
} }
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {

@ -26,6 +26,7 @@ public class ModelJadeHelmet extends LOTRModelBiped {
public ModelJadeHelmet(float f) { public ModelJadeHelmet(float f) {
super (f); super (f);
this.textureWidth = 64; this.textureWidth = 64;
this.textureHeight = 32; this.textureHeight = 32;
this.bipedHead.cubeList.clear(); this.bipedHead.cubeList.clear();

@ -0,0 +1,43 @@
package com.zivilon.cinder_loe.client.render;
import com.zivilon.cinder_loe.entity.Wraith;
import com.zivilon.cinder_loe.entity.boss.CryptBoss;
import lotr.client.model.LOTRModelMarshWraith;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
public class RenderCryptBoss extends RenderLiving {
private static ResourceLocation skin = new ResourceLocation("cinder_loe:mob/wraith/wraith.png");
public RenderCryptBoss() {
super((ModelBase)new LOTRModelMarshWraith(), 0.5F);
}
protected ResourceLocation getEntityTexture(Entity entity) {
return skin;
}
protected void preRenderCallback(EntityLivingBase entity, float f) {
super.preRenderCallback(entity, f);
float f1 = 0.9375F;
float hover = MathHelper.sin((((Entity)entity).ticksExisted + f) * 0.15F) * 0.2F - 0.5F;
GL11.glScalef(f1, f1, f1);
GL11.glTranslatef(0.0F, hover, 0.0F);
CryptBoss wraith = (CryptBoss)entity;
if (wraith.getDeathFadeTime() > 0) {
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(3008);
GL11.glColor4f(1.0F, 1.0F, 1.0F, wraith.getDeathFadeTime() / 30.0F);
}
}
protected float getDeathMaxRotation(EntityLivingBase entity) {
return 0.0F;
}
}

@ -0,0 +1,15 @@
package com.zivilon.cinder_loe.client.render.projectile;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderMorgulBlast extends Render {
protected ResourceLocation getEntityTexture(Entity entity) {
return TextureMap.locationBlocksTexture;
}
public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) {
}
}

@ -1,6 +1,5 @@
package com.zivilon.cinder_loe.client.render; package com.zivilon.cinder_loe.client.render.projectile;
import lotr.client.LOTRClientProxy;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;

@ -1,6 +1,5 @@
package com.zivilon.cinder_loe.client.render; package com.zivilon.cinder_loe.client.render.projectile;
import lotr.client.LOTRClientProxy;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;

@ -67,6 +67,7 @@ public class LOTRMaterialTransformer implements IClassTransformer {
addMaterial("USURPER", classNode); addMaterial("USURPER", classNode);
addMaterial("WARLORD",classNode); addMaterial("WARLORD",classNode);
addMaterial("JADE",classNode); addMaterial("JADE",classNode);
addMaterial("GILDEDGALVORN",classNode);
// Protection Conversion // Protection Conversion

@ -1,10 +1,11 @@
package com.zivilon.cinder_loe.entity.boss; package com.zivilon.cinder_loe.entity.boss;
import com.zivilon.cinder_loe.CinderLoE; import com.zivilon.cinder_loe.entity.projectile.EntityMorgulBlast;
import com.zivilon.cinder_loe.projectiles.MorgulBlast; import lotr.common.LOTRMod;
import lotr.common.enchant.LOTREnchantment; import lotr.common.enchant.LOTREnchantment;
import lotr.common.enchant.LOTREnchantmentHelper; import lotr.common.enchant.LOTREnchantmentHelper;
import lotr.common.entity.ai.*; import lotr.common.entity.ai.*;
import lotr.common.entity.npc.LOTREntityMarshWraith;
import lotr.common.entity.npc.LOTREntityNPC; import lotr.common.entity.npc.LOTREntityNPC;
import lotr.common.fac.LOTRFaction; import lotr.common.fac.LOTRFaction;
import lotr.common.quest.LOTRMiniQuest; import lotr.common.quest.LOTRMiniQuest;
@ -21,10 +22,12 @@ import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.world.World; import net.minecraft.world.World;
import java.util.Random;
public class CryptBoss extends LOTREntityNPC { public class CryptBoss extends LOTREntityNPC {
private EntityAIBase meleeAttackAI = new LOTREntityAIAttackOnCollide(this, 2.0, false); private EntityAIBase meleeAttackAI = new LOTREntityAIAttackOnCollide(this, 2.0, false);
private EntityAIBase rangedAttackAI = new LOTREntityAIRangedAttack(this, 1.5, 30, 50, 24.0f); private EntityAIBase rangedAttackAI = new LOTREntityAIRangedAttack(this, 1.5, 30, 50, 60.0f);
//Copying Wraith temporarily //Copying Wraith temporarily
public CryptBoss(World world) { public CryptBoss(World world) {
@ -32,7 +35,8 @@ public class CryptBoss extends LOTREntityNPC {
setSize(0.8F, 2.5F); setSize(0.8F, 2.5F);
this.tasks.taskEntries.clear(); this.tasks.taskEntries.clear();
this.tasks.addTask(0, (EntityAIBase)new EntityAISwimming((EntityLiving)this)); this.tasks.addTask(0, (EntityAIBase)new EntityAISwimming((EntityLiving)this));
this.tasks.addTask(0, (EntityAIBase)new LOTREntityAIBossJumpAttack(this, 1.5, 0.02f)); //Causes crash
//this.tasks.addTask(0, (EntityAIBase)new LOTREntityAIBossJumpAttack(this, 1.5, 0.02f));
this.tasks.addTask(2, (EntityAIBase)new EntityAIWander((EntityCreature)this, 1.0)); this.tasks.addTask(2, (EntityAIBase)new EntityAIWander((EntityCreature)this, 1.0));
this.tasks.addTask(3, (EntityAIBase)new EntityAIWatchClosest2((EntityLiving)this, EntityPlayer.class, 12.0f, 0.02f)); this.tasks.addTask(3, (EntityAIBase)new EntityAIWatchClosest2((EntityLiving)this, EntityPlayer.class, 12.0f, 0.02f));
this.tasks.addTask(3, (EntityAIBase)new EntityAIWatchClosest2((EntityLiving)this, LOTREntityNPC.class, 8.0f, 0.02f)); this.tasks.addTask(3, (EntityAIBase)new EntityAIWatchClosest2((EntityLiving)this, LOTREntityNPC.class, 8.0f, 0.02f));
@ -105,15 +109,23 @@ public class CryptBoss extends LOTREntityNPC {
public void setInWeb() {} public void setInWeb() {}
@Override
public void onLivingUpdate() { public void onLivingUpdate() {
super.onLivingUpdate(); super.onLivingUpdate();
if (rand.nextBoolean()) if (this.worldObj.isRemote) {
((Entity)this).worldObj.spawnParticle("morgulPortal", ((Entity)this).posX + (rand.nextDouble() - 0.5D) * ((Entity)this).width, ((Entity)this).posY + rand.nextDouble() * ((Entity)this).height, ((Entity)this).posZ + (rand.nextDouble() - 0.5D) * ((Entity)this).width, 0.0D, 0.0D, 0.0D); for (int l = 0; l < 1; ++l) {
if (!((Entity)this).worldObj.isRemote) { double d = this.posX + (double)this.width * MathHelper.getRandomDoubleInRange((Random)this.rand, (double)-0.5, (double)0.5);
if (getDeathFadeTime() > 0) double d1 = this.posY + (double)this.height * MathHelper.getRandomDoubleInRange((Random)this.rand, (double)0.4, (double)0.8);
setDeathFadeTime(getDeathFadeTime() - 1); double d2 = this.posZ + (double)this.width * MathHelper.getRandomDoubleInRange((Random)this.rand, (double)-0.5, (double)0.5);
if (getDeathFadeTime() == 1) double d3 = MathHelper.getRandomDoubleInRange((Random)this.rand, (double)-0.1, (double)0.1);
setDead(); double d4 = MathHelper.getRandomDoubleInRange((Random)this.rand, (double)-0.2, (double)-0.05);
double d5 = MathHelper.getRandomDoubleInRange((Random)this.rand, (double)-0.1, (double)0.1);
if (this.rand.nextBoolean()) {
LOTRMod.proxy.spawnParticle("morgulPortal", d, d1, d2, d3, d4, d5);
continue;
}
this.worldObj.spawnParticle("smoke", d, d1, d2, d3, d4, d5);
}
} }
} }
@ -138,10 +150,10 @@ public class CryptBoss extends LOTREntityNPC {
@Override @Override
public void attackEntityWithRangedAttack(EntityLivingBase target, float f) { public void attackEntityWithRangedAttack(EntityLivingBase target, float f) {
MorgulBlast projectile = new MorgulBlast(this.worldObj, (EntityLivingBase)this, target); EntityMorgulBlast projectile = new EntityMorgulBlast(this.worldObj, (EntityLivingBase)this, target);
projectile.leavesDamage = 6.0f; projectile.leavesDamage = 16.0f;
this.worldObj.spawnEntityInWorld((Entity)projectile); this.worldObj.spawnEntityInWorld((Entity)projectile);
this.playSound("lotr:wraith.marchWraith_shoot", this.getSoundVolume(), this.getSoundPitch()); this.playSound("lotr:wraith.marshWraith_shoot", this.getSoundVolume(), this.getSoundPitch());
this.swingItem(); this.swingItem();
} }
@ -150,7 +162,7 @@ public class CryptBoss extends LOTREntityNPC {
Entity entity = damagesource.getEntity(); Entity entity = damagesource.getEntity();
if (entity instanceof EntityLivingBase && entity == damagesource.getSourceOfDamage()) { if (entity instanceof EntityLivingBase && entity == damagesource.getSourceOfDamage()) {
ItemStack itemstack = ((EntityLivingBase)entity).getHeldItem(); ItemStack itemstack = ((EntityLivingBase)entity).getHeldItem();
if (itemstack != null && LOTREnchantmentHelper.hasEnchant(itemstack, LOTREnchantment.baneWraith)) if (itemstack != null && LOTREnchantmentHelper.hasEnchant(itemstack, LOTREnchantment.baneWight))
vulnerable = true; vulnerable = true;
} }
if (vulnerable && getDeathFadeTime() == 0) { if (vulnerable && getDeathFadeTime() == 0) {

@ -1,9 +1,7 @@
package com.zivilon.cinder_loe.projectiles; package com.zivilon.cinder_loe.entity.projectile;
import lotr.common.LOTRMod; import lotr.common.LOTRMod;
import lotr.common.entity.npc.LOTREntityNPC; import lotr.common.entity.npc.LOTREntityNPC;
import lotr.common.entity.projectile.LOTREntityMallornLeafBomb;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.entity.projectile.EntityThrowable;
@ -17,20 +15,20 @@ import net.minecraft.world.World;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
public class MorgulBlast extends LOTREntityMallornLeafBomb { public class EntityMorgulBlast extends EntityThrowable {
private UUID throwerUUID; private UUID throwerUUID;
private int leavesAge; private int leavesAge;
private static int MAX_LEAVES_AGE = 200; private static int MAX_LEAVES_AGE = 200;
public float leavesDamage = 10; public float leavesDamage;
public MorgulBlast(World world) { public EntityMorgulBlast(World world) {
super(world); super(world);
this.setSize(2.0f, 2.0f); this.setSize(2.0f, 2.0f);
this.setPosition(this.posX, this.posY, this.posZ); this.setPosition(this.posX, this.posY, this.posZ);
} }
public MorgulBlast(World world, EntityLivingBase thrower, EntityLivingBase target) { public EntityMorgulBlast(World world, EntityLivingBase thrower, EntityLivingBase target) {
super(world, thrower); super(world, thrower);
this.setSize(2.0f, 2.0f); this.setSize(2.0f, 2.0f);
this.setPosition(this.posX, this.posY, this.posZ); this.setPosition(this.posX, this.posY, this.posZ);
@ -51,9 +49,44 @@ public class MorgulBlast extends LOTREntityMallornLeafBomb {
} }
} }
public EntityMorgulBlast(World world, double d, double d1, double d2) {
super(world, d, d1, d2);
this.setSize(2.0f, 2.0f);
this.setPosition(this.posX, this.posY, this.posZ);
}
public void writeEntityToNBT(NBTTagCompound nbt) {
super.writeEntityToNBT(nbt);
nbt.setInteger("LeavesAge", this.leavesAge);
nbt.setFloat("LeavesDamage", this.leavesDamage);
if (this.throwerUUID != null) {
nbt.setString("ThrowerUUID", this.throwerUUID.toString());
}
}
public void readEntityFromNBT(NBTTagCompound nbt) {
super.readEntityFromNBT(nbt);
this.leavesAge = nbt.getInteger("LeavesAge");
this.leavesDamage = nbt.getFloat("LeavesDamage");
if (nbt.hasKey("ThrowerUUID")) {
this.throwerUUID = UUID.fromString(nbt.getString("ThrowerUUID"));
}
}
protected void onImpact(MovingObjectPosition m) {
if (!this.worldObj.isRemote) {
Entity entity;
if (m.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
this.explode(null);
} else if (m.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && this.isEntityVulnerable(entity = m.entityHit)) {
this.explode(entity);
}
}
}
private void explode(Entity target) { private void explode(Entity target) {
if (!this.worldObj.isRemote) { if (!this.worldObj.isRemote) {
double range = 2.0; double range = 3.0;
List entities = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.boundingBox.expand(range, range, range)); List entities = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.boundingBox.expand(range, range, range));
if (!entities.isEmpty()) { if (!entities.isEmpty()) {
for (int i = 0; i < entities.size(); ++i) { for (int i = 0; i < entities.size(); ++i) {
@ -114,8 +147,28 @@ public class MorgulBlast extends LOTREntityMallornLeafBomb {
double d4 = result.yCoord / 10.0; double d4 = result.yCoord / 10.0;
double d5 = result.zCoord / 10.0; double d5 = result.zCoord / 10.0;
LOTRMod.proxy.spawnParticle("morgulPortal", d, d1, d2, d3, d4, d5); LOTRMod.proxy.spawnParticle("morgulPortal", d, d1, d2, d3, d4, d5);
LOTRMod.proxy.spawnParticle("smoke", d, d1, d2, d3 * 0.5, d4 * 0.5, d5 * 0.5); // LOTRMod.proxy.spawnParticle("smoke", d, d1, d2, d3 * 0.5, d4 * 0.5, d5 * 0.5);
worldObj.spawnParticle("smoke", d, d1, d2, d3 * 0.5, d4 * 0.5, d5 * 0.5);
}
}
}
public EntityLivingBase getThrower() {
if (this.throwerUUID != null) {
for (Object obj : this.worldObj.loadedEntityList) {
Entity entity = (Entity)obj;
if (!(entity instanceof EntityLivingBase) || !entity.getUniqueID().equals(this.throwerUUID)) continue;
return (EntityLivingBase)entity;
} }
} }
return null;
}
protected float func_70182_d() {
return 1.0f;
}
protected float getGravityVelocity() {
return 0.0f;
} }
} }

@ -102,7 +102,7 @@ public class MixinLOTRArmorModels {
map.put(CinderLoE.bodyJade, new ModelBodyJade(1.0f)); map.put(CinderLoE.bodyJade, new ModelBodyJade(1.0f));
map.put(CinderLoE.legsJade, new ModelLegsJade(1.0f)); map.put(CinderLoE.legsJade, new ModelLegsJade(1.0f));
map.put(CinderLoE.helmetJade, new ModelJadeHelmet(1.0f)); map.put(CinderLoE.helmetJade, new ModelJadeHelmet(1.0f));
map.put(LOTRMod.helmetGalvorn, new ModelGalvornHelmet(1.0f)); map.put(CinderLoE.helmetGildedGalvorn, new ModelGalvornHelmet(1.0f));
map.put(LOTRMod.plate, new LOTRModelHeadPlate()); map.put(LOTRMod.plate, new LOTRModelHeadPlate());
map.put(LOTRMod.woodPlate, new LOTRModelHeadPlate()); map.put(LOTRMod.woodPlate, new LOTRModelHeadPlate());
map.put(LOTRMod.ceramicPlate, new LOTRModelHeadPlate()); map.put(LOTRMod.ceramicPlate, new LOTRModelHeadPlate());

@ -127,7 +127,7 @@ public class recipes {
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(CinderLoE.fieldRepairKit), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(CinderLoE.fieldRepairKit),
new ItemStack(CinderLoE.forgingKit, 1, 0), new ItemStack(CinderLoE.forgingKit, 1, 0),
new ItemStack(CinderLoE.spiceIngredient, 1, 1))); new ItemStack(CinderLoE.forgingKit, 1, 1)));
OreDictionary.registerOre("vegetable1", CinderLoE.onion); OreDictionary.registerOre("vegetable1", CinderLoE.onion);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Loading…
Cancel
Save