#block.canPlace

1 messages · Page 1 of 1 (latest)

dapper kraken
#

Sadly its only for adventure mode

#

wait sorry nvm i thought you mean itemStack.canPlaceOn xd

#

idk i think is like player player place?

#

it doesnt need it just test if it possible for player to place the block there, distance of the real player u can check ur self

quaint pike
#

So imaging this, the block on the location 0, 0, 0 is dirt

const block = world.getDimension("minecraft:overworld").getBlock({ x: 0, y: 0, z: 0 });
block.canPlace(MinecraftBlockTypes.redFlower, Direction.down); //false

It returns false because you can’t place flowers below the dirt

#

This is what i understood

dapper kraken
#

ya

#

but havent tested