diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-07-02 00:36:10 +1000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-07-02 00:36:10 +1000 |
commit | 81360a320daf83530cc9260068e13111759d2212 (patch) | |
tree | 0db5bdb7fa09fd91a8dfc8b43801daf5a2faf53f /src/Java/gtPlusPlus/plugin/villagers/trade | |
parent | afa03ba1b0475ad6b2caeeb1af6f7ed2f8a76e0a (diff) | |
download | GT5-Unofficial-81360a320daf83530cc9260068e13111759d2212.tar.gz GT5-Unofficial-81360a320daf83530cc9260068e13111759d2212.tar.bz2 GT5-Unofficial-81360a320daf83530cc9260068e13111759d2212.zip |
% Hopefully improved recipe loading by several factors.
% Re-arranged spawner code during loading.
$ Hopefully recipe Creative Tabs issues.
$ Fixed profession of one of the new villagers.
Diffstat (limited to 'src/Java/gtPlusPlus/plugin/villagers/trade')
3 files changed, 20 insertions, 14 deletions
diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java index 1b08d90978..d85f86ad57 100644 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java +++ b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerBanker.java @@ -14,12 +14,14 @@ public class TradeHandlerBanker extends TradeHandlerBase { @SuppressWarnings("unchecked") @Override public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { - 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); + 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); + } } } diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java index 9d27962f22..cc77aa69cf 100644 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java +++ b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTechnician.java @@ -14,12 +14,14 @@ public class TradeHandlerTechnician extends TradeHandlerBase { @SuppressWarnings("unchecked") @Override public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { - 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); + 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); + } } - + } diff --git a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java index 885c0400d8..508ecd9e83 100644 --- a/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java +++ b/src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java @@ -15,12 +15,14 @@ public class TradeHandlerTrader extends TradeHandlerBase { @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); + Collections.shuffle(recipeList); + } } } |