Issue storing integer values of look vector in NBT data motion vector
mathgeniuszach opened this issue ยท 8 comments
Can you try using the floating point version 0.0d
instead of the integer 0
when storing to NBT?
(It could be that Scarpet is casting the zeroes here to an integer data type instead of leaving them as Double
s)
I don't have physical control over the 0 exactly, so unfortunately I cannot do that. This is the line of code that's wrong, could it be that the "wspeed" value being an integer is causing this issue?
wprojectile_tag:'Motion' = (e~'look') * wspeed;
Do you get the same error if you replace the above line with the following (which assumes wspeed is 1
)?
wprojectile_tag:'Motion' = (e~'look')
If you don't get the error, then it is likely caused by wspeed
being an integer.
As a workaround, can you try filtering out those zeroes and replacing them with a really small floating point number (like 0.000000001)?
Seems to actually occur when any of the three values are integer values, not just zero.
its all intended - and its a restriction of the NBT tags to store only one type in a list. In newer parts of MC points are stored as maps like {X:...,Y:...,Z:...}
so its not a problem.
To do it properly, pass a string as value: