Skip to content

Commit

Permalink
sync fix with PaperMC#12055
Browse files Browse the repository at this point in the history
  • Loading branch information
Y2Kwastaken committed Feb 2, 2025
1 parent 9cc485e commit e6243d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ protected AbstractContainerMenu buildContainer(final ServerPlayer player) {

if (this.position == null) {
this.position = player.blockPosition();
return buildFakeBlockEntity(player);
}

final BlockEntity entity = this.world.getBlockEntity(position);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ protected AbstractContainerMenu buildContainer(final ServerPlayer player) {

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

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

0 comments on commit e6243d5

Please sign in to comment.