diff --git a/plugin/src/main/java/me/libraryaddict/disguise/utilities/params/types/custom/ParamInfoWrappedBlockData.java b/plugin/src/main/java/me/libraryaddict/disguise/utilities/params/types/custom/ParamInfoWrappedBlockData.java index 88f08099..3587dc05 100644 --- a/plugin/src/main/java/me/libraryaddict/disguise/utilities/params/types/custom/ParamInfoWrappedBlockData.java +++ b/plugin/src/main/java/me/libraryaddict/disguise/utilities/params/types/custom/ParamInfoWrappedBlockData.java @@ -33,7 +33,7 @@ public class ParamInfoWrappedBlockData extends ParamInfo { @RequiredArgsConstructor @Getter private static class WrappedData { - private final LinkedHashMap data; + private final Map data; private final WrappedBlockState block; private final String blockName; @@ -52,6 +52,7 @@ public class ParamInfoWrappedBlockData extends ParamInfo { private final List defaultBlockStates = new ArrayList<>(); private final Method methodGlobalIdNoCache; + private final Method cloneBlockstate; @SneakyThrows public ParamInfoWrappedBlockData(Class paramClass, String name, String description) { @@ -65,6 +66,8 @@ public class ParamInfoWrappedBlockData extends ParamInfo { // If this breaks in the future, I'll probably have a better idea on how to do things methodGlobalIdNoCache = WrappedBlockState.class.getDeclaredMethod("getGlobalIdNoCache"); methodGlobalIdNoCache.setAccessible(true); + cloneBlockstate = WrappedBlockState.class.getDeclaredMethod("checkIfCloneNeeded"); + cloneBlockstate.setAccessible(true); } @SneakyThrows @@ -304,6 +307,7 @@ public class ParamInfoWrappedBlockData extends ParamInfo { } WrappedBlockState blockState = bData.getBlock().clone(); + cloneBlockstate.invoke(blockState); for (int i = 1; i < parseSplit.size() - 1; i++) { // This is ensured key=value diff --git a/pom.xml b/pom.xml index 14fe3ac8..732355ec 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ UTF-8 1.18.32 - 2.3.0 + 2.3.1-SNAPSHOT 1.20.6-R0.1-SNAPSHOT 4.13.2 5.9.3 @@ -43,8 +43,8 @@ true - com.github.retrooper.packetevents - spigot + com.github.retrooper + packetevents-spigot true compile @@ -73,8 +73,8 @@ - com.github.retrooper.packetevents - spigot + com.github.retrooper + packetevents-spigot ${packetevents.version} provided @@ -124,6 +124,10 @@ codemc-releases https://repo.codemc.io/repository/maven-releases/ + + codemc-snapshots + https://repo.codemc.io/repository/maven-snapshots/ +