Skip to content

Commit

Permalink
Fixed detection of tile entities in schematics in 1.12 (#1702)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Apr 28, 2023
1 parent 83fbaa9 commit b483558
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -76,7 +76,7 @@ public void doPrePlace(Island island) {
this.tileEntityData = new CompoundTag(originalTileEntity);
String id = this.tileEntityData.getString("id");

if (id.equalsIgnoreCase(ServerVersion.isEquals(ServerVersion.v1_8) ? "Sign" : "minecraft:sign")) {
if (id.equalsIgnoreCase(ServerVersion.isLegacy() ? "Sign" : "minecraft:sign")) {
boolean needSignFormat = false;
for (int i = 1; i <= 4; i++) {
boolean isDefaultSignLine = false;
Expand All @@ -101,7 +101,7 @@ public void doPrePlace(Island island) {
}
if (needSignFormat)
this.tileEntityData.setByte("SSB.HasSignLines", (byte) 1);
} else if (id.equalsIgnoreCase(ServerVersion.isEquals(ServerVersion.v1_8) ? "Chest" : "minecraft:chest")) {
} else if (id.equalsIgnoreCase(ServerVersion.isLegacy() ? "Chest" : "minecraft:chest")) {
if (plugin.getSettings().getDefaultContainers().isEnabled()) {
String inventoryType = this.tileEntityData.getString("inventoryType");
if (inventoryType != null) {
Expand Down

0 comments on commit b483558

Please sign in to comment.