Skip to content

Commit

Permalink
Fix small naming mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauriichan committed Aug 12, 2021
1 parent db16be8 commit 1f6152e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion legacy-1_17-compat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dependency>
<groupId>net.sourcewriters.spigot.rwg</groupId>
<artifactId>legacy-api</artifactId>
<version>${project.version}</version>
<version>1.1.0</version>
</dependency>

<!-- Minecraft -->
Expand Down
2 changes: 1 addition & 1 deletion legacy-1_17_1-compat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dependency>
<groupId>net.sourcewriters.spigot.rwg</groupId>
<artifactId>legacy-api</artifactId>
<version>${project.version}</version>
<version>1.1.0</version>
</dependency>

<!-- Minecraft -->
Expand Down
1 change: 1 addition & 0 deletions legacy-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<version>1.0.0</version>
</parent>
<artifactId>legacy-api</artifactId>
<version>1.1.0</version>

<distributionManagement>
<repository>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Boolean> property = getProperties().find("sync").cast(boolean.class);
default boolean isConversionPossible() {
IProperty<Boolean> property = getProperties().find("data_conversion").cast(boolean.class);
return property.isPresent() ? property.getValue() : false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion legacy-pre1_17-compat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dependency>
<groupId>net.sourcewriters.spigot.rwg</groupId>
<artifactId>legacy-api</artifactId>
<version>${project.version}</version>
<version>1.1.0</version>
</dependency>
</dependencies>
</project>

0 comments on commit 1f6152e

Please sign in to comment.