In API8/9 the PhaseTracker is currently not capturing a few inventory changes ca…using the following warning and stacktrace
```
[Server thread/WARN] [sponge]: Logged slot transactions without event! 1 net.minecraft.world.inventory.InventoryMenu
java.lang.Exception:
at org.spongepowered.common.event.tracking.context.transaction.inventory.ContainerBasedTransaction.generateEvent(ContainerBasedTransaction.java:167) ~[?:?]
at org.spongepowered.common.event.tracking.context.transaction.inventory.ContainerSlotTransaction.generateEvent(ContainerSlotTransaction.java:34) ~[?:?]
at org.spongepowered.common.event.tracking.context.transaction.TransactionalCaptureSupplier.generateEventForTransaction(TransactionalCaptureSupplier.java:298) ~[?:?]
at org.spongepowered.common.event.tracking.context.transaction.TransactionalCaptureSupplier.batchTransactions(TransactionalCaptureSupplier.java:235) ~[?:?]
...
```
For Inventory events to fire we need to start a Transaction for it.
A few reported cases:
https://github.com/SpongePowered/Sponge/issues/3653 (keep inventory)
```
[Server thread/WARN] [sponge]: Logged slot transactions without event! 1 net.minecraft.world.inventory.InventoryMenu
java.lang.Exception:
at org.spongepowered.common.event.tracking.context.transaction.inventory.ContainerBasedTransaction.generateEvent(ContainerBasedTransaction.java:167) ~[ContainerBasedTransaction.class:1.16.5-8.0.0-RC1095]
at org.spongepowered.common.event.tracking.context.transaction.inventory.ContainerSlotTransaction.generateEvent(ContainerSlotTransaction.java:34) ~[ContainerSlotTransaction.class:1.16.5-8.0.0-RC1095]
at org.spongepowered.common.event.tracking.context.transaction.TransactionalCaptureSupplier.generateEventForTransaction(TransactionalCaptureSupplier.java:298) ~[TransactionalCaptureSupplier.class:1.16.5-8.0.0-RC1095]
at org.spongepowered.common.event.tracking.context.transaction.TransactionalCaptureSupplier.batchTransactions(TransactionalCaptureSupplier.java:235) ~[TransactionalCaptureSupplier.class:1.16.5-8.0.0-RC1095]
at org.spongepowered.common.event.tracking.context.transaction.TransactionalCaptureSupplier.processTransactions(TransactionalCaptureSupplier.java:172) ~[TransactionalCaptureSupplier.class:1.16.5-8.0.0-RC1095]
at org.spongepowered.common.event.tracking.TrackingUtil.processBlockCaptures(TrackingUtil.java:450) ~[TrackingUtil.class:1.16.5-8.0.0-RC1095]
at org.spongepowered.common.event.tracking.phase.packet.PacketState.unwind(PacketState.java:69) ~[PacketState.class:1.16.5-8.0.0-RC1095]
at org.spongepowered.common.event.tracking.phase.packet.PacketState.unwind(PacketState.java:48) ~[PacketState.class:1.16.5-8.0.0-RC1095]
at org.spongepowered.common.event.tracking.PhaseTracker.completePhase(PhaseTracker.java:403) ~[PhaseTracker.class:1.16.5-8.0.0-RC1095]
at org.spongepowered.common.event.tracking.PhaseContext.close(PhaseContext.java:325) ~[PhaseContext.class:1.16.5-8.0.0-RC1095]
at org.spongepowered.common.event.tracking.phase.packet.PacketContext.close(PacketContext.java:139) ~[PacketContext.class:1.16.5-8.0.0-RC1095]
at org.spongepowered.common.event.tracking.phase.packet.PacketPhaseUtil.onProcessPacket(PacketPhaseUtil.java:263) ~[PacketPhaseUtil.class:1.16.5-8.0.0-RC1095]
at net.minecraft.network.protocol.PacketUtils.mde5f064$lambda$tracker$redirectProcessPacket$0$0(SourceFile:552) ~[?:?]
at net.minecraft.server.TickTask.run(SourceFile:18) ~[?:?]
```
https://github.com/SpongePowered/Sponge/issues/3672 (use map)
```
[28Apr2022 16:02:40] [Server thread/WARN]: Logged slot transactions without event! 1 net.minecraft.world.inventory.InventoryMenu
java.lang.Exception:
at org.spongepowered.common.event.tracking.context.transaction.inventory.ContainerBasedTransaction.generateEvent(ContainerBasedTransaction.java:167) ~[ContainerBasedTransaction.class:1.16.5-8.0.0-RC1112]
at org.spongepowered.common.event.tracking.context.transaction.inventory.ContainerSlotTransaction.generateEvent(ContainerSlotTransaction.java:34) ~[ContainerSlotTransaction.class:1.16.5-8.0.0-RC1112]
at org.spongepowered.common.event.tracking.context.transaction.TransactionalCaptureSupplier.generateEventForTransaction(TransactionalCaptureSupplier.java:298) ~[TransactionalCaptureSupplier.class:1.16.5-8.0.0-RC1112]
at org.spongepowered.common.event.tracking.context.transaction.TransactionalCaptureSupplier.batchTransactions(TransactionalCaptureSupplier.java:235) ~[TransactionalCaptureSupplier.class:1.16.5-8.0.0-RC1112]
at org.spongepowered.common.event.tracking.context.transaction.TransactionalCaptureSupplier.processTransactions(TransactionalCaptureSupplier.java:172) ~[TransactionalCaptureSupplier.class:1.16.5-8.0.0-RC1112]
at org.spongepowered.common.event.tracking.TrackingUtil.processBlockCaptures(TrackingUtil.java:450) ~[TrackingUtil.class:1.16.5-8.0.0-RC1112]
at org.spongepowered.common.event.tracking.phase.packet.player.UseItemPacketState.unwind(UseItemPacketState.java:123) ~[UseItemPacketState.class:1.16.5-8.0.0-RC1112]
at org.spongepowered.common.event.tracking.phase.packet.player.UseItemPacketState.unwind(UseItemPacketState.java:59) ~[UseItemPacketState.class:1.16.5-8.0.0-RC1112]
```
https://github.com/SpongePowered/Sponge/issues/3527 (tinkers construct - inventory interactions?)
(create mod - filter item)
```
java.lang.Exception: org.spongepowered.common.event.tracking.context.transaction.inventory.ContainerSlotTransaction
at org.spongepowered.common.event.tracking.context.transaction.TransactionalCaptureSupplier.logTransaction(TransactionalCaptureSupplier.java:134) ~[spongeforge:1.16.5-36.2.5-8.0.0-RC1100]
at org.spongepowered.common.event.tracking.context.transaction.TransactionSink.logSlotTransaction(TransactionSink.java:315) ~[spongeforge:1.16.5-36.2.5-8.0.0-RC1100]
at net.minecraft.inventory.container.Container.impl$capture(Container.java:1458) ~[?:?]
at net.minecraft.inventory.container.Container.bridge$detectAndSendChanges(Container.java:1399) ~[?:?]
at net.minecraft.inventory.container.Container.handler$zdk000$impl$broadcastChangesWithTransactions(Container.java:1365) ~[?:?]
at net.minecraft.inventory.container.Container.func_75142_b(Container.java) ~[?:?]
at net.minecraft.inventory.container.Container.func_75132_a(Container.java:99) ~[?:?]
at net.minecraftforge.fml.network.NetworkHooks.openGui(NetworkHooks.java:232) ~[forge:?]
at com.simibubi.create.content.logistics.item.filter.FilterItem.func_77659_a(FilterItem.java:149) ~[create:mc1.16.5_v0.3.2g]
at com.simibubi.create.content.logistics.item.filter.FilterItem.func_195939_a(FilterItem.java:70) ~[create:mc1.16.5_v0.3.2g]
at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:644) ~[forge:?]
...
```
(ae2 - open ae2 drive gui)
```
[20:38:03] [Server thread/WARN] [sponge/]: Logged transaction without event transaction!
java.lang.Exception: org.spongepowered.common.event.tracking.context.transaction.inventory.ContainerSlotTransaction
at org.spongepowered.common.event.tracking.context.transaction.TransactionalCaptureSupplier.logTransaction(TransactionalCaptureSupplier.java:134) ~[spongeforge:1.16.5-36.2.5-8.0.0-RC1100] {re:mixin,re:classloading}
at org.spongepowered.common.event.tracking.context.transaction.TransactionSink.logSlotTransaction(TransactionSink.java:315) ~[spongeforge:1.16.5-36.2.5-8.0.0-RC1100] {re:mixin,re:classloading}
at net.minecraft.inventory.container.Container.impl$capture(Container.java:1458) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.sponge.inventory.json:api.TraitMixin_Carried_Inventory_API,pl:mixin:APP:mixins.sponge.inventory.json:event.world.inventory.AbstractContainerMenuMixin_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Adapter_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Bridge_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Fabric_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Menu_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:api.inventory.container.ContainerMixin_Inventory_API,pl:mixin:APP:mixins.sponge.accessors.json:world.inventory.AbstractContainerMenuAccessor,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.inventory.container.Container.bridge$detectAndSendChanges(Container.java:1399) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.sponge.inventory.json:api.TraitMixin_Carried_Inventory_API,pl:mixin:APP:mixins.sponge.inventory.json:event.world.inventory.AbstractContainerMenuMixin_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Adapter_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Bridge_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Fabric_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Menu_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:api.inventory.container.ContainerMixin_Inventory_API,pl:mixin:APP:mixins.sponge.accessors.json:world.inventory.AbstractContainerMenuAccessor,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.inventory.container.Container.handler$zzh000$impl$broadcastChangesWithTransactions(Container.java:1365) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.sponge.inventory.json:api.TraitMixin_Carried_Inventory_API,pl:mixin:APP:mixins.sponge.inventory.json:event.world.inventory.AbstractContainerMenuMixin_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Adapter_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Bridge_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Fabric_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Menu_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:api.inventory.container.ContainerMixin_Inventory_API,pl:mixin:APP:mixins.sponge.accessors.json:world.inventory.AbstractContainerMenuAccessor,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.inventory.container.Container.func_75142_b(Container.java) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.sponge.inventory.json:api.TraitMixin_Carried_Inventory_API,pl:mixin:APP:mixins.sponge.inventory.json:event.world.inventory.AbstractContainerMenuMixin_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Adapter_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Bridge_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Fabric_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Menu_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:api.inventory.container.ContainerMixin_Inventory_API,pl:mixin:APP:mixins.sponge.accessors.json:world.inventory.AbstractContainerMenuAccessor,pl:mixin:A,pl:runtimedistcleaner:A}
at appeng.container.AEBaseContainer.func_75142_b(AEBaseContainer.java:249) ~[appliedenergistics2:8.4.7] {re:classloading}
at net.minecraft.inventory.container.Container.func_75132_a(Container.java:99) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.sponge.inventory.json:api.TraitMixin_Carried_Inventory_API,pl:mixin:APP:mixins.sponge.inventory.json:event.world.inventory.AbstractContainerMenuMixin_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Adapter_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Bridge_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Fabric_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:impl.world.inventory.AbstractContainerMenuMixin_Menu_Inventory,pl:mixin:APP:mixins.sponge.inventory.json:api.inventory.container.ContainerMixin_Inventory_API,pl:mixin:APP:mixins.sponge.accessors.json:world.inventory.AbstractContainerMenuAccessor,pl:mixin:A,pl:runtimedistcleaner:A}
at appeng.container.AEBaseContainer.func_75132_a(AEBaseContainer.java:706) ~[appliedenergistics2:8.4.7] {re:classloading}
at net.minecraftforge.fml.network.NetworkHooks.openGui(NetworkHooks.java:232) ~[forge:?] {re:classloading}
at appeng.container.implementations.ContainerTypeBuilder.open(ContainerTypeBuilder.java:175) ~[appliedenergistics2:8.4.7] {re:classloading}
at appeng.container.ContainerOpener.openContainer(ContainerOpener.java:50) ~[appliedenergistics2:8.4.7] {re:classloading}
at appeng.block.storage.DriveBlock.onActivated(DriveBlock.java:55) ~[appliedenergistics2:8.4.7] {re:classloading}
at appeng.block.AEBaseTileBlock.func_225533_a_(AEBaseTileBlock.java:255) ~[appliedenergistics2:8.4.7] {re:classloading}
at net.minecraft.block.AbstractBlock$AbstractBlockState.func_227031_a_(AbstractBlock.java:640) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:mixins.sponge.api.json:minecraft.world.level.block.state.BlockBehaviour_BlockStateBaseMixin_API,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.server.management.PlayerInteractionManager.func_219441_a(PlayerInteractionManager.java:2133) ~[?:?] {re:mixin,re:computing_frames,re:classloading,pl:mixin:APP:mixins.sponge.accessors.json:server.level.ServerPlayerGameModeAccessor,pl:mixin:APP:mixins.spongeforge.tracker.json:server.level.ServerPlayerGameModeMixin_Forge_Tracker,pl:mixin:APP:mixins.sponge.core.json:server.level.ServerPlayerGameModeMixin,pl:mixin:APP:mixins.sponge.tracker.json:server.level.ServerPlayerGameModeMixin_Tracker,pl:mixin:A}
at net.minecraft.network.play.ServerPlayNetHandler.redirect$zcg000$tracker$checkState(ServerPlayNetHandler.java:3684) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:mixins.sponge.inventory.json:event.server.network.ServerGamePacketListenerImplMixin_Inventory,pl:mixin:APP:mixins.spongeforge.core.json:server.network.ServerGamePacketListenerImplMixin_Forge,pl:mixin:APP:mixins.sponge.api.json:minecraft.server.network.ServerGamePacketListenerImplMixin_API,pl:mixin:APP:mixins.sponge.core.json:server.network.ServerGamePacketListenerImplMixin,pl:mixin:APP:mixins.sponge.tracker.json:server.network.ServerGamePacketListenerImplMixin_Tracker,pl:mixin:A}
at net.minecraft.network.play.ServerPlayNetHandler.func_184337_a(ServerPlayNetHandler.java:958) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:mixins.sponge.inventory.json:event.server.network.ServerGamePacketListenerImplMixin_Inventory,pl:mixin:APP:mixins.spongeforge.core.json:server.network.ServerGamePacketListenerImplMixin_Forge,pl:mixin:APP:mixins.sponge.api.json:minecraft.server.network.ServerGamePacketListenerImplMixin_API,pl:mixin:APP:mixins.sponge.core.json:server.network.ServerGamePacketListenerImplMixin,pl:mixin:APP:mixins.sponge.tracker.json:server.network.ServerGamePacketListenerImplMixin_Tracker,pl:mixin:A}
at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.func_148833_a(SourceFile:36) ~[?:?] {re:classloading}
```