Skip to content

Commit

Permalink
Patch PolarReader to remove block states before passing to NamespacedID
Browse files Browse the repository at this point in the history
  • Loading branch information
Mac898 authored and mworzala committed Feb 12, 2024
1 parent 4ad3d97 commit 6610395
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/hollowcube/polar/PolarReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ private PolarReader() {}
var blockPalette = buffer.readCollection(STRING).toArray(String[]::new);
if (version <= PolarWorld.VERSION_SHORT_GRASS) {
for (int i = 0; i < blockPalette.length; i++) {
if (NamespaceID.from(blockPalette[i]).path().equals("grass"))
String strippedID = blockPalette[i].split("\\[")[0];
if (NamespaceID.from(strippedID).path().equals("grass"))
blockPalette[i] = "short_grass";
}
}
Expand Down

0 comments on commit 6610395

Please sign in to comment.