mojira.dev
MCPE-225746

Adding a custom component with the "onPlayerInteract" event hook to specific block permutations enables block interaction for all permutations

Custom blocks should only be able to be interacted with when a custom component with the “onPlayerInteract“ hook is applied. This means that if the component is applied to specific permutations (making use of the block JSON permutations array) the block should only become interactable when in those permutations.

The Upcoming Creator Features experiment is needed for the attached add-on, but the bug itself still occurs with it disabled.

Steps to reproduce:

  • Apply the attached add-on to a world

  • Place the custom crop block on Farmland using the “Custom Seeds“ item in the creative menu

  • Grow the crop fully by interacting with the block using Bone Meal

Observed results:

  • The crop can still be interacted with when fully grown, despite the custom component not being active.

Expected results:

  • The crop should only be able to be interacted with when not fully grow (when the custom component allowing for Bone Meal interaction is active).

Attachments

Comments 0

No comments.

QuazChick

(Unassigned)

Unconfirmed

Multiple

1.21.110.24 Preview, 1.21.110.22 Preview, 1.21.94 Hotfix, 1.21.100, 1.21.101 Hotfix

Retrieved