diff options
Diffstat (limited to 'src/Java/gtPlusPlus/plugin/villagers')
3 files changed, 21 insertions, 19 deletions
diff --git a/src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java b/src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java index d56dc33ab1..98e6d7ae1a 100644 --- a/src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java +++ b/src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java @@ -101,7 +101,9 @@ public class EntityBaseVillager extends EntityVillager { @Override public int getProfession() { - return super.getProfession(); + int prof = super.getProfession(); + //Logger.INFO(""+mRoleID); + return prof < 7735 ? 7738 : prof; } @Override @@ -134,6 +136,11 @@ public class EntityBaseVillager extends EntityVillager { this.setSprinting(true); } } + else { + if (this.isSprinting()) { + this.setSprinting(false); + } + } } @@ -210,7 +217,7 @@ public class EntityBaseVillager extends EntityVillager { v82191 = ReflectionUtils.getField(getClass(), "buyingList"); try { o = (MerchantRecipeList) v82191.get(this); - Logger.INFO("Is BuyingList Valid? "+(v82191 != null)); + Logger.WARNING("Is BuyingList Valid? "+(v82191 != null)); return v82191 != null ? o : null; } catch (IllegalArgumentException | IllegalAccessException e) { e.printStackTrace(); @@ -224,7 +231,7 @@ public class EntityBaseVillager extends EntityVillager { protected void setBuyingList(MerchantRecipeList f) { try { - Logger.INFO("set BuyingList? "+(ReflectionUtils.setField(this, "buyingList", f))); + Logger.WARNING("set BuyingList? "+(ReflectionUtils.setField(this, "buyingList", f))); } catch (IllegalArgumentException e) { e.printStackTrace(); } @@ -434,17 +441,17 @@ public class EntityBaseVillager extends EntityVillager { ItemStack selling = m.getItemToSell(); ItemStack[] buying = new ItemStack[] {m.getItemToBuy(), m.getSecondItemToBuy() != null ? m.getSecondItemToBuy() : null}; if (selling == null) { - Logger.INFO("Villager is Selling an invalid item"); + Logger.WARNING("Villager is Selling an invalid item"); } else if (buying[0] == null && buying[1] == null) { - Logger.INFO("Villager is buying two invalid items"); + Logger.WARNING("Villager is buying two invalid items"); } else { - Logger.INFO("Villager is Selling x"+selling.stackSize+selling.getDisplayName()+" for x"+buying[0].stackSize+" "+buying[0].getDisplayName()+buying[1] != null ? " and for x"+buying[1].stackSize+" "+buying[1].getDisplayName() : ""); + Logger.WARNING("Villager is Selling x"+selling.stackSize+selling.getDisplayName()+" for x"+buying[0].stackSize+" "+buying[0].getDisplayName()+buying[1] != null ? " and for x"+buying[1].stackSize+" "+buying[1].getDisplayName() : ""); } } else - Logger.INFO("Found: "+g.getClass().getName()); + Logger.WARNING("Found: "+g.getClass().getName()); } } } diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java index a2959bb025..3baca10792 100644 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java +++ b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java @@ -60,7 +60,7 @@ public class TradeHandlerAboriginal extends TradeHandlerBase { mOutputs.put(ItemUtils.getSimpleStack(Items.leather, 0)); mOutputs.put(ItemUtils.getSimpleStack(Items.melon_seeds, 0)); mOutputs.put(ItemUtils.getSimpleStack(Items.reeds, 0)); - mInputs.put(ItemUtils.getSimpleStack(Blocks.wooden_door)); + mInputs.put(ItemUtils.getSimpleStack(Items.wooden_door)); mInputs.put(ItemUtils.getSimpleStack(Blocks.log)); mInputs.put(ItemUtils.getSimpleStack(Blocks.log2)); mInputs.put(ItemUtils.getSimpleStack(Blocks.planks)); diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java index 9b75b54cfa..9b66c98be2 100644 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java +++ b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java @@ -20,17 +20,12 @@ public class TradeHandlerTrader extends TradeHandlerBase { @SuppressWarnings("unchecked") @Override public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { - - Logger.INFO("Trying to manipulate trade for villager."); - - //if (villager.getProfession() == 7736) { - recipeList.add(new MerchantRecipe(ItemUtils.getItemStackOfAmountFromOreDict("logWood", 32), ELEMENT.getInstance().IRON.getOre(1))); - recipeList.add(new MerchantRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustRawMeat", 32), ELEMENT.getInstance().COPPER.getOre(1))); - recipeList.add(new MerchantRecipe(ItemUtils.getSimpleStack(Blocks.obsidian, 6), ELEMENT.getInstance().TIN.getOre(1))); - recipeList.add(new MerchantRecipe(ItemUtils.getSimpleStack(Blocks.glowstone, 32), ELEMENT.getInstance().SILICON.getOre(1))); - recipeList.add(new MerchantRecipe(ItemUtils.getSimpleStack(Blocks.piston, 32), ELEMENT.getInstance().ALUMINIUM.getOre(1))); - Collections.shuffle(recipeList); - //} + recipeList.add(new MerchantRecipe(ItemUtils.getItemStackOfAmountFromOreDict("logWood", 32), ELEMENT.getInstance().IRON.getOre(1))); + recipeList.add(new MerchantRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustMeatRaw", 32), ELEMENT.getInstance().COPPER.getOre(1))); + recipeList.add(new MerchantRecipe(ItemUtils.getSimpleStack(Blocks.obsidian, 6), ELEMENT.getInstance().TIN.getOre(1))); + recipeList.add(new MerchantRecipe(ItemUtils.getSimpleStack(Blocks.glowstone, 32), ELEMENT.getInstance().SILICON.getOre(1))); + recipeList.add(new MerchantRecipe(ItemUtils.getSimpleStack(Blocks.piston, 32), ELEMENT.getInstance().ALUMINIUM.getOre(1))); + Collections.shuffle(recipeList); } } |