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.
63 lines
2.1 KiB
Java
63 lines
2.1 KiB
Java
package com.zivilon.cinder_loe.entity;
|
|
|
|
import net.minecraft.entity.EntityLivingBase;
|
|
import net.minecraft.entity.IEntityLivingData;
|
|
import net.minecraft.world.World;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.util.MovingObjectPosition;
|
|
|
|
import lotr.common.LOTRLevelData;
|
|
import lotr.common.entity.npc.LOTRUnitTradeable;
|
|
import lotr.common.entity.npc.LOTRUnitTradeEntries;
|
|
import lotr.common.world.spawning.LOTRInvasions;
|
|
|
|
import com.zivilon.cinder_loe.entity.LimwaithWarrior;
|
|
import com.zivilon.cinder_loe.CinderLoE;
|
|
|
|
public class LimwaithChieftain extends LimwaithBoneWarrior implements LOTRUnitTradeable {
|
|
public LimwaithChieftain(World world) {
|
|
super(world);
|
|
addTargetTasks(false);
|
|
}
|
|
|
|
public float getAlignmentBonus() {
|
|
return 5.0F;
|
|
}
|
|
|
|
public LOTRUnitTradeEntries getUnits() {
|
|
return CinderLoE.LIMWAITH_COMMANDER;
|
|
}
|
|
|
|
public LOTRInvasions getWarhorn() {
|
|
return LOTRInvasions.MOREDAIN;
|
|
}
|
|
|
|
public void onUnitTrade(EntityPlayer entityplayer) {
|
|
}
|
|
@Override
|
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
|
data = super.onSpawnWithEgg(data);
|
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(CinderLoE.truncheonLimwaith));
|
|
|
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
|
setCurrentItemOrArmor(1, new ItemStack(CinderLoE.bootsboneLimwaith));
|
|
setCurrentItemOrArmor(2, new ItemStack(CinderLoE.legsboneLimwaith));
|
|
setCurrentItemOrArmor(3, new ItemStack(CinderLoE.bodyboneLimwaith));
|
|
setCurrentItemOrArmor(4, null);
|
|
return data;
|
|
}
|
|
public boolean canTradeWith(EntityPlayer entityplayer) {
|
|
return (LOTRLevelData.getData(entityplayer).getAlignment(getFaction()) >= 150.0F && isFriendlyAndAligned(entityplayer));
|
|
}
|
|
@Override
|
|
public ItemStack getPickedResult(MovingObjectPosition target) {
|
|
return new ItemStack(CinderLoE.limwaithChieftainSpawnEgg, 1);
|
|
}
|
|
|
|
@Override
|
|
public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) {
|
|
|
|
}
|
|
}
|