[SPIGOT-7881] CTRL+Pick Block saves position data into item Created: 25/Aug/24 Updated: 25/Dec/24 Resolved: 15/Sep/24 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | FullPotato | Assignee: | md_5 |
Resolution: | Fixed | Votes: | 0 |
Labels: | bug, spigot | ||
Environment: |
Debian GNU/Linux 11 (bullseye) x86_64 5.10.0-23-amd64 Intel i5-6600K (4) @ 3.900GHz |
Version: | This server is running CraftBukkit version 4300-Spigot-a759b62-7070de8 (MC: 1.21.1) (Implementing API version 1.21.1-R0.1-SNAPSHOT) |
Guidelines Read: | Yes |
Description |
Background info: In Creative Mode, Pick block (default keybind: MOUSE3 or middle click) is a game control that puts the item version of the block you are looking at in your main hand. Holding down CTRL (or CMD on MacOS) will save the target's block NBT data into this item as well. Bug: Using CTRL + Pick block on a chest with at least one item in it will produce an item that also has the "block_entity_data" item component on it along with the saved items. This component has position data pointing to (0, 0, 0). What this affects: Saved chest items using this method may be subject to having their inventories replaced with the inventory of any chest at (0, 0, 0) if present Steps to reproduce (Method 1):
The resulting item will either contain the contents of chest "A" or "B", seemingly non-deterministically. You can check this by placing it down or using the built-in /data command to view its NBT data.
Steps to reproduce (Method 2):
The resulting item will either contain the contents of chest "C" or "D", seemingly non-deterministically. You can check this by placing it down or using the built-in /data command to view its NBT data. Please note that this does not occur if the chest "C" was picked and saved in a non-Spigot (e.g. dedicated Vanilla) server.
In this description I've only mentioned chests specifically, but I've also observed this same behavior with barrels and furnaces; it likely affects every container block type.
I have confirmed (by using /data to view the resulting item in my inventory) that the saving of "block_entity_data" on CTRL+Pick Block does not happen in the integrated vanilla singleplayer server and does not happen in the dedicated vanilla Mojang server. |