Skip to content

Commit

Permalink
fix LocationTag.Highest for 1.15
Browse files Browse the repository at this point in the history
the subtract is no longer needed and is now done internally
  • Loading branch information
mcmonkey4eva committed Mar 26, 2020
1 parent 306afe7 commit 26ec9fc
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -1003,7 +1003,11 @@ public static void registerTags() {
// Returns the location of the highest solid block at the location.
// -->
registerTag("highest", (attribute, object) -> {
return new LocationTag(object.getHighestBlockForTag(attribute).add(0, -1, 0));
Location result = object.getHighestBlockForTag(attribute);
if (NMSHandler.getVersion().isAtMost(NMSVersion.v1_14)) {
result = result.subtract(0, 1, 0);
}
return new LocationTag(result);
});

// <--[tag]
Expand Down

0 comments on commit 26ec9fc

Please sign in to comment.