mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
526795bacd
* Update patches to handle vineflower decompiler * update patches again to handle inlined simple lambdas * update vf again and re-apply/rebuild patches * update patches after removal of verify-merges flag * fix compile issue * remove maven local * fix some issues * address more issues * fix collision patch * use paperweight release * more fixes * update fineflower and fix patches again * add missing comment descriptor --------- Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
20 lines
1.3 KiB
Diff
20 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Nassim Jahnke <nassim@njahnke.dev>
|
|
Date: Thu, 2 Jun 2022 20:35:58 +0200
|
|
Subject: [PATCH] Disable component selector resolving in books by default
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/item/WrittenBookItem.java b/src/main/java/net/minecraft/world/item/WrittenBookItem.java
|
|
index 81bb0abea7ebd2705f84fae31e4a3d2de92d7d18..793ab8acd7445984cff2628e3f001661dc20c8e5 100644
|
|
--- a/src/main/java/net/minecraft/world/item/WrittenBookItem.java
|
|
+++ b/src/main/java/net/minecraft/world/item/WrittenBookItem.java
|
|
@@ -112,7 +112,7 @@ public class WrittenBookItem extends Item {
|
|
|
|
public static boolean resolveBookComponents(ItemStack book, @Nullable CommandSourceStack commandSource, @Nullable Player player) {
|
|
CompoundTag compoundTag = book.getTag();
|
|
- if (compoundTag != null && !compoundTag.getBoolean("resolved")) {
|
|
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.resolveSelectorsInBooks && compoundTag != null && !compoundTag.getBoolean("resolved")) { // Paper - Disable component selector resolving in books by default
|
|
compoundTag.putBoolean("resolved", true);
|
|
if (!makeSureTagIsValid(compoundTag)) {
|
|
return false;
|