aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/plugin
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2018-07-06 23:49:27 +1000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2018-07-06 23:49:27 +1000
commit0d30becbc219fc2c86234e84dae306276dafe4c6 (patch)
tree8761781cdddb6dcc54f37a7fe66311c2e29c88c3 /src/Java/gtPlusPlus/plugin
parentc37b091b581a838c49a63911d2cda6324d029e10 (diff)
downloadGT5-Unofficial-0d30becbc219fc2c86234e84dae306276dafe4c6.tar.gz
GT5-Unofficial-0d30becbc219fc2c86234e84dae306276dafe4c6.tar.bz2
GT5-Unofficial-0d30becbc219fc2c86234e84dae306276dafe4c6.zip
+ Added a new Dimension, Australia.
% Stopped Custom Villagers spawning as professions that aren't custom. % Trade improvements for some Villagers. $ Fixed a bug in AutoMap mapping to internal name map.
Diffstat (limited to 'src/Java/gtPlusPlus/plugin')
-rw-r--r--src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java21
-rw-r--r--src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerAboriginal.java2
-rw-r--r--src/Java/gtPlusPlus/plugin/villagers/trade/TradeHandlerTrader.java17
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);
}
}