Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
James103 opened this issue Feb 28, 2024 · 1 comment

Comments

@James103
Copy link
Contributor

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?

@ch-yx
Copy link
Contributor

ch-yx commented Feb 28, 2024

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)

@James103 James103 changed the title Use a tag to determine the blocks that are not movable with pistons, even with movableBlockEntities Use a tag or predicate to determine the blocks that are not movable with pistons, even with movableBlockEntities Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants