CommandHelper icon indicating copy to clipboard operation
CommandHelper copied to clipboard

False BlockState default values (also enforced after set_pinv(pinv()) )

Open Nilleke opened this issue 3 years ago • 1 comments

CommandHelper seems to retrieve default BlockState values for unspecified states when at least one state is specified, and enforces them after a set_pinv(pinv()).

Tested on:

CommandHelper-3.3.5-b309 Purpur-1.19.3-b1895


Test item without BlockState:

/give @s bee_nest

This is a normal bee nest without honey level or forced facing direction. pinv() returns:

{meta: null, name: BEE_NEST, qty: 1}

after set_pinv(pinv()) it still returns the same information and the item works the same

Test item with BlockState:

/give @s bee_nest{BlockStateTag:{honey_level:5}}

This places a bee nest with honey level 5 and respects the direction the player is facing. However pinv() returns:

{meta: {blockdata: {block: bee_nest, facing: north, honey_level: 5}, display: null, enchants: {}, flags: {}, flowerlocation: null, lore: null, model: null, modifiers: null, repair: 0}, name: BEE_NEST, qty: 1}

This falsely claims the facing direction is forced to north. After doing set_pinv(pinv()) it still returns the same information but the added default values (like facing: north) are actually enforced, any value that was specified previously (like honey_level) is kept.

Nilleke avatar Jan 26 '23 23:01 Nilleke