Open Faithcaio opened 2 years ago
Chest to Hopper minecart. (or any other transaction not initiated by player but while player is viewing menu)
[19:13:39] [Server thread/WARN] (sponge) Logged slot transactions without event! 1 net.minecraft.world.inventory.ChestMenu
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:251)
at org.spongepowered.common.event.tracking.context.transaction.TransactionalCaptureSupplier.processTransactions(TransactionalCaptureSupplier.java:172)
at org.spongepowered.common.event.tracking.TrackingUtil.processBlockCaptures(TrackingUtil.java:450)
at org.spongepowered.common.event.tracking.phase.tick.EntityTickPhaseState.unwind(EntityTickPhaseState.java:79)
at org.spongepowered.common.event.tracking.phase.tick.EntityTickPhaseState.unwind(EntityTickPhaseState.java:56)
at org.spongepowered.common.event.tracking.PhaseTracker.completePhase(PhaseTracker.java:403)
at org.spongepowered.common.event.tracking.PhaseContext.close(PhaseContext.java:325)
at org.spongepowered.common.event.tracking.TrackingUtil.tickEntity(TrackingUtil.java:142)
at net.minecraft.server.level.ServerLevel.redirect$zcd000$tracker$wrapNormalEntityTick(ServerLevel.java:3792)
at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:411)
at net.minecraft.server.MinecraftServer.redirect$zca000$tracker$wrapWorldTick(MinecraftServer.java:4292)
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:871)
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:312)
at net.minecraft.server.MinecraftServer.redirect$zca000$tracker$wrapUpdateTimeLightAndEntities(MinecraftServer.java:4274)
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:811)
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:670)
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:257)
at java.base/java.lang.Thread.run(Thread.java:833)
[19:13:39] [Server thread/WARN] (sponge) SlotTransaction{slot=SlotAdapter[ordinal=0], original=SpongeItemStackSnapshot{itemType=minecraft:chest, quantity=1}, default=SpongeItemStackSnapshot{itemType=minecraft:air, quantity=0}, custom=Optional.empty, valid=true}
https://github.com/SpongePowered/Sponge/commit/6ebd3ea977f6c24ae44f5e11edca9d0e32051801 fixes this for player respawn and looking into hopper or hopper-fed inventories.
A plugin modifying an open inventory.
Code to reproduce:
Inventory inv = ViewableInventory.builder().type(ContainerTypes.GENERIC_9X6).completeStructure().plugin(plugin).build();
player.openInventory(inv);
inv.set(0, ItemStack.of(ItemTypes.STONE));
Logs: https://pastebin.com/UTD9z24f SpongeVanilla 8.1.0-RC1175
I recently tried with spongeforge-1.16.5-36.2.5-8.1.0-RC1313-universal, and the latest Tinker's Construct for 1.16.5. Oddly, the only time this error came up was when I applied a hopper to a chest (both vanilla MC items). None of the TiC inventories gave me any error spam. Just a data point. Forge version 36.2.39, TConstruct-1.16.5-3.3.4.335 and Mantle-1.16.5-1.6.157.
Context for the above mention (just to keep it in one)
Sponge vanilla -> Slot#set(ItemStack)
This could probably be fixed with Yeregorix post above at the same time
In API8/9 the PhaseTracker is currently not capturing a few inventory changes causing the following warning and stacktrace
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)
https://github.com/SpongePowered/Sponge/issues/3672 (use map)
https://github.com/SpongePowered/Sponge/issues/3527 (tinkers construct - inventory interactions?)
(create mod - filter item)
(ae2 - open ae2 drive gui)