Moved traders to their own directories
parent
585a81ad0c
commit
8ac0c074e2
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity.trader;
|
package com.zivilon.cinder_loe.entity.npc.evil_human.trader;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.zivilon.cinder_loe.entity.trader;
|
package com.zivilon.cinder_loe.entity.npc.evil_human.trader;
|
||||||
|
|
||||||
import com.zivilon.cinder_loe.CinderLoE;
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
|
||||||
@ -0,0 +1,115 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import com.zivilon.cinder_loe.entity.npc.evil_human.Limwaith;
|
||||||
|
import lotr.common.LOTRLevelData;
|
||||||
|
import lotr.common.LOTRMod;
|
||||||
|
import lotr.common.entity.npc.*;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.entity.IEntityLivingData;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
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 AngmarOrcButcher extends LOTREntityAngmarOrcTrader implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public AngmarOrcButcher(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.daggerAngmarPoisoned));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getBuyPool() {
|
||||||
|
return ANGMAR_BUTCHER_BUY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getSellPool() {
|
||||||
|
return ANGMAR_BUTCHER_SELL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData func_110161_a(IEntityLivingData data) {
|
||||||
|
data = super.func_110161_a(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.daggerAngmarPoisoned));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
this.setCurrentItemOrArmor(1, new ItemStack(LOTRMod.bootsFur));
|
||||||
|
this.setCurrentItemOrArmor(2, new ItemStack(LOTRMod.legsFur));
|
||||||
|
this.setCurrentItemOrArmor(3, new ItemStack(LOTRMod.bodyBone));
|
||||||
|
this.setCurrentItemOrArmor(4, new ItemStack(LOTRMod.helmetBone));
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getAlignmentBonus() {
|
||||||
|
return 2.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canTradeWith(EntityPlayer entityplayer) {
|
||||||
|
return (LOTRLevelData.getData(entityplayer).getAlignment(getFaction()) >= 100.0F && isFriendlyAndAligned(entityplayer));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static {
|
||||||
|
ANGMAR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY,
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread), 2), //maggotless bread
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.daggerLimwaithPoisoned), 20), // flesh, meats, and maybe new cuisine, spice ingredeint?
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.blowgunLimwaith), 25),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.tauredainDart, 4), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.tauredainDartPoisoned, 4), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.bonemold, 2), 4),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bone, 1), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bottlePoison), 10));
|
||||||
|
|
||||||
|
ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.wheat, 2), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.elfBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.dwarfBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.hobbitBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.maggotyBread, 2), 2), // Check price going down
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.rotten_flesh, 3, 15), 1), // man flesh
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.gemsbokHorn), 4), // angmar axe and daggers
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.doubleFlower, 2, 2), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.doubleFlower, 2, 3), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Blocks.red_mushroom, 1, 0), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Blocks.brown_mushroom, 1, 0), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.bonemold, 2), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mango), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.banana), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.corn, 2), 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlayerTrade(EntityPlayer entityplayer, TradeType type, ItemStack itemstack) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) {
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Item getLimwaithTraderDrop() {
|
||||||
|
return LOTRMod.pearl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSpeechBank(EntityPlayer entityplayer) {
|
||||||
|
if (this.isFriendlyAndAligned(entityplayer)) {
|
||||||
|
return this.canTradeWith(entityplayer) ? "angmar/trader/friendly" : "angmar/trader/neutral";
|
||||||
|
} else {
|
||||||
|
return "angmar/orc/hostile";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ItemStack getPickedResult(MovingObjectPosition target) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue