[Anvil Dialog] Fix title not set error on spigot (didn't happen on paper)

Signed-off-by: Irmo van den Berge <irmo.vandenberge@ziggo.nl>
This commit is contained in:
Irmo van den Berge committed 2023-06-20 21:41:54 +02:00
1 parent df3bf2fc88
commit 022a5f0210
1 file changed
+2
@@ -304,9 +304,11 @@ class EntityPlayer extends net.minecraft.world.entity.player.EntityHuman {
#if version >= 1.18
ContainerAccess access = ContainerAccess.create(world, position);
ContainerAnvil container = new ContainerAnvil(windowId, playerInventory, access);
container.setTitle(title);
#elseif version >= 1.14
ContainerAccess access = ContainerAccess.at(world, position);
ContainerAnvil container = new ContainerAnvil(windowId, playerInventory, access);
container.setTitle(title);
#else
ContainerAnvil container = new ContainerAnvil(playerInventory, world, position, (EntityHuman) instance);
container.windowId = windowId;