diff options
author | Nassim Jahnke <[email protected]> | 2023-03-18 18:52:24 +0100 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2023-03-18 18:52:24 +0100 |
commit | 2a024870de7ee0526eb8a2d1bff9e628e53a7367 (patch) | |
tree | b36dcb770a2819747ed1976dcde7d504a28df1bf | |
parent | 11f5158eaa3afd344632fa19bde9508e94967a4b (diff) | |
download | Paper-2a024870de7ee0526eb8a2d1bff9e628e53a7367.tar.gz Paper-2a024870de7ee0526eb8a2d1bff9e628e53a7367.zip |
Fix setItem with air on chiseled bookshelves
-rw-r--r-- | patches/server/0967-Fix-chiseled-bookshelf-setItem-with-air.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0967-Fix-chiseled-bookshelf-setItem-with-air.patch b/patches/server/0967-Fix-chiseled-bookshelf-setItem-with-air.patch new file mode 100644 index 0000000000..04ee362a78 --- /dev/null +++ b/patches/server/0967-Fix-chiseled-bookshelf-setItem-with-air.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke <[email protected]> +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); + } |