Prepare 1.20.2 full support
- Update some POM files - OBC reflection should not try to parse relocation package version - NMS reflection dependency update
This commit is contained in:
parent
2393352770
commit
92a9afa22c
@ -56,7 +56,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
<version>2.10</version>
|
<version>2.10.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.fabricmc</groupId>
|
<groupId>net.fabricmc</groupId>
|
||||||
<artifactId>mapping-io</artifactId>
|
<artifactId>mapping-io</artifactId>
|
||||||
<version>0.3.0</version>
|
<version>0.5.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -169,7 +169,7 @@ public class NMSReflect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MemoryMappingTree tree = new MemoryMappingTree();
|
MemoryMappingTree tree = new MemoryMappingTree();
|
||||||
MappingReader.read(new InputStreamReader(mappingsInputStream, StandardCharsets.UTF_8), MappingFormat.TINY_2, tree);
|
MappingReader.read(new InputStreamReader(mappingsInputStream, StandardCharsets.UTF_8), MappingFormat.TINY_2_FILE, tree);
|
||||||
|
|
||||||
List<ClassMapping> classes = new ArrayList<>();
|
List<ClassMapping> classes = new ArrayList<>();
|
||||||
for (MappingTree.ClassMapping cls : tree.getClasses()) {
|
for (MappingTree.ClassMapping cls : tree.getClasses()) {
|
||||||
|
@ -10,18 +10,7 @@ import fr.pandacube.lib.reflect.ReflectClass;
|
|||||||
*/
|
*/
|
||||||
public class OBCReflect {
|
public class OBCReflect {
|
||||||
|
|
||||||
private static final String OBC_PACKAGE_PREFIX = "org.bukkit.craftbukkit.";
|
private static final String CRAFTBUKKIT_PACKAGE = Bukkit.getServer().getClass().getPackage().getName();
|
||||||
|
|
||||||
private static final String OBC_PACKAGE_VERSION;
|
|
||||||
|
|
||||||
static {
|
|
||||||
String name = Bukkit.getServer().getClass().getName()
|
|
||||||
.substring(OBC_PACKAGE_PREFIX.length());
|
|
||||||
name = name.substring(0, name.indexOf("."));
|
|
||||||
|
|
||||||
OBC_PACKAGE_VERSION = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the OBC class that has the provided name, wrapped into a {@link ReflectClass}.
|
* Returns the OBC class that has the provided name, wrapped into a {@link ReflectClass}.
|
||||||
@ -31,10 +20,7 @@ public class OBCReflect {
|
|||||||
* @throws ClassNotFoundException if the provided class was not found in {@code OBC} package.
|
* @throws ClassNotFoundException if the provided class was not found in {@code OBC} package.
|
||||||
*/
|
*/
|
||||||
public static ReflectClass<?> ofClass(String obcClass) throws ClassNotFoundException {
|
public static ReflectClass<?> ofClass(String obcClass) throws ClassNotFoundException {
|
||||||
return Reflect.ofClass(OBC_PACKAGE_PREFIX + OBC_PACKAGE_VERSION + "." + obcClass);
|
return Reflect.ofClass(CRAFTBUKKIT_PACKAGE + "." + obcClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
<version>31.1-jre</version> <!-- Match the version imported by Paper API/BungeeCord API if possible -->
|
<version>32.1.2-jre</version> <!-- Match the version imported by Paper API/BungeeCord API if possible -->
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
4
pom.xml
4
pom.xml
@ -56,8 +56,8 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|
||||||
<bungeecord.version>1.20-R0.3-SNAPSHOT</bungeecord.version>
|
<bungeecord.version>1.20-R0.3-SNAPSHOT</bungeecord.version>
|
||||||
<paper.version>1.20.1-R0.1</paper.version>
|
<paper.version>1.20.2-R0.1</paper.version>
|
||||||
<mc.version>1.20.1</mc.version>
|
<mc.version>1.20.2</mc.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
Loading…
Reference in New Issue
Block a user