aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/plugin/villagers/entity
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/villagers/entity
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/villagers/entity')
-rw-r--r--src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java21
1 files changed, 14 insertions, 7 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());
}
}
}