Carpet

Carpet

2M Downloads

Use a tag or predicate to determine the blocks that are not movable with pistons, even with `movableBlockEntities`

James103 opened this issue ยท 1 comments

commented

Currently, the list of non-movable block entities is hard-coded, as shown below:

return block != Blocks.ENDER_CHEST && block != Blocks.ENCHANTING_TABLE &&
block != Blocks.END_GATEWAY && block != Blocks.END_PORTAL && block != Blocks.MOVING_PISTON &&
block != Blocks.SPAWNER;

Would it be possible to take that list, put it in a tag, and make movableBlockEntities use that tag when determining whether or not to let that block entity move?

commented

maybe a Predicate (https://minecraft.wiki/w/Predicate) is better. you can write blockstates inside it, but block tag can only have block ids.
i m thinking using a special predicate __scarpet:piston_movable is considerable.
i use this name is because that __scarpet_marker is a special name already used by this mod.(here)