mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
12 lines
941 B
Diff
12 lines
941 B
Diff
|
--- a/net/minecraft/world/item/WrittenBookItem.java
|
||
|
+++ b/net/minecraft/world/item/WrittenBookItem.java
|
||
|
@@ -41,7 +_,7 @@
|
||
|
|
||
|
public static boolean resolveBookComponents(ItemStack bookStack, CommandSourceStack resolvingSource, @Nullable Player resolvingPlayer) {
|
||
|
WrittenBookContent writtenBookContent = bookStack.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 writtenBookContent1 = writtenBookContent.resolve(resolvingSource, resolvingPlayer);
|
||
|
if (writtenBookContent1 != null) {
|
||
|
bookStack.set(DataComponents.WRITTEN_BOOK_CONTENT, writtenBookContent1);
|