net.minecraft.world.item
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--- 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);
|
||||
Reference in New Issue
Block a user