13
0
geforkt von Mirrors/Paper

SPIGOT-6522: ItemStack on cursor is always AIR

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2021-06-12 16:24:52 +10:00
Ursprung 544ec40369
Commit cd03a7966c

Datei anzeigen

@ -109,15 +109,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@Override
public ItemStack getItemOnCursor() {
return CraftItemStack.asCraftMirror(getHandle().inventoryMenu.getCarried());
return CraftItemStack.asCraftMirror(getHandle().containerMenu.getCarried());
}
@Override
public void setItemOnCursor(ItemStack item) {
net.minecraft.world.item.ItemStack stack = CraftItemStack.asNMSCopy(item);
getHandle().inventoryMenu.setCarried(stack);
getHandle().containerMenu.setCarried(stack);
if (this instanceof CraftPlayer) {
getHandle().inventoryMenu.broadcastCarriedItem(); // Send set slot for cursor
getHandle().containerMenu.broadcastCarriedItem(); // Send set slot for cursor
}
}