Fix reflect wrapper MCDataConverter
This commit is contained in:
parent
73d96d0bb7
commit
add5d3bcd7
@ -12,7 +12,7 @@ import static fr.pandacube.lib.util.ThrowableUtil.wrapReflectEx;
|
||||
|
||||
public class MCDataConverter extends ReflectWrapper {
|
||||
public static final ReflectClass<?> REFLECT = wrapEx(() -> Reflect.ofClass("ca.spottedleaf.dataconverter.minecraft.MCDataConverter"));
|
||||
private static final ReflectMethod<?> convertTag = wrapEx(() -> REFLECT.method("convertTag", Component.MAPPING.runtimeClass()));
|
||||
private static final ReflectMethod<?> convertTag = wrapEx(() -> REFLECT.method("convertTag", MCDataType.REFLECT.get(), CompoundTag.MAPPING.runtimeClass(), int.class, int.class));
|
||||
|
||||
public static CompoundTag convertTag(MCDataType type, CompoundTag data, int fromVersion, int toVersion) {
|
||||
return wrap(wrapReflectEx(() -> convertTag.invokeStatic(unwrap(type), unwrap(data), fromVersion, toVersion)), CompoundTag.class);
|
||||
|
Loading…
Reference in New Issue
Block a user