2
0
Fork 0

Added Haradric and Dwarven Levy

fixed bonemold not being able to be repaired
frozen
KeyLime17 1 year ago
parent 70379aaedc
commit a92c41d1ab

@ -1 +1 @@
�[�i5�ï¿à
�[�i5�ï¿á¡

@ -299,10 +299,14 @@ public class CinderLoE {
event.registerServerCommand(new CommandCinderCharacter());
}
public void registerEntities() { // Last ID added: 35
public void registerEntities() { // Last ID added: 37
GameRegistry.registerTileEntity(TileEntityMistBlock.class, "TileEntityMistBlock");
int entityID = 7320; // Always increment entityID by 1 over the last entity to ensure unique IDs
EntityRegistry.registerModEntity(HaradLevy.class, "HaradLevy", (entityID + 36), this, 64, 1, true);
EntityRegistry.registerModEntity(DwarfLevy.class, "DwarfLevy", (entityID + 37), this, 64, 1, true);
EntityRegistry.registerModEntity(SarumanFireball.class, "SarumanFireball", entityID + 0, this, 64, 10, true);
EntityRegistry.registerModEntity(Renegade.class, "Renegade", (entityID + 1), this, 64, 1, true);
EntityRegistry.registerModEntity(RenegadeCaptain.class, "RenegadeCaptain", (entityID + 16), this, 64, 1, true);
@ -779,6 +783,9 @@ public class CinderLoE {
public static class ClientProxy extends CommonProxy {
@Override
public void setup() {
RenderingRegistry.registerEntityRenderingHandler(HaradLevy.class, new LOTRRenderNearHaradrim());
RenderingRegistry.registerEntityRenderingHandler(DwarfLevy.class, new LOTRRenderDwarf());
RenderingRegistry.registerEntityRenderingHandler(SarumanFireball.class, new RenderSarumanFireball());
RenderingRegistry.registerEntityRenderingHandler(Renegade.class, new RenderRenegade());
RenderingRegistry.registerEntityRenderingHandler(RenegadeCaptain.class, new RenderRenegade());
@ -1051,6 +1058,9 @@ public class CinderLoE {
CinderCore.registerItemFallback(Item.getIdFromItem(bootsArnorBanner), Item.getIdFromItem(Items.chainmail_boots), "cinder_loe", "1.1");
CinderCore.registerItemFallback(Item.getIdFromItem(maceArnor), Item.getIdFromItem(LOTRMod.blacksmithHammer), "cinder_loe", "1.1");
CinderCore.registerEntityFallback(HaradLevy.class, LOTREntityNearHaradrim.class, "cinder_loe", "1.2");
CinderCore.registerEntityFallback(DwarfLevy.class, LOTREntityDwarf.class, "cinder_loe", "1.2");
CinderCore.registerEntityFallback(SarumanFireball.class, LOTREntityGandalfFireball.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");

@ -0,0 +1,51 @@
package com.zivilon.cinder_loe.entity;
import com.zivilon.cinder_loe.CinderLoE;
import lotr.common.LOTRMod;
import lotr.common.LOTRShields;
import lotr.common.entity.npc.LOTREntityDwarfWarrior;
import net.minecraft.entity.IEntityLivingData;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
public class DwarfLevy extends LOTREntityDwarfWarrior {
private static ItemStack[] levyWeapons = new ItemStack[]{new ItemStack(LOTRMod.daggerDwarven), new ItemStack(LOTRMod.daggerDwarvenPoisoned), new ItemStack(LOTRMod.swordDwarven), new ItemStack(LOTRMod.axeDwarven), new ItemStack(LOTRMod.battleaxeDwarven), new ItemStack(LOTRMod.hammerDwarven), new ItemStack(Items.iron_axe), new ItemStack(LOTRMod.battleaxeIron), new ItemStack(LOTRMod.spearDwarven), new ItemStack(LOTRMod.spearIron)};
private static ItemStack[] levySpears = new ItemStack[]{new ItemStack(LOTRMod.spearDwarven), new ItemStack(LOTRMod.spearIron)};
private static ItemStack[] levyBodies = new ItemStack[]{new ItemStack(Items.leather_chestplate), new ItemStack(LOTRMod.bodyDaleGambeson)};
private static ItemStack[] levyLegs = new ItemStack[]{new ItemStack(Items.leather_leggings), new ItemStack(Items.iron_leggings)};
private static ItemStack[] levyBoots = new ItemStack[]{new ItemStack(Items.leather_boots), new ItemStack(LOTRMod.bootsBronze), null};
private static final int[] colors = new int[]{14823729, 5512477, 14196753, 11374145, 7366222};
public DwarfLevy(World world) {
super(world);
this.npcShield = null;
}
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
data = super.onSpawnWithEgg(data);
int i = (this).rand.nextInt(levyWeapons.length);
this.npcItemsInv.setMeleeWeapon(levyWeapons[i].copy());
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
if ((this).rand.nextInt(5) == 0) {
this.npcItemsInv.setSpearBackup(this.npcItemsInv.getMeleeWeapon());
i = (this).rand.nextInt(levySpears.length);
this.npcItemsInv.setMeleeWeapon(levySpears[i].copy());
}
i = (this).rand.nextInt(levyBoots.length);
this.setCurrentItemOrArmor(1, levyBoots[i].copy());
i = (this).rand.nextInt(levyLegs.length);
this.setCurrentItemOrArmor(2, levyLegs[i].copy());
i = (this).rand.nextInt(levyBodies.length);
this.setCurrentItemOrArmor(3, levyBodies[i].copy());
this.setCurrentItemOrArmor(4, null);
return data;
}
@Override
public ItemStack getPickedResult(MovingObjectPosition target) {
return new ItemStack(CinderLoE.redDwarfWarriorSpawnEgg, 1);
}
}

@ -0,0 +1,54 @@
package com.zivilon.cinder_loe.entity;
import com.zivilon.cinder_loe.CinderLoE;
import lotr.common.LOTRMod;
import lotr.common.LOTRShields;
import lotr.common.entity.npc.LOTREntityBreeGuard;
import lotr.common.entity.npc.LOTREntityNearHaradrim;
import lotr.common.item.LOTRItemHaradRobes;
import net.minecraft.entity.IEntityLivingData;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class HaradLevy extends LOTREntityNearHaradrim {
private static ItemStack[] levyWeapons = new ItemStack[]{new ItemStack(LOTRMod.daggerHarad), new ItemStack(LOTRMod.daggerHaradPoisoned), new ItemStack(LOTRMod.swordHarad), new ItemStack(LOTRMod.swordMoredain), new ItemStack(LOTRMod.battleaxeBronze), new ItemStack(LOTRMod.maceNearHarad), new ItemStack(Items.iron_sword), new ItemStack(LOTRMod.swordBronze), new ItemStack(LOTRMod.battleaxeIron), new ItemStack(LOTRMod.poleaxeNearHarad), new ItemStack(LOTRMod.spearHarad), new ItemStack(LOTRMod.spearIron), new ItemStack(LOTRMod.spearBronze)};
private static ItemStack[] levySpears = new ItemStack[]{new ItemStack(LOTRMod.spearHarad), new ItemStack(LOTRMod.spearIron), new ItemStack(LOTRMod.spearBronze)};
private static ItemStack[] levyBodies = new ItemStack[]{new ItemStack(Items.leather_chestplate), new ItemStack(LOTRMod.bodyBronze), new ItemStack(LOTRMod.bodyHaradRobes)};
private static ItemStack[] levyLegs = new ItemStack[]{new ItemStack(Items.leather_leggings), new ItemStack(LOTRMod.legsBronze)};
private static ItemStack[] levyBoots = new ItemStack[]{new ItemStack(Items.leather_boots), new ItemStack(LOTRMod.bootsBronze), null};
private static final int[] colors = new int[]{14823729, 5512477, 14196753, 11374145, 7366222};
public HaradLevy(World world) {
super(world);
this.spawnRidingHorse = false;
this.addTargetTasks(true);
this.npcShield = null;
}
@Override
public void setupNPCGender() {
this.familyInfo.setMale(true);
}
@Override
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
data = super.onSpawnWithEgg(data);
int i = (this).rand.nextInt(levyWeapons.length);
this.npcItemsInv.setMeleeWeapon(levyWeapons[i].copy());
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
if ((this).rand.nextInt(5) == 0) {
this.npcItemsInv.setSpearBackup(this.npcItemsInv.getMeleeWeapon());
i = (this).rand.nextInt(levySpears.length);
this.npcItemsInv.setMeleeWeapon(levySpears[i].copy());
}
i = (this).rand.nextInt(levyBoots.length);
this.setCurrentItemOrArmor(1, levyBoots[i].copy());
i = (this).rand.nextInt(levyLegs.length);
this.setCurrentItemOrArmor(2, levyLegs[i].copy());
i = (this).rand.nextInt(levyBodies.length);
this.setCurrentItemOrArmor(3, levyBodies[i].copy());
this.setCurrentItemOrArmor(4, null);
return data;
}
}

@ -56,7 +56,7 @@ public class MixinLOTRContainerAnvil {
if (material == CinderLoE.MATERIAL_ASH.toToolMaterial())
return (materialItem.getItem() == CinderLoE.ingotAsh);
if (material == CinderLoE.MATERIAL_LIMWAITH_BONE.toToolMaterial())
return LOTRMod.isOreNameEqual(materialItem, "bone");
return (materialItem.getItem() == CinderLoE.bonemold);
if (material == CinderLoE.EVENT.toToolMaterial())
return LOTRMod.isOreNameEqual(materialItem, "ice");
if (material == CinderLoE.MATERIAL_BREE.toToolMaterial())

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Loading…
Cancel
Save