net.minecraft.world.item

This commit is contained in:
Jake Potrebic
2024-12-14 12:50:20 -08:00
parent 718d970f97
commit 31913c0b0a
64 changed files with 1134 additions and 2053 deletions

View File

@@ -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);