Skip to content

Allow blocks to define that they are only selectable when item can be placed on it#2983

Open
DellieDelta wants to merge 2 commits intoPixelGuys:masterfrom
DellieDelta:remove-fluid-case-from-block-select
Open

Allow blocks to define that they are only selectable when item can be placed on it#2983
DellieDelta wants to merge 2 commits intoPixelGuys:masterfrom
DellieDelta:remove-fluid-case-from-block-select

Conversation

@DellieDelta
Copy link
Copy Markdown
Contributor

@DellieDelta DellieDelta commented Apr 26, 2026

To remove the .fluid case in item selection, preparation for #627

Adds the item field .placementTags and the block selectionRule .placeable

It's a simple version for now (selection happens if a placementTag overlaps with a block tag), but it can be changed in the future to some kind of condition checking. Like replacing it with .placementConstraints (like tagOverlap, onTop, onBottom), which can work similarly to .selectionRule. To get closer to fixing #2491

I'll also make it possible separately to define multiple selectionRules per block in #2987, to make both the selectionRules .toolEffective and .placeable possible on the same block, in preparation for adding buckets

I couldn't pick block as parameter name for isPlaceableOn() because block() is already defined. So I picked targetedBlock as parameter name instead

@DellieDelta DellieDelta force-pushed the remove-fluid-case-from-block-select branch from 9783718 to 7272d0e Compare April 27, 2026 13:51
@DellieDelta DellieDelta marked this pull request as ready for review April 27, 2026 13:57
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

Successfully merging this pull request may close these issues.

1 participant