From 4a2fa070a2ae91173cf15785c63b4090016323d4 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Fri, 11 Oct 2019 18:14:07 +0100 Subject: $ Fixed many tiny bugs, found by static code analysis. $ Fixed Canning handling further. $ Adjusted the Charcoal Pit fix. --- src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Java/gtPlusPlus/plugin/villagers/entity/EntityBaseVillager.java') 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; -- cgit