Finished adding new orc traders, but currently they crash game on startup
parent
6077f2df0b
commit
de9b3aa663
@ -0,0 +1,88 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import com.zivilon.cinder_loe.mixins.MixinLOTRTradeEntries;
|
||||||
|
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.LOTRTradeEntryBarrel;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeable;
|
||||||
|
import net.minecraft.entity.IEntityLivingData;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class DolGuldurOrcBrewer extends DolGuldurOrcButcher implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public DolGuldurOrcBrewer(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.daggerDolGuldurPoisoned));
|
||||||
|
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.daggerDolGuldurPoisoned));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
this.setCurrentItemOrArmor(1, new ItemStack(LOTRMod.bootsFur));
|
||||||
|
this.setCurrentItemOrArmor(2, new ItemStack(LOTRMod.legsDolGuldur));
|
||||||
|
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.mugOrcDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 4), 8),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 3), 180),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 4), 300),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugMorgulDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugMorgulDraught, 1, 3), 150),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 2), 6666));
|
||||||
|
((MixinLOTRTradeEntries)ANGMAR_BUTCHER_BUY).vessels(LOTRFoods.ORC_DRINK);
|
||||||
|
|
||||||
|
ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mug), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.waterskin), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.barrel), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.morgulShroom), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.morgulFlower), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.dwarfBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.hobbitBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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.MixinLOTRTradeEntries;
|
||||||
|
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.LOTRTradeEntryBarrel;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeable;
|
||||||
|
import net.minecraft.entity.IEntityLivingData;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class GundabadOrcBrewer extends GundabadOrcButcher implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public GundabadOrcBrewer(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.daggerGundabadUrukPoisoned));
|
||||||
|
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.daggerGundabadUrukPoisoned));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
this.setCurrentItemOrArmor(1, new ItemStack(LOTRMod.bootsFur));
|
||||||
|
this.setCurrentItemOrArmor(2, new ItemStack(LOTRMod.legsDolGuldur));
|
||||||
|
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.mugOrcDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 4), 8),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 3), 180),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 4), 300),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 2), 6666));
|
||||||
|
((MixinLOTRTradeEntries)ANGMAR_BUTCHER_BUY).vessels(LOTRFoods.ORC_DRINK);
|
||||||
|
|
||||||
|
ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mug), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.waterskin), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.barrel), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.morgulShroom), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.dwarfBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.hobbitBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,89 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import com.zivilon.cinder_loe.mixins.MixinLOTRTradeEntries;
|
||||||
|
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.LOTRTradeEntryBarrel;
|
||||||
|
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 HalfTrollBrewer extends HalfTrollButcher implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public HalfTrollBrewer(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.daggerHalfTrollPoisoned));
|
||||||
|
this.npcItemsInv.setIdleItem(new ItemStack(LOTRMod.mugTorogDraught));
|
||||||
|
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.daggerHalfTrollPoisoned));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
this.setCurrentItemOrArmor(4, new ItemStack(LOTRMod.helmetHalfTroll));
|
||||||
|
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.mugTorogDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugTorogDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugTorogDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugTorogDraught, 1, 4), 8),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugTorogDraught, 1, 3), 180),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugTorogDraught, 1, 4), 300),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 3), 150),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 2), 6666));
|
||||||
|
((MixinLOTRTradeEntries)ANGMAR_BUTCHER_BUY).vessels(LOTRFoods.HALF_TROLL_DRINK);
|
||||||
|
|
||||||
|
ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mug), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.rotten_flesh), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.reeds, 2), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.waterskin), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.barrel), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.rhinoHorn), 5),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Blocks.dirt, 8), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.morgulFlower), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.dwarfBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.hobbitBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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.MixinLOTRTradeEntries;
|
||||||
|
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.LOTRTradeEntryBarrel;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeable;
|
||||||
|
import net.minecraft.entity.IEntityLivingData;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class IsengardOrcBrewer extends IsengardOrcButcher implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public IsengardOrcBrewer(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.daggerUrukPoisoned));
|
||||||
|
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.daggerUrukPoisoned));
|
||||||
|
this.npcItemsInv.setIdleItem(this.npcItemsInv.getMeleeWeapon());
|
||||||
|
this.setCurrentItemOrArmor(1, new ItemStack(LOTRMod.bootsFur));
|
||||||
|
this.setCurrentItemOrArmor(2, new ItemStack(LOTRMod.legsDolGuldur));
|
||||||
|
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.mugOrcDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 4), 8),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 3), 180),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 4), 300),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 2), 6666));
|
||||||
|
((MixinLOTRTradeEntries)ANGMAR_BUTCHER_BUY).vessels(LOTRFoods.ORC_DRINK);
|
||||||
|
|
||||||
|
ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mug), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.waterskin), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.barrel), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.morgulShroom), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.dwarfBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.hobbitBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,88 @@
|
|||||||
|
package com.zivilon.cinder_loe.entity.npc.orc.trader;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.CinderLoE;
|
||||||
|
import com.zivilon.cinder_loe.mixins.MixinLOTRTradeEntries;
|
||||||
|
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.LOTRTradeEntryBarrel;
|
||||||
|
import lotr.common.entity.npc.LOTRTradeable;
|
||||||
|
import net.minecraft.entity.IEntityLivingData;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class MordorOrcBrewer extends MordorOrcButcher implements LOTRTradeable {
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
|
||||||
|
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
|
||||||
|
|
||||||
|
public MordorOrcBrewer(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
|
||||||
|
data = super.onSpawnWithEgg(data);
|
||||||
|
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.daggerOrcPoisoned));
|
||||||
|
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.daggerOrcPoisoned));
|
||||||
|
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.mugOrcDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugOrcDraught, 1, 4), 8),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 3), 180),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugOrcDraught, 1, 4), 300),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mugMorgulDraught, 1, 9999), 8),
|
||||||
|
new LOTRTradeEntryBarrel(new ItemStack(LOTRMod.mugMorgulDraught, 1, 3), 150),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 200),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 2), 6666));
|
||||||
|
((MixinLOTRTradeEntries)ANGMAR_BUTCHER_BUY).vessels(LOTRFoods.ORC_DRINK);
|
||||||
|
|
||||||
|
ANGMAR_BUTCHER_SELL = new LOTRTradeEntries(TradeType.SELL,
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.mug), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.waterskin), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.barrel), 10),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.morgulShroom), 2),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.morgulFlower), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.dwarfBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.hobbitBone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(Items.bone), 1),
|
||||||
|
new LOTRTradeEntry(new ItemStack(CinderLoE.maggotlessbread, 5), 17),
|
||||||
|
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue