mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-15 14:13:56 +01:00
Disable component selector resolving in books by default
This commit is contained in:
parent
37bf078394
commit
1be6fca1f1
1 changed files with 11 additions and 0 deletions
|
@ -0,0 +1,11 @@
|
|||
--- a/net/minecraft/world/item/WrittenBookItem.java
|
||||
+++ b/net/minecraft/world/item/WrittenBookItem.java
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
public static boolean resolveBookComponents(ItemStack book, CommandSourceStack commandSource, @Nullable Player player) {
|
||||
WrittenBookContent writtenBookContent = book.get(DataComponents.WRITTEN_BOOK_CONTENT);
|
||||
- if (writtenBookContent != null && !writtenBookContent.resolved()) {
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.resolveSelectorsInBooks && writtenBookContent != null && !writtenBookContent.resolved()) { // Paper - Disable component selector resolving in books by default
|
||||
WrittenBookContent writtenBookContent2 = writtenBookContent.resolve(commandSource, player);
|
||||
if (writtenBookContent2 != null) {
|
||||
book.set(DataComponents.WRITTEN_BOOK_CONTENT, writtenBookContent2);
|
Loading…
Reference in a new issue