Skip to content

Let blacklisted foods perform default behavior#5

Open
Tidy-Bear wants to merge 1 commit intosuppergerrie2:masterfrom
Tidy-Bear:dev/ctidy
Open

Let blacklisted foods perform default behavior#5
Tidy-Bear wants to merge 1 commit intosuppergerrie2:masterfrom
Tidy-Bear:dev/ctidy

Conversation

@Tidy-Bear
Copy link
Copy Markdown

Description

If the food does not meet the criteria, do nothing and execute the default behavior instead of directly canceling the event.

Combined with the configuration file, this can solve issues such as #3 and #4, at the cost that these items cannot be consumed when the hunger value is full.

Personal idea: Using mixin again maybe better?
Inject into MultiPlayerGameMode#useItem(Player, InteractionHand) and ServerPlayerGameMode#useItem(ServerPlayer, Level, ItemStack, InteractionHand), after calling ItemStack#use(Level, Player, InteractionHand), decide whether to trigger mod's logic based on the returned InteractionResult.

Closes

Close #3
Close #4

…ull.

Signed-off-by: Tidy-Bear <ChenTidyBear@outlook.com>
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.

Conflict issue with "Cobblemon" mod eatable item Conflict problem with "Spice of Life" MOD

1 participant