Open mmis1000 opened 6 years ago
As this is a custom packet its probably not entering the phase for capturing inventory changes. I remember having problems with some mods (one was Tinkers Construct I think) going into infinite loops in crafting inventories when canceling the result. @gabizou
We have tried change the action to be scheduled at server thread. But it seems it still not works.
Is this event can be triggered only by normal player action? or it is just another bug?
If this also should not work, is there a way to manually trigger the event from the Inventory Tweaks's side and give sponge a chance to cancel it?
confirmed holding down space and clicking still bypasses any events, tested with a simple
@Listener
public void onEvent(ClickInventoryEvent event) {
logger.error(event.toString());
}
InventoryTweaks-1.63.jar spongeforge-1.12.2-2768-7.1.5-RC3513.jar
Looks like the latest 1.64-dev builds of InventoryTweaks make our events fire correctly.
Still there might be other mods using custom packets to change inventory state.
yes, quark for example https://github.com/SpongePowered/SpongeForge/issues/2553
I am currently running
Issue Description
The
Inventory Tweaks
use a server side mod that calling player.openContainer.slotClick to accelerate sorting.But for unknown reason, it turns out that this method completely bypassed the
ClickEvent
andInverntoryChange
event handlers of sponge plugins and edited the inventory, making cancelling the inventory modify not possible at all.hold space and left click on a item with
Inventory Tweaks
and its server side mod enabled, you will move the item without trigger any sponge eventsAnd this also makes use chest as a custom gui to provide functionalities harder, as other mods may accidentally tear down the whole gui.
Even edit caused by other mods may not be recoverable, At least we should make the changes detectable. Or it will be very annoying.