As an add-on creator that uses scripting API (@minecraft/server
module), I have observed and found an inconsistency in the afterEvents.playerInteractWithBlock event.
I will compare the afterEvents.playerInteractWithBlock
event and the beforeEvents.playerInteractWithBlock
event based on my previous observations:
Ways afterEvents.playerInteractWithBlock event is triggered:
the event is triggered after placing any block or entity.
the event is also triggered after an interactive block is successfully interacted with (like
minecraft:crop
blocks).
Ways beforeEvents.playerInteractWithBlock
event is triggered:
same as
afterEvents.playerInteractWithBlock
event but before doing itand also the event is triggered before interacting (touching the block by clicking on it) with an interactive or passive block
The beforeEvents.playerInteractWithBlock
event can be triggered before the player touches an interactive or a passive block by clicking on it(because it is considered as an interaction), i expected that afterEvents.playerInteractWithBlock would also be triggered like that, but why the event is not triggered after the player interacting with a passive block too and is only triggered after successfully interacting with an interactive block.
One of the impacts that other creators may experience is not being able to interact with blocks or change related objects, playerInteractWithBlockAfterEvents
is the only way to do that because playerInteractWithBlockBeforeEvents
has limited privileges.
so that needs to be fixed :)
Attachments
Comments 1
