mojira.dev
MCPE-98652

Incorrect ID for wood

The item data values for wood seems to be wrong, for some reason when trying to give yourself a block of wood with the data value of 6 and 7, it gives you a regular oak wood/bark block. I'm assuming it considers it an invalid value and defaults it to 0 as it does when you get the value wrong. Is this a bug or is there a reason that 6 and 7 are skipped and it just starts at 8.

I've noticed this error since 1.16.10.

 

If you need it, the commands are:

/give @s wood 1 6

/give @s wood 1 7

and it defaults to

/give @s wood 1 0

for some reason.

Comments 1

As shown on the wiki page, the valid data values for Wood in Bedrock are 0–5 for unstripped and 8–13. for stripped wood blocks. Commands don't always substitute a valid data value when you specify an undefined one, but apparently they do for wood.

Probably the reason for skipping 6 and 7 is that in their binary representations, corresponding pairs from the sets 0–5 and 8–13 have the same value in their low order 3 bits (which define the wood species) and differ only in their 4th bit. This enables the code to test just that one bit to decide whether to use the unstripped or stripped texture for the block, regardless of which species of wood it is. When combined with a suitable arrangement of all the textures, this is faster than testing each of the values individually to select the right one.

As this is by design in Bedrock, I am closing this report as Working As Intended.

EuphoricLynx179

(Unassigned)

Unconfirmed

iOS

iOS 11.4

command, data-values, give, wood

1.16.20

Retrieved