Skip to content

Added REPLACEABLE AOEMatchType#5094

Open
Insane96 wants to merge 2 commits into
SlimeKnights:1.18.2from
Insane96:1.18.2-ReplaceableAOEType
Open

Added REPLACEABLE AOEMatchType#5094
Insane96 wants to merge 2 commits into
SlimeKnights:1.18.2from
Insane96:1.18.2-ReplaceableAOEType

Conversation

@Insane96

@Insane96 Insane96 commented Feb 23, 2023

Copy link
Copy Markdown

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
Copy Markdown
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