Expected behavior
Location location = new Location(Bukkit.getWorlds().get(0), 0.0, 0.0, 0.0);
player.openEnchanting(location, true);
If there is a level 30 enchanting table at this location, the player can open the level 30 enchanting table normally at any location.
Observed/Actual behavior
If the player is in the overworld, the level 30 enchanting table will be opened.
If the player is in the Nether or the End, the lowest level enchanting table will be opened.
Steps/models to reproduce
1、Place a level 30 enchanting table at 0,0,0 in the overworld
2、Travel to the Nether or the End
3、Execute the above code
Plugin and Datapack List
Only plugins for testing
Paper version
This server is running Paper version git-Paper-290 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: f186318)
You are running the latest version
Other
https://github.com/PaperMC/Paper/blob/f186318a91cbd3b2a2259d39cb88576989a496b8/patches/server/0911-Fix-force-opening-enchantment-tables.patch#L17C141-L17C141
It looks like the world the player is in is used when opening the enchanting table, rather than the world specified by the coordinates.
All openXXX series methods have the same issue, but may only affect the enchanting table (Because it has levels)
Expected behavior
If there is a level 30 enchanting table at this location, the player can open the level 30 enchanting table normally at any location.
Observed/Actual behavior
If the player is in the overworld, the level 30 enchanting table will be opened.
If the player is in the Nether or the End, the lowest level enchanting table will be opened.
Steps/models to reproduce
1、Place a level 30 enchanting table at 0,0,0 in the overworld
2、Travel to the Nether or the End
3、Execute the above code
Plugin and Datapack List
Only plugins for testing
Paper version
This server is running Paper version git-Paper-290 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: f186318)
You are running the latest version
Other
https://github.com/PaperMC/Paper/blob/f186318a91cbd3b2a2259d39cb88576989a496b8/patches/server/0911-Fix-force-opening-enchantment-tables.patch#L17C141-L17C141
It looks like the world the player is in is used when opening the enchanting table, rather than the world specified by the coordinates.
All openXXX series methods have the same issue, but may only affect the enchanting table (Because it has levels)