From 1f6152e51cd0a8f92a15ccda8ea0c67e60c59f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Endre=C3=9F?= Date: Thu, 12 Aug 2021 18:50:48 +0200 Subject: [PATCH] Fix small naming mistake --- legacy-1_17-compat/pom.xml | 2 +- legacy-1_17_1-compat/pom.xml | 2 +- legacy-api/pom.xml | 1 + .../spigot/rwg/legacy/api/block/IBlockData.java | 8 ++++---- .../rwg/legacy/api/block/impl/DefaultMinecraftParser.java | 2 +- legacy-pre1_17-compat/pom.xml | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/legacy-1_17-compat/pom.xml b/legacy-1_17-compat/pom.xml index c9bd3c2..005b505 100644 --- a/legacy-1_17-compat/pom.xml +++ b/legacy-1_17-compat/pom.xml @@ -13,7 +13,7 @@ net.sourcewriters.spigot.rwg legacy-api - ${project.version} + 1.1.0 diff --git a/legacy-1_17_1-compat/pom.xml b/legacy-1_17_1-compat/pom.xml index aafe8ef..79866a8 100644 --- a/legacy-1_17_1-compat/pom.xml +++ b/legacy-1_17_1-compat/pom.xml @@ -13,7 +13,7 @@ net.sourcewriters.spigot.rwg legacy-api - ${project.version} + 1.1.0 diff --git a/legacy-api/pom.xml b/legacy-api/pom.xml index 63559e1..3d7ed6b 100644 --- a/legacy-api/pom.xml +++ b/legacy-api/pom.xml @@ -8,6 +8,7 @@ 1.0.0 legacy-api + 1.1.0 diff --git a/legacy-api/src/main/java/net/sourcewriters/spigot/rwg/legacy/api/block/IBlockData.java b/legacy-api/src/main/java/net/sourcewriters/spigot/rwg/legacy/api/block/IBlockData.java index 4dcc3d0..fa0c938 100644 --- a/legacy-api/src/main/java/net/sourcewriters/spigot/rwg/legacy/api/block/IBlockData.java +++ b/legacy-api/src/main/java/net/sourcewriters/spigot/rwg/legacy/api/block/IBlockData.java @@ -37,13 +37,13 @@ default boolean isMinecraft() { return getNamespace().equalsIgnoreCase("minecraft"); } - default IBlockData setSyncNeeded(boolean state) { - getProperties().set(IProperty.of("sync", true)); + default IBlockData setConversionPossible(boolean state) { + getProperties().set(IProperty.of("data_conversion", state)); return this; } - default boolean isSyncNeeded() { - IProperty property = getProperties().find("sync").cast(boolean.class); + default boolean isConversionPossible() { + IProperty property = getProperties().find("data_conversion").cast(boolean.class); return property.isPresent() ? property.getValue() : false; } diff --git a/legacy-api/src/main/java/net/sourcewriters/spigot/rwg/legacy/api/block/impl/DefaultMinecraftParser.java b/legacy-api/src/main/java/net/sourcewriters/spigot/rwg/legacy/api/block/impl/DefaultMinecraftParser.java index 2c77948..0e7b476 100644 --- a/legacy-api/src/main/java/net/sourcewriters/spigot/rwg/legacy/api/block/impl/DefaultMinecraftParser.java +++ b/legacy-api/src/main/java/net/sourcewriters/spigot/rwg/legacy/api/block/impl/DefaultMinecraftParser.java @@ -28,7 +28,7 @@ public IBlockData parse(IBlockAccess access, NbtCompound compound) { builder.append(key).append('=').append(states.getString(key)).append(','); } String state = builder.substring(0, builder.length() - 1) + ']'; - IBlockData data = access.dataOf("minecraft:" + id + state); + IBlockData data = access.dataOf("minecraft:" + id + state).setConversionPossible(true); if (data == null || !compound.hasKey("properties", NbtType.COMPOUND)) { return data; } diff --git a/legacy-pre1_17-compat/pom.xml b/legacy-pre1_17-compat/pom.xml index 1ffb087..ca3c6d0 100644 --- a/legacy-pre1_17-compat/pom.xml +++ b/legacy-pre1_17-compat/pom.xml @@ -13,7 +13,7 @@ net.sourcewriters.spigot.rwg legacy-api - ${project.version} + 1.1.0 \ No newline at end of file