Skip to content

Commit

Permalink
catch, allow, and warn about funky cuboidtag input
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 14, 2021
1 parent 9fab852 commit f34e479
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -110,8 +110,13 @@ public static CuboidTag valueOf(String string, TagContext context) {
if (CoreUtilities.toLowerCase(string).startsWith("cu@")) {
string = string.substring("cu@".length());
}
if (string.contains("@")) {
return null;
if (CoreUtilities.contains(string, '@')) {
if (CoreUtilities.contains(string, '|') && string.contains("l@")) {
Debug.echoError("Warning: likely improperly constructed CuboidTag '" + string + "' - use to_cuboid");
}
else {
return null;
}
}
if (CoreUtilities.contains(string, '|')) {
ListTag positions = ListTag.valueOf(string, context);
Expand Down

0 comments on commit f34e479

Please sign in to comment.