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

Added REPLACEABLE AOEMatchType #5094

Open
wants to merge 2 commits into
base: 1.18.2
Choose a base branch
from

Conversation

Insane96
Copy link

@Insane96 Insane96 commented Feb 23, 2023

I'm making a modifier to place blocks in the air, and Diyo wanted the placing area to match the tools AOE.

Currently this is not possible due to AOEMatchType fixed to harvestable or non-air blocks (BREAKING or TRANSFORM), and for the mid air placing I need it to match replaceable blocks.

@KnightMiner
Copy link
Member

I feel like hardcoding another match type is the wrong solution. Adding a way for addons to add their own match types is a better approach. I dont believe that file you patched is the only place making use of the match type though.

Look at the modifier hooks for inspiration on how to handle match types, seems like they need a function that maps IToolStackView tool, ItemStack stack, Level world, BlockPos origin to a block position predicate. Might need another function for the other uses of that enum.

@KnightMiner KnightMiner added Enhancement Issue or pull request addresses a change to an existing functional feature 1.18 Issue affects 1.18 labels Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.18 Issue affects 1.18 Enhancement Issue or pull request addresses a change to an existing functional feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants