From 0b2d0fa3322a6d7eff70cb6322191f8313f4eb10 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Fri, 5 Jul 2019 06:14:54 -0700 Subject: [PATCH] Make the last bug fix compatible with 1.13 --- Changelog.txt | 1 + src/main/java/com/gmail/nossr50/util/Misc.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 0f04fd96c..5de3473d8 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,6 +1,7 @@ Version 2.1.95 Fixed a bug preventing Wandering Traders from granting XP + Version 2.1.94 2 new devs have joined the mcMMO team (electronicboy, kashike), bringing the active dev team to 3 including myself! Strings relating to authors of mcMMO have been updated to reflect this Fixed a bug where 2 people using Tree Feller could result in the tree being rejected for being too big diff --git a/src/main/java/com/gmail/nossr50/util/Misc.java b/src/main/java/com/gmail/nossr50/util/Misc.java index 1a17e2727..945b39eef 100644 --- a/src/main/java/com/gmail/nossr50/util/Misc.java +++ b/src/main/java/com/gmail/nossr50/util/Misc.java @@ -67,7 +67,9 @@ public final class Misc { } public static boolean isVillager(Entity entity) { - return (entity instanceof AbstractVillager); + String entityType = entity.getType().toString(); + //This weird code is for 1.13 & 1.14 compatibility + return entityType.equalsIgnoreCase("wandering_trader") || entity instanceof Villager; } public static boolean isNPCIncludingVillagers(Entity entity) {