2
0
Fork 0

Finished adding new orc traders, but currently they crash game on startup

main
KeyLime17 5 months ago
parent 6077f2df0b
commit de9b3aa663

@ -32,6 +32,7 @@ import com.zivilon.cinder_loe.entity.npc.evil_human.trader.LimwaithShaman;
import com.zivilon.cinder_loe.entity.npc.good_human.*;
import com.zivilon.cinder_loe.entity.npc.orc.MorgulOrc;
import com.zivilon.cinder_loe.entity.npc.orc.NorthernOrc;
import com.zivilon.cinder_loe.entity.npc.orc.trader.*;
import com.zivilon.cinder_loe.entity.npc.radagast.*;
import com.zivilon.cinder_loe.entity.projectile.*;
import com.zivilon.cinder_loe.items.*;
@ -388,7 +389,7 @@ public class CinderLoE {
// event.registerServerCommand(new CommandMobileSound());
}
public void registerEntities() { // Last ID added: 66
public void registerEntities() { // Last ID added: 83
///GameRegistry.registerTileEntity(TileEntityMistBlock.class, "TileEntityMistBlock");
///.registerBlock(TileEntityRustedSword, "TileEntityRustedSword");
@ -400,6 +401,24 @@ public class CinderLoE {
EntityRegistry.registerModEntity(LimwaithShaman.class, "LimwaithShaman", (entityID + 34), this, 64, 1, true);
EntityRegistry.registerModEntity(BladorthinSmith.class, "BladorthinSmith", (entityID + 43), this, 64, 1, true);
EntityRegistry.registerModEntity(AngmarOrcBrewer.class, "AngmarOrcBrewer", (entityID + 67), this, 64, 1, true);
EntityRegistry.registerModEntity(AngmarOrcButcher.class, "AngmarOrcButcher", (entityID + 68), this, 64, 1, true);
EntityRegistry.registerModEntity(AngmarOrcSmith.class, "AngmarOrcSmith", (entityID + 69), this, 64, 1, true);
EntityRegistry.registerModEntity(DolGuldurOrcBrewer.class, "DolGuldurOrcBrewer", (entityID + 70), this, 64, 1, true);
EntityRegistry.registerModEntity(DolGuldurOrcButcher.class, "DolGuldurOrcButcher", (entityID + 71), this, 64, 1, true);
EntityRegistry.registerModEntity(DolGuldurOrcSmith.class, "DolGuldurOrcSmith", (entityID + 72), this, 64, 1, true);
EntityRegistry.registerModEntity(GundabadOrcBrewer.class, "GundabadOrcBrewer", (entityID + 73), this, 64, 1, true);
EntityRegistry.registerModEntity(GundabadOrcButcher.class, "GundabadOrcButcher", (entityID + 74), this, 64, 1, true);
EntityRegistry.registerModEntity(GundabadOrcSmith.class, "GundabadOrcSmith", (entityID + 75), this, 64, 1, true);
EntityRegistry.registerModEntity(IsengardOrcButcher.class, "IsengardOrcButcher", (entityID + 76), this, 64, 1, true);
EntityRegistry.registerModEntity(IsengardOrcBrewer.class, "IsengardOrcBrewer", (entityID + 77), this, 64, 1, true);
EntityRegistry.registerModEntity(IsengardOrcSmith.class, "IsengardOrcSmith", (entityID + 78), this, 64, 1, true);
EntityRegistry.registerModEntity(MordorOrcBrewer.class, "MordorOrcBrewer", (entityID + 79), this, 64, 1, true);
EntityRegistry.registerModEntity(MordorOrcButcher.class, "MordorOrcButcher", (entityID + 80), this, 64, 1, true);
EntityRegistry.registerModEntity(MordorOrcSmith.class, "MordorOrcSmith", (entityID + 81), this, 64, 1, true);
EntityRegistry.registerModEntity(HalfTrollBrewer.class, "HalfTrollBrewer", (entityID + 82), this, 64, 1, true);
EntityRegistry.registerModEntity(HalfTrollButcher.class, "HalfTrollButcher", (entityID + 83), this, 64, 1, true);
// Event
EntityRegistry.registerModEntity(DarkSpider.class, "DarkSpider", (entityID + 42), this, 64, 1, true);
@ -1051,6 +1070,25 @@ public class CinderLoE {
RenderingRegistry.registerEntityRenderingHandler(EntityWarDart.class, new RenderWarDart());
RenderingRegistry.registerEntityRenderingHandler(EntityMorgulBlast.class, new RenderMorgulBlast());
RenderingRegistry.registerEntityRenderingHandler(BladorthinSmith.class, new LOTRRenderDorwinionElfVintner());
RenderingRegistry.registerEntityRenderingHandler(AngmarOrcSmith.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(AngmarOrcBrewer.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(AngmarOrcSmith.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(DolGuldurOrcBrewer.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(DolGuldurOrcButcher.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(DolGuldurOrcSmith.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(GundabadOrcBrewer.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(GundabadOrcButcher.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(GundabadOrcSmith.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(IsengardOrcBrewer.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(IsengardOrcButcher.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(IsengardOrcSmith.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(MordorOrcBrewer.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(MordorOrcButcher.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(MordorOrcSmith.class, new LOTRRenderOrc());
RenderingRegistry.registerEntityRenderingHandler(HalfTrollBrewer.class, new LOTRRenderHalfTrollScavenger());
RenderingRegistry.registerEntityRenderingHandler(HalfTrollButcher.class, new LOTRRenderHalfTrollScavenger());
RenderingRegistry.registerEntityRenderingHandler(DarkSpider.class, new RenderDarkSpider());
RenderingRegistry.registerEntityRenderingHandler(CorruptDwarf.class, new RenderCorruptDwarf());
RenderingRegistry.registerEntityRenderingHandler(CorruptElf.class, new RenderCorruptElf());

@ -1,6 +1,7 @@
package com.zivilon.cinder_loe.entity.npc.orc.trader;
import com.zivilon.cinder_loe.CinderLoE;
import com.zivilon.cinder_loe.mixins.MixinLOTRTradeEntries;
import com.zivilon.cinder_loe.mixins.overrides.MixinLOTRTradeEntriesOverrides;
import lotr.common.LOTRFoods;
import lotr.common.LOTRLevelData;
@ -8,6 +9,7 @@ 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 lotr.common.item.LOTRItemMug;
import net.minecraft.entity.IEntityLivingData;
@ -51,33 +53,30 @@ public class AngmarOrcBrewer extends AngmarOrcButcher implements LOTRTradeable {
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 LOTRTradeEntry(new ItemStack(CinderLoE.mugOrcBrew, 1, 9999), 300),
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.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(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));
}

@ -17,7 +17,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
public class AngmarOrcSmith extends AngmarOrcButcher implements LOTRTradeable {
public class AngmarOrcSmith extends AngmarOrcButcher implements LOTRTradeable.Smith {
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;

@ -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));
}
}

@ -16,7 +16,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
public class DolGuldurOrcSmith extends DolGuldurOrcButcher implements LOTRTradeable {
public class DolGuldurOrcSmith extends DolGuldurOrcButcher implements LOTRTradeable.Smith {
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;

@ -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));
}
}

@ -8,20 +8,32 @@ 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.SharedMonsterAttributes;
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 class GundabadOrcSmith extends GundabadOrcButcher implements LOTRTradeable.Smith {
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
public GundabadOrcSmith(World world) {
super(world);
this.setSize(0.6f, 1.8f);
this.isWeakOrc = false;
}
protected float getSoundPitch() {
return super.getSoundPitch() * 0.75f;
}
@Override
protected void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(26.0);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(24.0);
this.getEntityAttribute(npcRangedAccuracy).setBaseValue(0.5);
}
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
data = super.onSpawnWithEgg(data);
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.blacksmithHammer));

@ -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));
}
}

@ -78,7 +78,7 @@ public class HalfTrollButcher extends LOTREntityHalfTrollScavenger implements LO
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.rotten_flesh), 2),
new LOTRTradeEntry(new ItemStack(Items.fish), 2),
new LOTRTradeEntry(new ItemStack(Items.fish, 1), 2),
new LOTRTradeEntry(new ItemStack(LOTRMod.zebraRaw), 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));
}
}

@ -3,10 +3,12 @@ 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.LOTREntityUrukHaiTrader;
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;
@ -14,7 +16,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class IsengardOrcSmith extends IsengardOrcButcher implements LOTRTradeable {
public class IsengardOrcSmith extends LOTREntityUrukHaiTrader implements LOTRTradeable.Smith {
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;
@ -95,4 +97,8 @@ public class IsengardOrcSmith extends IsengardOrcButcher implements LOTRTradeabl
new LOTRTradeEntry(new ItemStack(LOTRMod.manFlesh), 3));
}
@Override
public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) {
}
}

@ -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));
}
}

@ -16,7 +16,7 @@ import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class MordorOrcSmith extends MordorOrcButcher implements LOTRTradeable {
public class MordorOrcSmith extends MordorOrcButcher implements LOTRTradeable.Smith {
public static LOTRTradeEntries ANGMAR_BUTCHER_BUY;
public static LOTRTradeEntries ANGMAR_BUTCHER_SELL;

Loading…
Cancel
Save