[SPIGOT-8005] Cant open autocrafters on server Created: 04/Feb/25  Updated: 07/Feb/25  Resolved: 05/Feb/25

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Benni Assignee: Doc
Resolution: Fixed Votes: 0
Labels: None
Environment:

Hosted on windows 10 but also doesnt work at hosting provider exaroton.com


Attachments: File CrafterBug.mp4    
Version: CraftBukkit version 4432-Spigot-d421948-f152cad (MC: 1.21.4) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

We cant open auto crafters in our world anymore. It was possible once but doesnt work now.

Reproducing does work by just starting a new server, placing a "Crafter" block and trying to open it.

It works in Vanilla 1.21.4

 

This is the stack trace:

[21:09:59] [Server thread/ERROR]: Failed to handle packet net.minecraft.network.protocol.game.PacketPlayInUseItem@524c55e7, suppressing error
java.lang.IllegalStateException: Title not set
	at com.google.common.base.Preconditions.checkState(Preconditions.java:513) ~[guava-33.3.1-jre.jar:?]
	at net.minecraft.world.inventory.Container.getTitle(Container.java:96) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at org.bukkit.craftbukkit.v1_21_R3.inventory.CraftInventoryView.<init>(CraftInventoryView.java:30) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at org.bukkit.craftbukkit.v1_21_R3.inventory.view.CraftCrafterView.<init>(CraftCrafterView.java:13) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.world.inventory.CrafterMenu.getBukkitView(CrafterMenu.java:32) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.world.inventory.CrafterMenu.n(CrafterMenu.java:146) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.world.inventory.CrafterMenu.a(CrafterMenu.java:77) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.world.inventory.CrafterMenu.<init>(CrafterMenu.java:61) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.world.level.block.entity.CrafterBlockEntity.a(CrafterBlockEntity.java:122) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.world.level.block.entity.TileEntityLootable.createMenu(SourceFile:89) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.server.level.EntityPlayer.a(EntityPlayer.java:1781) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.world.level.block.CrafterBlock.a(CrafterBlock.java:181) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.world.level.block.state.BlockBase$BlockData.a(BlockBase.java:1190) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.server.level.PlayerInteractManager.a(PlayerInteractManager.java:557) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1659) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.network.protocol.game.PacketPlayInUseItem.a(PacketPlayInUseItem.java:44) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.network.protocol.game.PacketPlayInUseItem.a(PacketPlayInUseItem.java:11) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$0(PlayerConnectionUtils.java:35) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.util.thread.IAsyncTaskHandler.d(SourceFile:164) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(SourceFile:23) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1319) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:210) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.util.thread.IAsyncTaskHandler.B(SourceFile:138) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.server.MinecraftServer.bv(MinecraftServer.java:1298) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.server.MinecraftServer.B(MinecraftServer.java:1291) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.util.thread.IAsyncTaskHandler.b(SourceFile:147) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1248) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.server.MinecraftServer.x_(MinecraftServer.java:1258) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1101) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[spigot-1.21.4-R0.1-SNAPSHOT.jar:4432-Spigot-d421948-f152cad]
	at java.base/java.lang.Thread.run(Thread.java:1583) [?:?] 

Restart



 Comments   
Comment by md_5 [ 07/Feb/25 ]

The resolving commit is https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/a02758acdb5eaa3cc45954eefb5a9862836da93b

I tested and it is fixed. Use /version to check you are up to date

Comment by Brendan Robert [ 07/Feb/25 ]

md_5 any feedback on my questions?  Either way thank you for fixing it, BTW.

Comment by Brendan Robert [ 07/Feb/25 ]

Second to that, is there some kind of workaround we can use to set the title of the inventory after placing the block?  That way, even if kind of a PITA, it gives us a way to use autocrafters while waiting on a fixed release build.  Thoughts?

Comment by Brendan Robert [ 07/Feb/25 ]

Doc why was this resolved?  What was the resolving commit?  I can reproduce this on a spigot server I just created a few days ago and on a release version of Paper as well.

The git blame for the commit that introduced this bug is, my best guess, this one: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/a7cfc778fdb0f92dd0574939d6f81fbfa33742a0#src%2Fmain%2Fjava%2Forg%2Fbukkit%2Fcraftbukkit%2Finventory%2FCraftContainer.java

Given how often this error has re-occurred in various bugs (judging by what came up when I googled it), it might be a good idea to wrap the call to getTitle with some kind of a default value (blank, "unknown" or something) so that it is less disruptive to players, even if it is only due to some other error and shouldn't "normally" occur.

Generated at Sun Mar 30 02:36:45 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.