This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Xastabus's profile picture

turtle.compareTo

Started by Xastabus, 13 October 2014 - 11:38 PM
Xastabus #1
Posted 14 October 2014 - 01:38 AM
Hello,
Apparently this "bug" was fixed at some point. I upgraded to ComputerCraft 1.63 and now my armor/tool repairing turtles are clogging up because they can only match identically damaged items. Is there a new way to use compareTo and ignore the NBT value?

Thanks,
Xast.
Lyqyd #2
Posted 14 October 2014 - 01:52 AM
(This topic split from here)

If you upgrade to 1.65, you can use the turtle.getItemDetail function to examine what an item is and make comparisons based on whichever pieces of the data you like. The compare functions cannot ignore any specific item attributes while comparing against others.