@@ -15,7 +15,7 @@ public final class ApiVersion implements Comparable<ApiVersion> {
|
||||
|
||||
static {
|
||||
versions = new HashMap<>();
|
||||
CURRENT = getOrCreateVersion("1.20.6");
|
||||
CURRENT = getOrCreateVersion("1.21");
|
||||
FLATTENING = getOrCreateVersion("1.13");
|
||||
FIELD_NAME_PARITY = getOrCreateVersion("1.20.5");
|
||||
NONE = getOrCreateVersion("none");
|
||||
|
||||
@@ -23,6 +23,7 @@ import joptsimple.OptionSpec;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.legacy.FieldRename;
|
||||
import org.bukkit.craftbukkit.legacy.MaterialRerouting;
|
||||
import org.bukkit.craftbukkit.legacy.MethodRerouting;
|
||||
import org.bukkit.craftbukkit.legacy.reroute.RerouteArgument;
|
||||
import org.bukkit.craftbukkit.legacy.reroute.RerouteBuilder;
|
||||
import org.bukkit.craftbukkit.legacy.reroute.RerouteMethodData;
|
||||
@@ -76,6 +77,7 @@ public class Commodore {
|
||||
public static final List<Map<String, RerouteMethodData>> REROUTES = new ArrayList<>(); // Only used for testing
|
||||
private static final Map<String, RerouteMethodData> FIELD_RENAME_METHOD_REROUTE = createReroutes(FieldRename.class);
|
||||
private static final Map<String, RerouteMethodData> MATERIAL_METHOD_REROUTE = createReroutes(MaterialRerouting.class);
|
||||
private static final Map<String, RerouteMethodData> METHOD_REROUTE = createReroutes(MethodRerouting.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
OptionParser parser = new OptionParser();
|
||||
@@ -282,6 +284,9 @@ public class Commodore {
|
||||
if (checkReroute(visitor, FIELD_RENAME_METHOD_REROUTE, opcode, owner, name, desc, samMethodType, instantiatedMethodType)) {
|
||||
return;
|
||||
}
|
||||
if (checkReroute(visitor, METHOD_REROUTE, opcode, owner, name, desc, samMethodType, instantiatedMethodType)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// SPIGOT-4496
|
||||
if (owner.equals("org/bukkit/map/MapView") && name.equals("getId") && desc.equals("()S")) {
|
||||
|
||||
@@ -230,7 +230,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
* @return string
|
||||
*/
|
||||
public String getMappingsVersion() {
|
||||
return "ee13f98a43b9c5abffdcc0bb24154460";
|
||||
return "229d7afc75b70a6c388337687ac4da1f";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,7 +17,7 @@ public final class CraftNamespacedKey {
|
||||
}
|
||||
|
||||
public static NamespacedKey fromString(String string) {
|
||||
return fromMinecraft(new MinecraftKey(string));
|
||||
return fromMinecraft(MinecraftKey.parse(string));
|
||||
}
|
||||
|
||||
public static NamespacedKey fromMinecraft(MinecraftKey minecraft) {
|
||||
@@ -25,6 +25,6 @@ public final class CraftNamespacedKey {
|
||||
}
|
||||
|
||||
public static MinecraftKey toMinecraft(NamespacedKey key) {
|
||||
return new MinecraftKey(key.getNamespace(), key.getKey());
|
||||
return MinecraftKey.fromNamespaceAndPath(key.getNamespace(), key.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user