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
Currently, when you have a wand different than a sword, or are not in creative mode, you can (unwillingly) break blocks while selecting an area. That behaviour is prevented in WorldEdit, although it's easier in there than here.
As a Scarpet app, currently we can't really "cancel" the break event programmatically, as much we can try to place the exact block that was broken, although any side effects, such as other blocks breaking due to lack of support or updates being sent, would not be restored.
In order to do this properly, it would require the implementation of something like gnembon/fabric-carpet#455, where the app could just state that the event has been "cancelled" (fail?/consumed?/not sure if I got that correctly or it would be another request), and nothing would be triggered from there.
Would it be ok to implement the workaround, should we wait until the language allows us to properly cancel the propagation too, or should we keep it as is?
The text was updated successfully, but these errors were encountered:
Actually, an even better* workaround could be disabling Carpet's interactionUpdates rule when the event is fired, then turning it back on at the end of the tick (supposing the event is launched right at the starts, which I think is the case? not checked).
However, that could break horribly, mostly in multiplayer, if other players break things in the same tick where the wand is used, or if the player breaks more than a block a tick, although I think that's not possible without autoclickers? (and would probably use the wand anyway, I guess?).
I agree we should hackfix this until the scarpet language suppports cancelling events (if). I also think that doing it through interactionUpdates is risky, I'd just replace the broken block (if any), and let it be an imperfect solution for stuff like blocks with no support breaking and such.
Currently, when you have a wand different than a sword, or are not in creative mode, you can (unwillingly) break blocks while selecting an area. That behaviour is prevented in WorldEdit, although it's easier in there than here.
As a Scarpet app, currently we can't really "cancel" the break event programmatically, as much we can try to place the exact block that was broken, although any side effects, such as other blocks breaking due to lack of support or updates being sent, would not be restored.
In order to do this properly, it would require the implementation of something like gnembon/fabric-carpet#455, where the app could just state that the event has been "cancelled" (fail?/consumed?/not sure if I got that correctly or it would be another request), and nothing would be triggered from there.
Would it be ok to implement the workaround, should we wait until the language allows us to properly cancel the propagation too, or should we keep it as is?
The text was updated successfully, but these errors were encountered: