You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output of /version on my server is: This server is running CraftBukkit version git-Spigot-f6a273b-db10914 (MC: 1.13.1) (Implementing API version 1.13.1-R0.1-SNAPSHOT)
The output of /version denizen on my server is: Denizen version 1.0.3-SNAPSHOT (build 446-DEV)
The issue is:
<context.new_material> does not return the expected outcome. When blocks break because of block updates (like sugar cane, cacti or chorus plants) <context.new_material> returns the block it was before it updated. (I hope I got this right, sometimes I overlook obvious mistakes in my own code).
The text was updated successfully, but these errors were encountered:
Looking through relevant stuff...
Seems to be that new_material is a bit poorly labeled as a context value.
There isn't actually a value in the sourcing Spigot event (BlockPhysicsEvent) that will say 'air' when a cactus breaks if that context doesn't. The value used for new_material is a bit of a generic Material value that can be different things in different situations.
Depending on your preference, you might:
Check if <context.location.below.material.name> == air in the physics event, as if that's true it's likely the cactus is breaking from falling. You'd probably also want to listen to on player breaks cactus:
Or, - wait 1t then check if <context.location.material.name> == air as if that's true, the cactus broke. (Validating by waiting out past the end of the event and checking what happened).
The output of
/version
on my server is: This server is running CraftBukkit version git-Spigot-f6a273b-db10914 (MC: 1.13.1) (Implementing API version 1.13.1-R0.1-SNAPSHOT)The output of
/version denizen
on my server is: Denizen version 1.0.3-SNAPSHOT (build 446-DEV)(If relevant) A link to a paste of a script demonstrating the issue: https://one.denizenscript.com/paste/50444
(This script returns m@cactus when a cactus breaks by updating it: https://one.denizenscript.com/paste/50445)
"/denizen debug -r" outcome:
http://old.mcmonkey.org/paste/50447
The issue is:
<context.new_material> does not return the expected outcome. When blocks break because of block updates (like sugar cane, cacti or chorus plants) <context.new_material> returns the block it was before it updated. (I hope I got this right, sometimes I overlook obvious mistakes in my own code).
The text was updated successfully, but these errors were encountered: