Initial 1.18 update
This commit is contained in:
parent
b8b28bcdc0
commit
1133c3077d
2 changed files with 5 additions and 2 deletions
|
|
@ -35,7 +35,8 @@ public class RCraftingManager {
|
|||
RRegistryMaterials.removeKeysFor(reflection.get(null, "recipes"), plugin);
|
||||
} else if (MinecraftReflectionVersion.MINOR > 12) {
|
||||
Object server = RMinecraftServer.getReflection().invoke(null, "getServer");
|
||||
Object craftingManager = RMinecraftServer.getReflection().invoke(server, "getCraftingManager");
|
||||
String getCraftingManagerMethod = MinecraftReflectionVersion.MINOR >= 18 ? "aC" : "getCraftingManager";
|
||||
Object craftingManager = RMinecraftServer.getReflection().invoke(server, getCraftingManagerMethod);
|
||||
|
||||
Map recipes;
|
||||
if (MinecraftReflectionVersion.MINOR >= 17) {
|
||||
|
|
|
|||
|
|
@ -33,8 +33,10 @@ public class RMinecraftKey {
|
|||
public static String getNameSpace(Object instance) {
|
||||
if (MinecraftReflectionVersion.MINOR <= 13) {
|
||||
return reflection.get(instance, "a");
|
||||
} else if (MinecraftReflectionVersion.MINOR >= 17) {
|
||||
} else if (MinecraftReflectionVersion.MINOR == 17) {
|
||||
return reflection.invoke(instance, "getNamespace");
|
||||
} else if (MinecraftReflectionVersion.MINOR >= 18) {
|
||||
return reflection.invoke(instance, "a");
|
||||
}
|
||||
return reflection.get(instance, "namespace");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue