mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-18 14:47:49 +01:00
Merge pull request #2875 from webbukkit/revert-2838-v3.0
Revert "Support Mohist"
This commit is contained in:
commit
6292cb774e
@ -60,14 +60,9 @@ public class BukkitVersionHelperCB extends BukkitVersionHelperGeneric {
|
|||||||
Server srv = Bukkit.getServer();
|
Server srv = Bukkit.getServer();
|
||||||
/* Get getHandle() method */
|
/* Get getHandle() method */
|
||||||
try {
|
try {
|
||||||
try {
|
Method m = srv.getClass().getMethod("getHandle");
|
||||||
Class.forName("red.mohist.Mohist");
|
Object scm = m.invoke(srv); /* And use it to get SCM (nms object) */
|
||||||
return "net.minecraft.server.v1_12_R1";
|
return scm.getClass().getPackage().getName();
|
||||||
} catch (Exception x) {
|
|
||||||
Method m = srv.getClass().getMethod("getHandle");
|
|
||||||
Object scm = m.invoke(srv); /* And use it to get SCM (nms object) */
|
|
||||||
return scm.getClass().getPackage().getName();
|
|
||||||
}
|
|
||||||
} catch (Exception x) {
|
} catch (Exception x) {
|
||||||
Log.severe("Error finding net.minecraft.server packages");
|
Log.severe("Error finding net.minecraft.server packages");
|
||||||
return null;
|
return null;
|
||||||
@ -77,11 +72,7 @@ public class BukkitVersionHelperCB extends BukkitVersionHelperGeneric {
|
|||||||
protected void loadNMS() {
|
protected void loadNMS() {
|
||||||
// Get block fields
|
// Get block fields
|
||||||
nmsblock = getNMSClass("net.minecraft.server.Block");
|
nmsblock = getNMSClass("net.minecraft.server.Block");
|
||||||
try {
|
nmsblockarray = getNMSClass("[Lnet.minecraft.server.Block;");
|
||||||
nmsblockarray = getNMSClass("[Lnet.minecraft.block.Block;");
|
|
||||||
} catch (Exception x) {
|
|
||||||
nmsblockarray = getNMSClass("[Lnet.minecraft.server.Block;");
|
|
||||||
}
|
|
||||||
nmsmaterial = getNMSClass("net.minecraft.server.Material");
|
nmsmaterial = getNMSClass("net.minecraft.server.Material");
|
||||||
if (isBlockIdNeeded()) { // Not needed for 1.13+
|
if (isBlockIdNeeded()) { // Not needed for 1.13+
|
||||||
blockbyid = getFieldNoFail(nmsblock, new String[] { "byId" }, nmsblockarray);
|
blockbyid = getFieldNoFail(nmsblock, new String[] { "byId" }, nmsblockarray);
|
||||||
@ -97,11 +88,7 @@ public class BukkitVersionHelperCB extends BukkitVersionHelperGeneric {
|
|||||||
|
|
||||||
/* Set up biomebase fields */
|
/* Set up biomebase fields */
|
||||||
biomebase = getNMSClass("net.minecraft.server.BiomeBase");
|
biomebase = getNMSClass("net.minecraft.server.BiomeBase");
|
||||||
try {
|
biomebasearray = getNMSClass("[Lnet.minecraft.server.BiomeBase;");
|
||||||
biomebasearray = getNMSClass("[Lnet.minecraft.world.biome.Biome;");
|
|
||||||
} catch (Exception x) {
|
|
||||||
biomebasearray = getNMSClass("[Lnet.minecraft.server.BiomeBase;");
|
|
||||||
}
|
|
||||||
biomebaselist = getPrivateFieldNoFail(biomebase, new String[] { "biomes" }, biomebasearray);
|
biomebaselist = getPrivateFieldNoFail(biomebase, new String[] { "biomes" }, biomebasearray);
|
||||||
if ((biomebaselist == null) && isBiomeBaseListNeeded()) {
|
if ((biomebaselist == null) && isBiomeBaseListNeeded()) {
|
||||||
getbiomefunc = getMethodNoFail(biomebase, new String[] { "getBiome" }, new Class[] { int.class, biomebase });
|
getbiomefunc = getMethodNoFail(biomebase, new String[] { "getBiome" }, new Class[] { int.class, biomebase });
|
||||||
|
@ -132,11 +132,7 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {
|
|||||||
cw_gethandle = getMethod(craftworld, new String[] { "getHandle" }, new Class[0]);
|
cw_gethandle = getMethod(craftworld, new String[] { "getHandle" }, new Class[0]);
|
||||||
/* CraftChunkSnapshot */
|
/* CraftChunkSnapshot */
|
||||||
craftchunksnapshot = getOBCClass("org.bukkit.craftbukkit.CraftChunkSnapshot");
|
craftchunksnapshot = getOBCClass("org.bukkit.craftbukkit.CraftChunkSnapshot");
|
||||||
try {
|
biomebasearray = getNMSClass("[Lnet.minecraft.server.BiomeBase;");
|
||||||
biomebasearray = getNMSClass("[Lnet.minecraft.world.biome.Biome;");
|
|
||||||
} catch (Exception x) {
|
|
||||||
biomebasearray = getNMSClass("[Lnet.minecraft.server.BiomeBase;");
|
|
||||||
}
|
|
||||||
ccss_biome = getPrivateFieldNoFail(craftchunksnapshot, new String[] { "biome" }, biomebasearray);
|
ccss_biome = getPrivateFieldNoFail(craftchunksnapshot, new String[] { "biome" }, biomebasearray);
|
||||||
if(ccss_biome == null) {
|
if(ccss_biome == null) {
|
||||||
biomestorage = getNMSClass("net.minecraft.server.BiomeStorage");
|
biomestorage = getNMSClass("net.minecraft.server.BiomeStorage");
|
||||||
|
Loading…
Reference in New Issue
Block a user