Fix warnings and stuff
This commit is contained in:
@@ -404,8 +404,8 @@ public class NMSReflect {
|
||||
private void printHTML(PrintStream out) {
|
||||
String modifiersHTML = classModifiersToHTML(runtimeClass());
|
||||
out.println("<tr id='c" + id + "'><th>" + modifiersHTML + "</th><th>" + nameToHTML(true) + "</th><th>" + nameToHTML(false) + "</th></tr>");
|
||||
fieldsByObf.values().stream().filter(mm -> mm.isStatic()).forEach(f -> f.printHTML(out));
|
||||
methodsByObf.values().stream().filter(mm -> mm.isStatic()).forEach(m -> m.printHTML(out));
|
||||
fieldsByObf.values().stream().filter(MemberMapping::isStatic).forEach(f -> f.printHTML(out));
|
||||
methodsByObf.values().stream().filter(MemberMapping::isStatic).forEach(m -> m.printHTML(out));
|
||||
printConstructorsHTML(out);
|
||||
fieldsByObf.values().stream().filter(mm -> !mm.isStatic()).forEach(f -> f.printHTML(out));
|
||||
methodsByObf.values().stream().filter(mm -> !mm.isStatic()).forEach(m -> m.printHTML(out));
|
||||
|
@@ -54,10 +54,6 @@ import fr.pandacube.lib.paper.reflect.NMSReflect.ClassMapping;
|
||||
return cl;
|
||||
}
|
||||
|
||||
public NMSTypeWrapper arrayType() {
|
||||
return new NMSTypeWrapper(type, arrayDepth + 1);
|
||||
}
|
||||
|
||||
/* package */ static NMSTypeWrapper of(Class<?> cl) {
|
||||
int arrayDepth = 0;
|
||||
while (cl.isArray()) {
|
||||
|
@@ -65,6 +65,9 @@ public class CompoundTag extends ReflectWrapper implements Tag {
|
||||
public void putByteArray(String key, byte[] value) {
|
||||
wrapReflectEx(() -> putByteArray.invoke(__getRuntimeInstance(), key, value));
|
||||
}
|
||||
public void putByteArray(String key, List<Byte> value) {
|
||||
wrapReflectEx(() -> putByteArray_List.invoke(__getRuntimeInstance(), key, value));
|
||||
}
|
||||
public void putDouble(String key, double value) {
|
||||
wrapReflectEx(() -> putDouble.invoke(__getRuntimeInstance(), key, value));
|
||||
}
|
||||
@@ -77,6 +80,9 @@ public class CompoundTag extends ReflectWrapper implements Tag {
|
||||
public void putIntArray(String key, int[] value) {
|
||||
wrapReflectEx(() -> putIntArray.invoke(__getRuntimeInstance(), key, value));
|
||||
}
|
||||
public void putIntArray(String key, List<Integer> value) {
|
||||
wrapReflectEx(() -> putIntArray_List.invoke(__getRuntimeInstance(), key, value));
|
||||
}
|
||||
public void putString(String key, String value) {
|
||||
wrapReflectEx(() -> putString.invoke(__getRuntimeInstance(), key, value));
|
||||
}
|
||||
@@ -89,6 +95,9 @@ public class CompoundTag extends ReflectWrapper implements Tag {
|
||||
public void putLongArray(String key, long[] value) {
|
||||
wrapReflectEx(() -> putLongArray.invoke(__getRuntimeInstance(), key, value));
|
||||
}
|
||||
public void putLongArray(String key, List<Long> value) {
|
||||
wrapReflectEx(() -> putLongArray_List.invoke(__getRuntimeInstance(), key, value));
|
||||
}
|
||||
public void putShort(String key, short value) {
|
||||
wrapReflectEx(() -> putShort.invoke(__getRuntimeInstance(), key, value));
|
||||
}
|
||||
|
@@ -13,7 +13,6 @@ import static fr.pandacube.lib.util.ThrowableUtil.wrapReflectEx;
|
||||
|
||||
public class ChunkStorage extends ReflectWrapper {
|
||||
public static final NMSReflect.ClassMapping MAPPING = wrapEx(() -> NMSReflect.mojClass("net.minecraft.world.level.chunk.storage.ChunkStorage"));
|
||||
private static final Reflect.ReflectMethod<?> read = wrapEx(() -> MAPPING.mojMethod("read", ChunkPos.MAPPING));
|
||||
private static final Reflect.ReflectMethod<?> readSync = wrapEx(() -> MAPPING.runtimeReflect().method("readSync", ChunkPos.MAPPING.runtimeReflect().get())); // spigot/paper method
|
||||
|
||||
public CompoundTag readSync(ChunkPos pos) {
|
||||
|
Reference in New Issue
Block a user