Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
20 Zeilen
1.0 KiB
Diff
20 Zeilen
1.0 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Nassim Jahnke <nassim@njahnke.dev>
|
||
|
Date: Sat, 18 Mar 2023 18:51:33 +0100
|
||
|
Subject: [PATCH] Fix chiseled bookshelf setItem with air
|
||
|
|
||
|
|
||
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
|
||
|
index 6986b2a5df34bfe078c902594f6409ad0ea847ef..ed12a23448dc9ada423ebd79a131eab2de3d6e48 100644
|
||
|
--- a/src/main/java/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
|
||
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
|
||
|
@@ -146,7 +146,7 @@ public class ChiseledBookShelfBlockEntity extends BlockEntity implements Contain
|
||
|
|
||
|
@Override
|
||
|
public void setItem(int slot, ItemStack stack) {
|
||
|
- if (stack.is(ItemTags.BOOKSHELF_BOOKS)) {
|
||
|
+ if (stack.isEmpty() || stack.is(ItemTags.BOOKSHELF_BOOKS)) { // Paper
|
||
|
this.items.set(slot, stack);
|
||
|
this.updateState(slot);
|
||
|
}
|