Update patches to latest 1.21.4 #1

Merged
Chaoscaot merged 242 commits from update/1.21.4 into main 2025-04-23 22:27:11 +02:00
315 changed files with 4197 additions and 1686 deletions
Showing only changes of commit c62252e19f - Show all commits

View File

@ -1250,8 +1250,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public void lore(final List<? extends net.kyori.adventure.text.Component> lore) {
Preconditions.checkArgument(lore == null || lore.size() <= ItemLore.MAX_LINES, "lore cannot have more than %s lines", ItemLore.MAX_LINES); // Paper - limit lore lines
this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(lore) : null;
if (lore == null) {
this.lore = null;
return;
}
Preconditions.checkArgument(lore.size() <= ItemLore.MAX_LINES, "lore cannot have more than %s lines", ItemLore.MAX_LINES); // Paper - limit lore lines
for (int i = 0; i < lore.size(); i++) {
Preconditions.checkArgument(lore.get(i) != null, "lore contains null entry at index: %s", i);
}
this.lore = io.papermc.paper.adventure.PaperAdventure.asVanilla(lore);
}
// Paper end