@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 708 B |
|
After Width: | Height: | Size: 3.4 KiB |