You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.2 KiB
Java
31 lines
1.2 KiB
Java
package com.zivilon.cinder_loe.entity;
|
|
|
|
import com.zivilon.cinder_loe.CinderLoE;
|
|
import lotr.common.LOTRMod;
|
|
import lotr.common.entity.npc.LOTREntityBreeGuard;
|
|
import net.minecraft.entity.IEntityLivingData;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.world.World;
|
|
|
|
public class BreeSoldier extends LOTREntityBreeGuard {
|
|
private static ItemStack[] guardWeapons = new ItemStack[]{new ItemStack(CinderLoE.swordBree), new ItemStack(CinderLoE.swordBree), new ItemStack(LOTRMod.pikeIron)};
|
|
|
|
public BreeSoldier(World world) {
|
|
super(world);
|
|
this.spawnRidingHorse = false;
|
|
}
|
|
|
|
@Override
|
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
|
data = super.onSpawnWithEgg(data);
|
|
int i = (rand.nextInt(guardWeapons.length));
|
|
this.npcItemsInv.setMeleeWeapon(guardWeapons[i].copy());
|
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
|
setCurrentItemOrArmor(1, new ItemStack(CinderLoE.bootsBree));
|
|
setCurrentItemOrArmor(2, new ItemStack(CinderLoE.legsBree));
|
|
setCurrentItemOrArmor(3, new ItemStack(CinderLoE.bodyBree));
|
|
setCurrentItemOrArmor(4, new ItemStack(CinderLoE.helmetBree));
|
|
return data;
|
|
}
|
|
}
|