diff options
| author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-07-05 20:35:43 +1000 |
|---|---|---|
| committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-07-05 20:35:43 +1000 |
| commit | 3302e20803b5259ae2a8d4cc9e297240f8caf167 (patch) | |
| tree | 8b135d514a32106f148c92a23cbf56bc0f12faec /src/Java/gtPlusPlus/plugin/villagers/trade | |
| parent | 4a9e0f9ded8c4f2ed8a0ba3e1d32724887f6c3be (diff) | |
| download | GT5-Unofficial-3302e20803b5259ae2a8d4cc9e297240f8caf167.tar.gz GT5-Unofficial-3302e20803b5259ae2a8d4cc9e297240f8caf167.tar.bz2 GT5-Unofficial-3302e20803b5259ae2a8d4cc9e297240f8caf167.zip | |
+ Added in a Villager Replacer.
$ More work fixing the recipe system.
$ Fixed Villagers not using the correct custom trades.
% Changed the Industrial sifter requiring exact amounts of in/output busses.
Diffstat (limited to 'src/Java/gtPlusPlus/plugin/villagers/trade')
3 files changed, 23 insertions, 15 deletions
diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java index d85f86ad57..215dc0683b 100644 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java +++ b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java @@ -14,14 +14,14 @@ public class TradeHandlerBanker extends TradeHandlerBase { @SuppressWarnings("unchecked") @Override public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { - if (villager.getProfession() == 7735) { + //if (villager.getProfession() == 7735) { recipeList.add(new MerchantRecipe(CI.electricMotor_LV, CI.electricPiston_LV, CI.robotArm_LV)); recipeList.add(new MerchantRecipe(CI.electricMotor_MV, CI.electricPiston_MV, CI.robotArm_MV)); recipeList.add(new MerchantRecipe(CI.electricMotor_HV, CI.electricPiston_HV, CI.robotArm_HV)); recipeList.add(new MerchantRecipe(CI.electricMotor_EV, CI.electricPiston_EV, CI.robotArm_EV)); recipeList.add(new MerchantRecipe(CI.electricMotor_IV, CI.electricPiston_IV, CI.robotArm_IV)); - Collections.shuffle(recipeList); - } + //Collections.shuffle(recipeList); + //} } } diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java index cc77aa69cf..922316b136 100644 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java +++ b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java @@ -14,14 +14,14 @@ public class TradeHandlerTechnician extends TradeHandlerBase { @SuppressWarnings("unchecked") @Override public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { - if (villager.getProfession() == 7737) { + //if (villager.getProfession() == 7737) { recipeList.add(new MerchantRecipe(CI.machineHull_LV, CI.electricMotor_LV, CI.machineHull_LV)); recipeList.add(new MerchantRecipe(CI.machineHull_MV, CI.electricMotor_MV, CI.machineHull_MV)); recipeList.add(new MerchantRecipe(CI.machineHull_HV, CI.electricMotor_HV, CI.machineHull_HV)); recipeList.add(new MerchantRecipe(CI.machineHull_EV, CI.electricMotor_EV, CI.machineHull_EV)); recipeList.add(new MerchantRecipe(CI.machineHull_IV, CI.electricMotor_IV, CI.machineHull_IV)); - Collections.shuffle(recipeList); - } + //Collections.shuffle(recipeList); + //} } } diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java index 508ecd9e83..9b75b54cfa 100644 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java +++ b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java @@ -3,6 +3,7 @@ package gtPlusPlus.plugin.villagers.trade; import java.util.Collections; import java.util.Random; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.material.ELEMENT; import gtPlusPlus.core.util.minecraft.ItemUtils; import net.minecraft.entity.passive.EntityVillager; @@ -12,17 +13,24 @@ import net.minecraft.village.MerchantRecipeList; public class TradeHandlerTrader extends TradeHandlerBase { + public TradeHandlerTrader() { + Logger.INFO("Created Trade Manager for 'Trader' villager profession type."); + } + @SuppressWarnings("unchecked") @Override public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { - 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); - } + + 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); + //} } - + } |
