Almost finished adding new orc Traders
parent
32a1b1f7de
commit
6077f2df0b
@ -0,0 +1,85 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import com.zivilon.cinder_loe.mixins.overrides.MixinLOTRTradeEntriesOverrides;
|
||||||
|
import lotr.common.LOTRFoods;
|
||||||
|
import lotr.common.LOTRLevelData;
|
||||||
|
import lotr.common.LOTRMod;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntry;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeable;
|
||||||
|
import lotr.common.item.LOTRItemMug;
|
||||||
|
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.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class AngmarOrcBrewer extends AngmarOrcButcher implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public AngmarOrcBrewer(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.daggerAngmarPoisoned));
|
||||||
|
this.npcItemsInv.setIdleItem(new ItemStack(LOTRMod.mugOrcDraught));
|
||||||
|
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.legsAngmar));
|
||||||
|
this.setCurrentItemOrArmor(3, new ItemStack(LOTRMod.bodyFur));
|
||||||
|
this.setCurrentItemOrArmor(4, new ItemStack(LOTRMod.helmetFur));
|
||||||
|
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(LOTRMod.mugOrcDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugMorgulDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 300),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 2), 6666));
|
||||||
|
|
||||||
|
ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.orcSteel), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.string, 3), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.iron_ingot), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.leather), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.coal, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.leatherBundle), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreMorgulIron), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.guldurilCrystal), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Blocks.iron_ore), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreCopper), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreTin), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import lotr.common.LOTRLevelData;
|
||||||
|
import lotr.common.LOTRMod;
|
||||||
|
import lotr.common.entity.npc.LOTREntityAngmarOrcTrader;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntry;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeable;
|
||||||
|
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.ItemStack;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class AngmarOrcSmith extends AngmarOrcButcher implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public AngmarOrcSmith(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.blacksmithHammer));
|
||||||
|
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.blacksmithHammer));
|
||||||
|
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.helmetAngmar));
|
||||||
|
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.helmetRhudaur), 22),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.bodyRhudaur), 32),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.legsRhudaur), 28),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.bootsRhudaur), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.blacksmithHammer), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.helmetAngmar), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bodyAngmar), 30),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.legsAngmar), 26),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bootsAngmar), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.swordAngmar), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.spearAngmar), 15),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerAngmar), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerAngmarPoisoned), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.battleaxeAngmar), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.polearmAngmar), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.orcBow), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.pickaxeAngmar), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.axeAngmar), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.hammerAngmar), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.arrow, 4), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.wargArmorAngmar), 25));
|
||||||
|
|
||||||
|
ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.orcSteel), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.string, 3), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.iron_ingot), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.leather), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.coal, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.leatherBundle), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreMorgulIron), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.guldurilCrystal), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Blocks.iron_ore), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreCopper), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreTin), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
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.Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class DolGuldurOrcButcher extends LOTREntityDolGuldurOrcTrader implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries DOLGULDUR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries DOLGULDUR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public DolGuldurOrcButcher(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.axeDolGuldur));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getBuyPool() {
|
||||||
|
return DOLGULDUR_BUTCHER_BUY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getSellPool() {
|
||||||
|
return DOLGULDUR_BUTCHER_SELL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData func_110161_a(IEntityLivingData data) {
|
||||||
|
data = super.func_110161_a(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.axeDolGuldur));
|
||||||
|
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 {
|
||||||
|
DOLGULDUR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY,
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 0), 6666),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bread), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.axeDolGuldur), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_chicken), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_beef), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_porkchop), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_fished), 4),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_fished, 1), 4),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.rabbitCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.deerCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.muttonCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 5));
|
||||||
|
|
||||||
|
DOLGULDUR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.string, 3), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.feather, 1), 2),
|
||||||
|
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),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bread, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.rotten_flesh, 3, 15), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.chicken), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.beef), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.porkchop), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.fish), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.fish, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.rabbitRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.deerRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.muttonRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSpeechBank(EntityPlayer entityplayer) {
|
||||||
|
if (this.isFriendlyAndAligned(entityplayer)) {
|
||||||
|
if (this.canTradeWith(entityplayer)) {
|
||||||
|
return "dolGuldur/trader/friendly";
|
||||||
|
}
|
||||||
|
return "dolGuldur/trader/neutral";
|
||||||
|
}
|
||||||
|
return "dolGuldur/orc/hostile";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ItemStack getPickedResult(MovingObjectPosition target) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,97 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import lotr.common.LOTRLevelData;
|
||||||
|
import lotr.common.LOTRMod;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntry;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeable;
|
||||||
|
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.ItemStack;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class DolGuldurOrcSmith extends DolGuldurOrcButcher implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public DolGuldurOrcSmith(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.blacksmithHammer));
|
||||||
|
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.blacksmithHammer));
|
||||||
|
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.helmetDolGuldur));
|
||||||
|
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.forgingKit, 1, 1), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.blacksmithHammer), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.helmetDolGuldur), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bodyDolGuldur), 30),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.legsDolGuldur), 26),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bootsDolGuldur), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.swordDolGuldur), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.spearDolGuldur), 15),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerDolGuldur), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerDolGuldurPoisoned), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.battleaxeDolGuldur), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.pikeDolGuldur), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.orcBow), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.pickaxeDolGuldur), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.axeDolGuldur), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.arrow, 4), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.hammerDolGuldur), 16));
|
||||||
|
|
||||||
|
ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.orcSteel), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.leather), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.string, 3), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.coal, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.leatherBundle), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreMorgulIron), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.guldurilCrystal), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreCopper), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreTin), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,118 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import lotr.common.LOTRAchievement;
|
||||||
|
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.Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class GundabadOrcButcher extends LOTREntityGundabadOrcTrader implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries GUNDABAD_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries GUNDABAD_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public GundabadOrcButcher(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.axeBronze));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getBuyPool() {
|
||||||
|
return GUNDABAD_BUTCHER_BUY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getSellPool() {
|
||||||
|
return GUNDABAD_BUTCHER_SELL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData func_110161_a(IEntityLivingData data) {
|
||||||
|
data = super.func_110161_a(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.axeBronze));
|
||||||
|
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 {
|
||||||
|
GUNDABAD_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY,
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 0), 6666),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bread), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.axeBronze), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.iron_axe), 12),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_chicken), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_beef), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_porkchop), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_fished), 4),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_fished, 1), 4),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.rabbitCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.deerCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.muttonCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 5));
|
||||||
|
|
||||||
|
GUNDABAD_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.string, 3), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.feather, 1), 2),
|
||||||
|
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),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bread, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.rotten_flesh, 3, 15), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.chicken), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.beef), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.porkchop), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.fish), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.fish, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.rabbitRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.deerRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.muttonRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSpeechBank(EntityPlayer entityplayer) {
|
||||||
|
if (this.isFriendlyAndAligned(entityplayer)) {
|
||||||
|
if (this.canTradeWith(entityplayer)) {
|
||||||
|
return "gundabad/trader/friendly";
|
||||||
|
}
|
||||||
|
return "gundabad/trader/neutral";
|
||||||
|
}
|
||||||
|
return "gundabad/orc/hostile";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ItemStack getPickedResult(MovingObjectPosition target) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,101 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import lotr.common.LOTRLevelData;
|
||||||
|
import lotr.common.LOTRMod;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntry;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeable;
|
||||||
|
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.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class GundabadOrcSmith extends GundabadOrcButcher implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public GundabadOrcSmith(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.blacksmithHammer));
|
||||||
|
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.blacksmithHammer));
|
||||||
|
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.helmetBronze));
|
||||||
|
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.forgingKit, 1, 1), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.blacksmithHammer), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.helmetGundabadUruk), 24),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bodyGundabadUruk), 36),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.legsGundabadUruk), 30),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bootsGundabadUruk), 22),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.swordGundabadUruk), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.spearGundabadUruk), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerGundabadUruk), 9),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerGundabadUrukPoisoned), 11),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.battleaxeGundabadUruk), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.hammerGundabadUruk), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.pikeGundabadUruk), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.orcBow), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bronzeCrossbow), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.ironCrossbow), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.pickaxeBronze), 12),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.iron_pickaxe), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.axeBronze), 12),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.arrow, 4), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.iron_axe), 14));
|
||||||
|
|
||||||
|
ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bronze), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.iron_ingot), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.string, 3), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.leather), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.coal, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.leatherBundle), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.dwarfBone, 2), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.amber), 11),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Blocks.iron_ore), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreCopper), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreTin), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,108 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
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.Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class HalfTrollButcher extends LOTREntityHalfTrollScavenger implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries HALF_TROLL_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries HALF_TROLL_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public HalfTrollButcher(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.battleaxeHalfTroll));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getBuyPool() {
|
||||||
|
return HALF_TROLL_BUTCHER_BUY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getSellPool() {
|
||||||
|
return HALF_TROLL_BUTCHER_SELL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData func_110161_a(IEntityLivingData data) {
|
||||||
|
data = super.func_110161_a(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.battleaxeHalfTroll));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
this.setCurrentItemOrArmor(3, new ItemStack(LOTRMod.bodyHalfTroll));
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getAlignmentBonus() {
|
||||||
|
return 2.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canTradeWith(EntityPlayer entityplayer) {
|
||||||
|
return (LOTRLevelData.getData(entityplayer).getAlignment(getFaction()) >= 100.0F && isFriendlyAndAligned(entityplayer));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static {
|
||||||
|
HALF_TROLL_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY,
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 0), 6666),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bread), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.battleaxeHalfTroll), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.flint, 3), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_fished), 4),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_fished, 1), 4),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.zebraCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.lionCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.rhinoCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 5));
|
||||||
|
|
||||||
|
HALF_TROLL_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.string, 3), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.feather, 1), 2),
|
||||||
|
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),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bread, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.rotten_flesh, 3, 15), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.fish), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.fish, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.zebraRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.lionRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.rhinoRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSpeechBank(EntityPlayer entityplayer) {
|
||||||
|
if (this.isFriendlyAndAligned(entityplayer)) {
|
||||||
|
if (this.canTradeWith(entityplayer)) {
|
||||||
|
return "halfTroll/scavenger/friendly";
|
||||||
|
}
|
||||||
|
return "halfTroll/scavenger/neutral";
|
||||||
|
}
|
||||||
|
return "halfTroll/halfTroll/hostile";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ItemStack getPickedResult(MovingObjectPosition target) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,123 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import lotr.common.LOTRAchievement;
|
||||||
|
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.Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class IsengardOrcButcher extends LOTREntityIsengardSnaga implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries URUK_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries URUK_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public IsengardOrcButcher(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.axeUruk));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getBuyPool() {
|
||||||
|
return URUK_BUTCHER_BUY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getSellPool() {
|
||||||
|
return URUK_BUTCHER_SELL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData func_110161_a(IEntityLivingData data) {
|
||||||
|
data = super.func_110161_a(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.axeUruk));
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlayerTrade(EntityPlayer entityPlayer, TradeType tradeType, ItemStack itemStack) {
|
||||||
|
LOTRLevelData.getData(entityPlayer).addAchievement(LOTRAchievement.tradeUrukTrader);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static {
|
||||||
|
URUK_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY,
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 0), 6666),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bread), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.axeUruk), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_chicken), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_beef), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_porkchop), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_fished), 4),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_fished, 1), 4),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.rabbitCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.deerCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.muttonCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 5));
|
||||||
|
|
||||||
|
URUK_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.string, 3), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.feather, 1), 2),
|
||||||
|
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),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bread, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.rotten_flesh, 3, 15), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.chicken), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.beef), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.porkchop), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.fish), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.fish, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.rabbitRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.deerRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.muttonRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSpeechBank(EntityPlayer entityplayer) {
|
||||||
|
if (this.isFriendlyAndAligned(entityplayer)) {
|
||||||
|
if (this.canTradeWith(entityplayer)) {
|
||||||
|
return "isengard/trader/friendly";
|
||||||
|
}
|
||||||
|
return "isengard/trader/neutral";
|
||||||
|
}
|
||||||
|
return "isengard/orc/hostile";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ItemStack getPickedResult(MovingObjectPosition target) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,98 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import lotr.common.LOTRLevelData;
|
||||||
|
import lotr.common.LOTRMod;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntry;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeable;
|
||||||
|
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.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class IsengardOrcSmith extends IsengardOrcButcher implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public IsengardOrcSmith(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.blacksmithHammer));
|
||||||
|
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.blacksmithHammer));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
this.setCurrentItemOrArmor(1, new ItemStack(Items.leather_boots));
|
||||||
|
this.setCurrentItemOrArmor(2, new ItemStack(LOTRMod.legsBronze));
|
||||||
|
this.setCurrentItemOrArmor(3, new ItemStack(LOTRMod.bodyBone));
|
||||||
|
this.setCurrentItemOrArmor(4, new ItemStack(LOTRMod.helmetFur));
|
||||||
|
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.forgingKit, 1, 1), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.blacksmithHammer), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.helmetUruk), 24),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bodyUruk), 36),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.legsUruk), 30),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bootsUruk), 22),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.scimitarUruk), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.spearUruk), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerUruk), 9),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerUrukPoisoned), 11),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.battleaxeUruk), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.hammerUruk), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.pikeUruk), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.urukCrossbow), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.crossbowBolt, 4), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.iron_pickaxe), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.axeBronze), 12),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.iron_axe), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.pickaxeUruk), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.axeUruk), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.wargArmorUruk), 25));
|
||||||
|
|
||||||
|
ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bronze), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.iron_ingot), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.leather), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.coal, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.leatherBundle), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Blocks.iron_ore), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreCopper), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreTin), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,116 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
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.Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class MordorOrcButcher extends LOTREntityMordorOrcTrader implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries MORDOR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries MORDOR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public MordorOrcButcher(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.axeOrc));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getBuyPool() {
|
||||||
|
return MORDOR_BUTCHER_BUY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LOTRTradeEntries getSellPool() {
|
||||||
|
return MORDOR_BUTCHER_SELL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData func_110161_a(IEntityLivingData data) {
|
||||||
|
data = super.func_110161_a(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.axeOrc));
|
||||||
|
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 {
|
||||||
|
MORDOR_BUTCHER_BUY = new LOTRTradeEntries(TradeType.BUY,
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 0), 6666),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bread), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.axeOrc), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_chicken), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_beef), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_porkchop), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_fished), 4),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.cooked_fished, 1), 4),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.rabbitCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.deerCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.muttonCooked), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 5));
|
||||||
|
|
||||||
|
MORDOR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.string, 3), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.feather, 1), 2),
|
||||||
|
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),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bread, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.rotten_flesh, 3, 15), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.chicken), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.beef), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.porkchop), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.fish), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.fish, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.rabbitRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.deerRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.muttonRaw), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSpeechBank(EntityPlayer entityplayer) {
|
||||||
|
if (this.isFriendlyAndAligned(entityplayer)) {
|
||||||
|
if (this.canTradeWith(entityplayer)) {
|
||||||
|
return "mordor/trader/friendly";
|
||||||
|
}
|
||||||
|
return "mordor/trader/neutral";
|
||||||
|
}
|
||||||
|
return "mordor/orc/hostile";
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ItemStack getPickedResult(MovingObjectPosition target) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,111 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import com.zivilon.cinder_loe.mixins.overrides.MixinLOTRTradeEntriesOverrides;
|
||||||
|
import lotr.common.LOTRFoods;
|
||||||
|
import lotr.common.LOTRLevelData;
|
||||||
|
import lotr.common.LOTRMod;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntries.TradeType;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeEntry;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeable;
|
||||||
|
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.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class MordorOrcSmith extends MordorOrcButcher implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public MordorOrcSmith(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.blacksmithHammer));
|
||||||
|
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.blacksmithHammer));
|
||||||
|
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.helmetAngmar));
|
||||||
|
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(LOTRMod.mugOrcDraught), 24),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bodyBlackUruk), 36),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.legsBlackUruk), 30),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bootsBlackUruk), 22),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.scimitarBlackUruk), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.spearBlackUruk), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerBlackUruk), 9),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerBlackUrukPoisoned), 11),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.battleaxeBlackUruk), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.hammerBlackUruk), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.blackUrukBow), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.blacksmithHammer), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.helmetOrc), 20),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bodyOrc), 30),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.legsOrc), 26),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.bootsOrc), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.scimitarOrc), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.spearOrc), 15),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerOrc), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.daggerOrcPoisoned), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.battleaxeOrc), 18),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.polearmOrc), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.orcBow), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.pickaxeOrc), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.axeOrc), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.hammerOrc), 16),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.wargArmorMordor), 25),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.arrow, 4), 3));
|
||||||
|
|
||||||
|
ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.orcSteel), 3),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.string, 3), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.blackUrukSteel), 4),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.leather), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.coal, 1), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.leatherBundle), 14),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreMorgulIron), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.guldurilCrystal), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.nauriteGem), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreCopper), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.oreTin), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
entity.lotr.MordorOrcTrader.name=Mordor Orc Scavenger
|
||||||
|
entity.lotr.AngmarOrcTrader.name=Angmar Orc Scavenger
|
||||||
|
entity.lotr.DolGuldurOrcTrader.name=Dol Guldur Orc Scavenger
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 490 B |
Loading…
Reference in New Issue