Getting sign lines from block break event returns null #2416
Labels
status: pr pending
A PR was opened to fix this issue
system: data
type: bug
Something isn't working
version: 1.12 (u)
API: 7 (unsupported since May 21st 2021)
In a break block event, I try to get the data of a sign, I check if its a wall sign, it is, so it continues, pastes all of the sign data into console:
[13:19:50 WARN] [test]: {"ContentVersion":1,"WorldUuid":"0e8d1aa1-f7db-411b-b732-7027b0444aa9","Position":{"X":549,"Y":82,"Z":-45},"BlockState":{"ContentVersion":2,"BlockState":"minecraft:wall_sign[facing=south]"},"UnsafeData":{"x":549,"Text4":"{\"text\":\"defutyh\"}","y":82,"Text3":"{\"text\":\"dirt 10\"}","z":-45,"Text2":"{\"text\":\"stone 1\"}","id":"minecraft:sign","Text1":"{\"text\":\"[Shop]\"}"}}
Yet when I try to retrieve the data using keys, it gives a no such element exception. I would expect it to return the first sign line to console.
To reproduce:
Add this code to the block break event listener,
Go into the server and break a sign, should get an error in console.
SpongeVanilla 1.12.2
The text was updated successfully, but these errors were encountered: