Skip to content

Commit e6243d5

Browse files
committed
sync fix with PaperMC#12055
1 parent 9cc485e commit e6243d5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/builder/CraftBlockEntityInventoryViewBuilder.java

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ protected AbstractContainerMenu buildContainer(final ServerPlayer player) {
3939

4040
if (this.position == null) {
4141
this.position = player.blockPosition();
42+
return buildFakeBlockEntity(player);
4243
}
4344

4445
final BlockEntity entity = this.world.getBlockEntity(position);

paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/builder/CraftEnchantmentInventoryViewBuilder.java

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ protected AbstractContainerMenu buildContainer(final ServerPlayer player) {
2424

2525
if (this.position == null) {
2626
this.position = player.blockPosition();
27+
defaultTitle = new EnchantingTableBlockEntity(this.position, Blocks.ENCHANTING_TABLE.defaultBlockState()).getDisplayName();
28+
return new EnchantmentMenu(player.nextContainerCounter(), player.getInventory(), ContainerLevelAccess.create(this.world, this.position));
2729
}
2830

2931
final BlockEntity entity = this.world.getBlockEntity(position);

0 commit comments

Comments
 (0)