From 1b8f4417128d960529c6b4139bada11fea64ca7a Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Mon, 15 May 2017 21:35:27 -0500 Subject: [PATCH] Add 1.12 support --- .../java/org/dynmap/bukkit/BukkitVersionHelperCB.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/dynmap/bukkit/BukkitVersionHelperCB.java b/src/main/java/org/dynmap/bukkit/BukkitVersionHelperCB.java index 30c29d8d..2e21a7e1 100644 --- a/src/main/java/org/dynmap/bukkit/BukkitVersionHelperCB.java +++ b/src/main/java/org/dynmap/bukkit/BukkitVersionHelperCB.java @@ -81,8 +81,14 @@ public class BukkitVersionHelperCB extends BukkitVersionHelperGeneric { if (biomebaselist == null) { getbiomebyid = getMethod(biomebase, new String[] { "a" }, new Class[] { int.class} ); } - biomebasetemp = getPrivateField(biomebase, new String[] { "temperature", "F", "C" }, float.class); - biomebasehumi = getPrivateField(biomebase, new String[] { "humidity", "G", "D" }, float.class); + biomebasetemp = getPrivateFieldNoFail(biomebase, new String[] { "B" }, float.class); + if (biomebasetemp != null) { + biomebasehumi = getPrivateField(biomebase, new String[] { "C" }, float.class); + } + else { + biomebasetemp = getPrivateField(biomebase, new String[] { "temperature", "F", "C" }, float.class); + biomebasehumi = getPrivateField(biomebase, new String[] { "humidity", "G", "D" }, float.class); + } biomebaseidstring = getPrivateField(biomebase, new String[] { "y", "af", "ah", "z" }, String.class); biomebaseid = getFieldNoFail(biomebase, new String[] { "id" }, int.class); if (biomebaseid == null) {