geforkt von Mirrors/Paper
SPIGOT-6522: ItemStack on cursor is always AIR
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
544ec40369
Commit
cd03a7966c
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren