aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/plugin
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-10-11 18:14:07 +0100
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-10-11 18:14:07 +0100
commit4a2fa070a2ae91173cf15785c63b4090016323d4 (patch)
tree7a07b317b7b66778869f321da82f95dfee70107f /src/Java/gtPlusPlus/plugin
parent8ca23d37495647bda859bc1821c2551cf8b21bf3 (diff)
downloadGT5-Unofficial-4a2fa070a2ae91173cf15785c63b4090016323d4.tar.gz
GT5-Unofficial-4a2fa070a2ae91173cf15785c63b4090016323d4.tar.bz2
GT5-Unofficial-4a2fa070a2ae91173cf15785c63b4090016323d4.zip
$ Fixed many tiny bugs, found by static code analysis.
$ Fixed Canning handling further. $ Adjusted the Charcoal Pit fix.
Diffstat (limited to 'src/Java/gtPlusPlus/plugin')
-rw-r--r--src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java5
-rw-r--r--src/Java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java7
2 files changed, 7 insertions, 5 deletions
diff --git a/src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java b/src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java
index 4dc5a15b4b..c29aadb16b 100644
--- a/src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java
+++ b/src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java
@@ -70,7 +70,7 @@ public class EntityBaseVillager extends EntityVillager {
@Override
public void readEntityFromNBT(NBTTagCompound aNBT) {
if (aNBT.hasKey("aCustomName")) {
- if (this.getCustomNameTag() != aNBT.getString("aCustomName")) {
+ if (!this.getCustomNameTag().equals(aNBT.getString("aCustomName"))) {
this.setCustomNameTag(aNBT.getString("aCustomName"));
}
}
@@ -202,9 +202,10 @@ public class EntityBaseVillager extends EntityVillager {
protected MerchantRecipeList getBuyingList() {
Field v82191;
- MerchantRecipeList o;
+ MerchantRecipeList o = null;
v82191 = ReflectionUtils.getField(getClass(), "buyingList");
try {
+ if (v82191 != null)
o = (MerchantRecipeList) v82191.get(this);
Logger.WARNING("Is BuyingList Valid? " + (v82191 != null));
return v82191 != null ? o : null;
diff --git a/src/Java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java b/src/Java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java
index 967647cff6..4f9e2954a4 100644
--- a/src/Java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java
+++ b/src/Java/gtPlusPlus/plugin/villagers/entity/EntityNativeAustralian.java
@@ -79,7 +79,7 @@ public class EntityNativeAustralian extends EntityVillager {
@Override
public void readEntityFromNBT(NBTTagCompound aNBT) {
if (aNBT.hasKey("aCustomName")) {
- if (this.getCustomNameTag() != aNBT.getString("aCustomName")) {
+ if (!this.getCustomNameTag().equals(aNBT.getString("aCustomName"))) {
this.setCustomNameTag(aNBT.getString("aCustomName"));
}
}
@@ -105,7 +105,7 @@ public class EntityNativeAustralian extends EntityVillager {
@Override
public void setProfession(int p_70938_1_) {
- super.setProfession(mRoleID);
+ super.setProfession(7738);
}
@Override
@@ -190,9 +190,10 @@ public class EntityNativeAustralian extends EntityVillager {
protected MerchantRecipeList getBuyingList() {
Field v82191;
- MerchantRecipeList o;
+ MerchantRecipeList o = null;
v82191 = ReflectionUtils.getField(getClass(), "buyingList");
try {
+ if (v82191 != null)
o = (MerchantRecipeList) v82191.get(this);
Logger.WARNING("Is BuyingList Valid? " + (v82191 != null));
return v82191 != null ? o : null;