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

[1.53][SMP/SSP] turtle.compare() does not detect half slabs placed on top half of the block.

Started by timun, 15 June 2013 - 11:42 PM
timun #1
Posted 16 June 2013 - 01:42 AM
ComputerCraft Version Information: 1.53 Client / 1.53 Server

Description of Bug:
I try to turtle.compare() the block in front and a half slab placed on the top half of the block fails. A half slab placed on the bottom half is compared correctly.

The same is true for turtle.compareDown() and turtle.compareUp().

Steps to Reproduce Bug:
Place half slab on top half of the block space in front of turtle.
Enter lua repl prompt and select slot 1.
Place same half slab block type in slot 1.
Evaluating turtle.compare() returns false.
Lyqyd #2
Posted 17 June 2013 - 01:31 PM
Split into new topic.

This is not really a bug. Top half slabs and bottom half slabs use different metadata, which means that compare() treats them as different things.
timun #3
Posted 18 June 2013 - 03:25 PM
The intent of the compare() is "Detects if the block in front is the same as the one in the selected Slot."
This description does not differentiate between top and bottom placement metadata.

The turtle inventory slots doesn't allow storing the half slab in the top placement either.
Currently, it implicit defaults to bottom placement.

I'd say it's either a bug or the documentation needs to be updated to describe this limitation.
Cloudy #4
Posted 18 June 2013 - 09:57 PM
The documentation doesn't need to be updated to reflect the limitation. The limitation just needs to be worked on (which is planned).
timun #5
Posted 19 June 2013 - 04:01 PM
That's good to know.