1 posts
Posted 16 March 2013 - 01:22 PM
ComputerCraft Version Information: 1.5
Description of Bug: When comparing enchanted books, books enchanted with different enchants returns true
Steps to Reproduce Bug: place book with one enchantment in slot one, place book enchanted with another enchantment in slot two and run the following lua code:
turtle.select(1)
turtle.compare(2)
the last line should return false, but it returns true.
8543 posts
Posted 16 March 2013 - 05:09 PM
Split into new topic.
1511 posts
Location
Pennsylvania
Posted 16 March 2013 - 05:45 PM
This is not a bug, it is just the way minecaft stores books' data. Each book has the same id, the turtles compare that, not the NBT data. The id for any enchanted book is 403 so when the turtle compares the two, it will return true.
997 posts
Location
Wellington, New Zealand
Posted 16 March 2013 - 10:15 PM
This is not a bug, it is just the way minecaft stores books' data. Each book has the same id, the turtles compare that, not the NBT data. The id for any enchanted book is 403 so when the turtle compares the two, it will return true.
You're saying the bug "turtle.compareTo() ignores NBT data" isn't a bug because turtle.compareTo() ignores NBT data?
Not sure what your point is here.
7508 posts
Location
Australia
Posted 16 March 2013 - 10:19 PM
This is not a bug, it is just the way minecaft stores books' data. Each book has the same id, the turtles compare that, not the NBT data. The id for any enchanted book is 403 so when the turtle compares the two, it will return true.
You're saying the bug "turtle.compareTo() ignores NBT data" isn't a bug because turtle.compareTo() ignores NBT data?
Not sure what your point is here.
I think he was trying to make the point that it was a design choice not a bug, since it only compares ID not NBT data…
in response to OP, i think you mean damage value, not NBT as a whole… the books have different damage values. if NBT data was compared, well, that would make for some interesting comparisons (not on books, just with some mod items and such)!
2447 posts
Posted 16 March 2013 - 11:43 PM
It isn't a design choice. These things should be comparing NBT.