dmarker addcorner doesn't accept negative Y values
ButterscotchV opened this issue ยท 2 comments
Issue Description: The command /dmarker addcorner
does not accept negative Y values, giving the response of "Bad format: /dmarker addcorner <x> <y> <z> <world>
"
- Dynmap Version: core=3.3-beta-5-657, plugin=3.3-beta-5-657
- Server Version: Paper version git-Paper-177 (MC: 1.18.1)
- Pastebin of Configuration.txt: https://pastebin.com/TSS9w8tM
- Server Host (if applicable): Selfhosted
- Pastebin of crashlogs or other relevant logs: NA
- Other Relevant Data/Screenshots: NA
- Steps to Replicate: Run the
/dmarker addcorner
command with a negative y coordinate (ex./dmarker addcorner -2671 โ64 -336 world
)
[x] I have looked at all other issues and this is not a duplicate
[x] I have been able to replicate this
You're right, that's very odd... I have no idea how that got in there, but it does seem to work when replacing it with a regular dash. Those characters look the exact same in Minecraft's font so I understand why I didn't notice that, but it's weird it showed up. Thanks for looking into it. ๐
Not having any luck reproducing this directly. I can cut/paste the string provided in the example text, but I've also noticed that the Unicode character code of the 'minus' on the 64 is NOT a standard dash (U+002D), but is a 'Mathematical Minus) (U+2212 - https://unicode-table.com/en/2212/). The Java number parser is not accepting this.
Here is a trivial program that demonstrates the limitation in java...
public class test {
public static void main(String[] args) {
System.out.println("-64 with dash character");
Double.parseDouble("-64"); // This works
System.out.println("\u221264 with U+2212 character");
Double.parseDouble("\u221264"); // This doesn't
System.out.println("Never get here");
}
}
Which returns:
-64 with dash character
โ64 with U+2212 character
Exception in thread "main" java.lang.NumberFormatException: For input string: "โ64"
at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.base/java.lang.Double.parseDouble(Double.java:651)
at test.main(test.java:6)