aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOwen1212055 <[email protected]>2024-10-24 10:02:45 -0400
committerOwen1212055 <[email protected]>2024-10-24 10:02:45 -0400
commit7d4cce94ae30af6e091d59af33979eeab3e72175 (patch)
tree13f7da84b978b007e31739a00766f217906b4f37
parent89bf08158b0ef5e0ff304bcd7705992ed2381a01 (diff)
downloadPaper-7d4cce94ae30af6e091d59af33979eeab3e72175.tar.gz
Paper-7d4cce94ae30af6e091d59af33979eeab3e72175.zip
Patch
-rw-r--r--patches/server/0945-Support-old-UUID-format-for-NBT.patch (renamed from patches/unapplied/server/0953-Support-old-UUID-format-for-NBT.patch)0
-rw-r--r--patches/server/0946-Fix-shield-disable-inconsistency.patch (renamed from patches/unapplied/server/0954-Fix-shield-disable-inconsistency.patch)4
-rw-r--r--patches/server/0947-Handle-Large-Packets-disconnecting-client.patch (renamed from patches/unapplied/server/0955-Handle-Large-Packets-disconnecting-client.patch)4
-rw-r--r--patches/server/0948-Fix-ItemFlags.patch (renamed from patches/unapplied/server/0956-Fix-ItemFlags.patch)32
-rw-r--r--patches/server/0949-Fix-helmet-damage-reduction-inconsistencies.patch (renamed from patches/unapplied/server/0957-Fix-helmet-damage-reduction-inconsistencies.patch)4
-rw-r--r--patches/server/0950-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch (renamed from patches/unapplied/server/0958-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch)18
-rw-r--r--patches/server/0951-improve-checking-handled-tags-in-itemmeta.patch (renamed from patches/unapplied/server/0959-improve-checking-handled-tags-in-itemmeta.patch)56
-rw-r--r--patches/server/0952-Expose-hasColor-to-leather-armor.patch (renamed from patches/unapplied/server/0961-Expose-hasColor-to-leather-armor.patch)8
-rw-r--r--patches/server/0953-Added-API-to-get-player-ha-proxy-address.patch (renamed from patches/unapplied/server/0962-Added-API-to-get-player-ha-proxy-address.patch)6
9 files changed, 73 insertions, 59 deletions
diff --git a/patches/unapplied/server/0953-Support-old-UUID-format-for-NBT.patch b/patches/server/0945-Support-old-UUID-format-for-NBT.patch
index 68ff8a5255..68ff8a5255 100644
--- a/patches/unapplied/server/0953-Support-old-UUID-format-for-NBT.patch
+++ b/patches/server/0945-Support-old-UUID-format-for-NBT.patch
diff --git a/patches/unapplied/server/0954-Fix-shield-disable-inconsistency.patch b/patches/server/0946-Fix-shield-disable-inconsistency.patch
index 61614305d9..79d8304020 100644
--- a/patches/unapplied/server/0954-Fix-shield-disable-inconsistency.patch
+++ b/patches/server/0946-Fix-shield-disable-inconsistency.patch
@@ -8,10 +8,10 @@ it will not disable the shield if the attacker is holding
an axe item.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 94169703c5a8111df1ed550d57f59f4a3bb97ae1..6ff33a6d46daffd15310f21ec00d4861478b360f 100644
+index a7f0d49637eb72b4645997a97cc6927b16a59738..1b9f03dcf63c44c11e79022cb6cce5f6bd1ea30a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -2349,7 +2349,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2426,7 +2426,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
Entity entity = damagesource.getDirectEntity();
diff --git a/patches/unapplied/server/0955-Handle-Large-Packets-disconnecting-client.patch b/patches/server/0947-Handle-Large-Packets-disconnecting-client.patch
index ea20a101a7..32e463a242 100644
--- a/patches/unapplied/server/0955-Handle-Large-Packets-disconnecting-client.patch
+++ b/patches/server/0947-Handle-Large-Packets-disconnecting-client.patch
@@ -95,7 +95,7 @@ index 4c776c591dd0a7b36945a6487fdfe86d1187b4af..82fc12ffbd1585b4a8d09a025914830a
return false;
}
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundContainerSetContentPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundContainerSetContentPacket.java
-index 7e555ece0555b3d2a983ab2c39c5e7ec23fc7e88..8cca2ac616a2c80268c96b9f95e33f834a0fc8fd 100644
+index f53c74fb1863a2d1268a4ddf8cf69d1fda32d73f..8d5939e03a065197af125d95a10134abbccd07ec 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundContainerSetContentPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundContainerSetContentPacket.java
@@ -36,6 +36,21 @@ public class ClientboundContainerSetContentPacket implements Packet<ClientGamePa
@@ -118,7 +118,7 @@ index 7e555ece0555b3d2a983ab2c39c5e7ec23fc7e88..8cca2ac616a2c80268c96b9f95e33f83
+ // Paper end - Handle large packets disconnecting client
+
private void write(RegistryFriendlyByteBuf buf) {
- buf.writeByte(this.containerId);
+ buf.writeContainerId(this.containerId);
buf.writeVarInt(this.stateId);
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
index ec1cb034d840633240f2b379b09f7d2f1c8971a5..cf8fd671490863e126c059157e1ca234e6509d9f 100644
diff --git a/patches/unapplied/server/0956-Fix-ItemFlags.patch b/patches/server/0948-Fix-ItemFlags.patch
index 78bc31a514..e045394f3c 100644
--- a/patches/unapplied/server/0956-Fix-ItemFlags.patch
+++ b/patches/server/0948-Fix-ItemFlags.patch
@@ -33,10 +33,10 @@ index 73fe41322e0349ad1d46a760f621b6c91112e90e..19af55ec2bf62b70bd3be44f499b32f5
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index 7ad1076de76c81c25b656e52237c2f60a2eca085..c2a215544589d903633c5aed51522870bea556d8 100644
+index 8d13505c36d732f17293c6a6d65cac20919b8b7a..6b3eed94c26bc16177f9b9fadd140f9a89163af2 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -245,6 +245,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -275,6 +275,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
static final ItemMetaKeyType<Unit> HIDE_ADDITIONAL_TOOLTIP = new ItemMetaKeyType(DataComponents.HIDE_ADDITIONAL_TOOLTIP);
@Specific(Specific.To.NBT)
static final ItemMetaKeyType<CustomData> CUSTOM_DATA = new ItemMetaKeyType<>(DataComponents.CUSTOM_DATA);
@@ -49,7 +49,7 @@ index 7ad1076de76c81c25b656e52237c2f60a2eca085..c2a215544589d903633c5aed51522870
// We store the raw original JSON representation of all text data. See SPIGOT-5063, SPIGOT-5656, SPIGOT-5304
private Component displayName;
-@@ -327,6 +333,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -377,6 +383,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
this.customTag = meta.customTag;
this.version = meta.version;
@@ -60,7 +60,7 @@ index 7ad1076de76c81c25b656e52237c2f60a2eca085..c2a215544589d903633c5aed51522870
}
CraftMetaItem(DataComponentPatch tag) {
-@@ -425,6 +435,20 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -496,6 +506,20 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
this.customTag = null;
}
});
@@ -81,7 +81,7 @@ index 7ad1076de76c81c25b656e52237c2f60a2eca085..c2a215544589d903633c5aed51522870
Set<Map.Entry<DataComponentType<?>, Optional<?>>> keys = tag.entrySet();
for (Map.Entry<DataComponentType<?>, Optional<?>> key : keys) {
-@@ -627,7 +651,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -735,7 +759,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
try {
CompoundTag unhandledTag = NbtIo.readCompressed(buf, NbtAccounter.unlimitedHeap());
DataComponentPatch unhandledPatch = DataComponentPatch.CODEC.parse(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), unhandledTag).result().get();
@@ -98,7 +98,7 @@ index 7ad1076de76c81c25b656e52237c2f60a2eca085..c2a215544589d903633c5aed51522870
for (Entry<DataComponentType<?>, Optional<?>> entry : unhandledPatch.entrySet()) {
// Move removed unhandled tags to dedicated removedTags
-@@ -870,6 +902,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1006,6 +1038,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
itemTag.put(CraftMetaItem.MAX_DAMAGE, this.maxDamage);
}
@@ -114,16 +114,16 @@ index 7ad1076de76c81c25b656e52237c2f60a2eca085..c2a215544589d903633c5aed51522870
for (Map.Entry<DataComponentType<?>, Optional<?>> e : this.unhandledTags.build().entrySet()) {
e.getValue().ifPresent((value) -> {
itemTag.builder.set((DataComponentType) e.getKey(), value);
-@@ -960,7 +1001,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1096,7 +1137,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Overridden
boolean isEmpty() {
-- return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
-+ return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper
+- return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasEnchantable() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.hasTooltipStyle() || this.hasItemModel() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isGlider() || this.hasDamageResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasUseRemainder() || this.hasUseCooldown() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasEquippable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
++ return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasEnchantable() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.hasTooltipStyle() || this.hasItemModel() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isGlider() || this.hasDamageResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasUseRemainder() || this.hasUseCooldown() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasEquippable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper
}
// Paper start
-@@ -1630,6 +1671,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1889,6 +1930,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
&& (this.hasJukeboxPlayable() ? that.hasJukeboxPlayable() && this.jukebox.equals(that.jukebox) : !that.hasJukeboxPlayable())
&& (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage())
&& (this.hasMaxDamage() ? that.hasMaxDamage() && this.maxDamage.equals(that.maxDamage) : !that.hasMaxDamage())
@@ -132,7 +132,7 @@ index 7ad1076de76c81c25b656e52237c2f60a2eca085..c2a215544589d903633c5aed51522870
&& (this.version == that.version);
}
-@@ -1675,6 +1718,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1941,6 +1984,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
hash = 61 * hash + (this.hasDamage() ? this.damage : 0);
hash = 61 * hash + (this.hasMaxDamage() ? 1231 : 1237);
hash = 61 * hash + (this.hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0);
@@ -141,7 +141,7 @@ index 7ad1076de76c81c25b656e52237c2f60a2eca085..c2a215544589d903633c5aed51522870
hash = 61 * hash + this.version;
return hash;
}
-@@ -1719,6 +1764,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1998,6 +2043,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.damage = this.damage;
clone.maxDamage = this.maxDamage;
clone.version = this.version;
@@ -156,7 +156,7 @@ index 7ad1076de76c81c25b656e52237c2f60a2eca085..c2a215544589d903633c5aed51522870
return clone;
} catch (CloneNotSupportedException e) {
throw new Error(e);
-@@ -1836,6 +1889,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -2142,6 +2195,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@@ -171,9 +171,9 @@ index 7ad1076de76c81c25b656e52237c2f60a2eca085..c2a215544589d903633c5aed51522870
+ }
+ // Paper end
if (!this.unhandledTags.isEmpty()) {
- Tag unhandled = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), this.unhandledTags.build()).getOrThrow(IllegalStateException::new);
+ net.minecraft.nbt.Tag unhandled = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), this.unhandledTags.build()).getOrThrow(IllegalStateException::new);
try {
-@@ -1846,6 +1909,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -2152,6 +2215,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex);
}
}
@@ -188,7 +188,7 @@ index 7ad1076de76c81c25b656e52237c2f60a2eca085..c2a215544589d903633c5aed51522870
if (!this.removedTags.isEmpty()) {
RegistryAccess registryAccess = CraftRegistry.getMinecraftRegistry();
-@@ -1999,6 +2070,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -2312,6 +2383,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaItem.MAX_DAMAGE.TYPE,
CraftMetaItem.CUSTOM_DATA.TYPE,
CraftMetaItem.ATTRIBUTES.TYPE,
diff --git a/patches/unapplied/server/0957-Fix-helmet-damage-reduction-inconsistencies.patch b/patches/server/0949-Fix-helmet-damage-reduction-inconsistencies.patch
index a8b503a8ea..186441aa4d 100644
--- a/patches/unapplied/server/0957-Fix-helmet-damage-reduction-inconsistencies.patch
+++ b/patches/server/0949-Fix-helmet-damage-reduction-inconsistencies.patch
@@ -7,10 +7,10 @@ Affect the falling stalactite damage type where the
reduction is not applied like in Vanilla
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 1b21fdab4269df375d2f445df3bd56f7b1fd2b15..4632eb883e9f5efde520ee543bcad25827c0da2c 100644
+index b0e7d1841d71e377d5ad596a22dfafb90d4f80cc..659d38c90f20f744261190c451235dbca8352e38 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1228,7 +1228,7 @@ public class CraftEventFactory {
+@@ -1226,7 +1226,7 @@ public class CraftEventFactory {
modifiers.put(DamageModifier.FREEZING, freezingModifier);
modifierFunctions.put(DamageModifier.FREEZING, freezing);
}
diff --git a/patches/unapplied/server/0958-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch b/patches/server/0950-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch
index 2965a66127..b4178f2bef 100644
--- a/patches/unapplied/server/0958-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch
+++ b/patches/server/0950-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch
@@ -5,35 +5,35 @@ Subject: [PATCH] Revert to vanilla handling of LivingEntity#actuallyHurt
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 6ff33a6d46daffd15310f21ec00d4861478b360f..b1e894e9a9cd87f7259302d15d5b5b0e2b32c4ea 100644
+index 1b9f03dcf63c44c11e79022cb6cce5f6bd1ea30a..6f9c4a5a87bdfb8ce32ce40c4a34997695d15ce3 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1425,7 +1425,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1457,7 +1457,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ amount = 0.0F;
}
- this.noActionTime = 0;
- float f1 = amount;
+ float f1 = amount; final float originalAmount = f1; // Paper - revert to vanilla #hurt - OBFHELPER
boolean flag = amount > 0.0F && this.isDamageSourceBlocked(source); // Copied from below
float f2 = 0.0F;
-@@ -1479,6 +1479,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
- if (!this.actuallyHurt(source, (float) event.getFinalDamage() - this.lastHurt, event)) {
+@@ -1515,6 +1515,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ if (!this.actuallyHurt(world, source, (float) event.getFinalDamage() - this.lastHurt, event)) {
return false;
}
+ if (this instanceof ServerPlayer && event.getDamage() == 0 && originalAmount == 0) return false; // Paper - revert to vanilla damage - players are not affected by damage that is 0 - skip damage if the vanilla damage is 0 and was not modified by plugins in the event.
// CraftBukkit end
this.lastHurt = amount;
flag1 = false;
-@@ -1487,6 +1488,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
- if (!this.actuallyHurt(source, (float) event.getFinalDamage(), event)) {
+@@ -1523,6 +1524,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ if (!this.actuallyHurt(world, source, (float) event.getFinalDamage(), event)) {
return false;
}
+ if (this instanceof ServerPlayer && event.getDamage() == 0 && originalAmount == 0) return false; // Paper - revert to vanilla damage - players are not affected by damage that is 0 - skip damage if the vanilla damage is 0 and was not modified by plugins in the event.
this.lastHurt = amount;
this.invulnerableTime = this.invulnerableDuration; // CraftBukkit - restore use of maxNoDamageTicks
- // this.actuallyHurt(damagesource, f);
-@@ -2411,12 +2413,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ // this.actuallyHurt(worldserver, damagesource, f);
+@@ -2488,12 +2490,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
return true;
} else {
diff --git a/patches/unapplied/server/0959-improve-checking-handled-tags-in-itemmeta.patch b/patches/server/0951-improve-checking-handled-tags-in-itemmeta.patch
index 83c83dde68..41f857627a 100644
--- a/patches/unapplied/server/0959-improve-checking-handled-tags-in-itemmeta.patch
+++ b/patches/server/0951-improve-checking-handled-tags-in-itemmeta.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] improve checking handled tags in itemmeta
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java
-index a4c4ba0d02f9a072236ce86c1e98e2c60b059cb8..0930d827e96e0b41296d7723238e6735106fd3d5 100644
+index d29f4dd9808e2001c79535d663ca77d6840f6092..1fd6e5a1ada184f9b399b7c41718ffd7db086d91 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java
-@@ -39,120 +39,120 @@ import org.bukkit.inventory.meta.TropicalFishBucketMeta;
+@@ -40,120 +40,120 @@ import org.bukkit.inventory.meta.TropicalFishBucketMeta;
public final class CraftItemMetas {
@@ -159,10 +159,10 @@ index a4c4ba0d02f9a072236ce86c1e98e2c60b059cb8..0930d827e96e0b41296d7723238e6735
// We use if instead of a set, since the result gets cached in CraftItemType,
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
-index 9be7859ccb5283b2040ba68d72d6dbdafb4d6835..6a449bfc765bf427d82df4a90bc60471b5de2fd3 100644
+index 7228d43d331de16cbaa0e97c7e3fa45c0bc89558..dfdabf86433d323966a748baef769cf0462d3f38 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
-@@ -161,10 +161,11 @@ public final class CraftItemStack extends ItemStack {
+@@ -173,10 +173,11 @@ public final class CraftItemStack extends ItemStack {
} else if (this.handle == null) {
this.handle = new net.minecraft.world.item.ItemStack(CraftItemType.bukkitToMinecraft(type), 1);
} else {
@@ -175,7 +175,7 @@ index 9be7859ccb5283b2040ba68d72d6dbdafb4d6835..6a449bfc765bf427d82df4a90bc60471
}
}
this.setData(null);
-@@ -325,6 +326,19 @@ public final class CraftItemStack extends ItemStack {
+@@ -337,6 +338,19 @@ public final class CraftItemStack extends ItemStack {
public ItemMeta getItemMeta() {
return CraftItemStack.getItemMeta(this.handle);
}
@@ -195,7 +195,7 @@ index 9be7859ccb5283b2040ba68d72d6dbdafb4d6835..6a449bfc765bf427d82df4a90bc60471
// Paper start
public static void applyMetaToItem(net.minecraft.world.item.ItemStack itemStack, ItemMeta itemMeta) {
final CraftMetaItem.Applicator tag = new CraftMetaItem.Applicator();
-@@ -337,12 +351,17 @@ public final class CraftItemStack extends ItemStack {
+@@ -349,12 +363,17 @@ public final class CraftItemStack extends ItemStack {
}
public static ItemMeta getItemMeta(net.minecraft.world.item.ItemStack item, org.bukkit.inventory.ItemType metaForType) {
// Paper end
@@ -216,7 +216,7 @@ index 9be7859ccb5283b2040ba68d72d6dbdafb4d6835..6a449bfc765bf427d82df4a90bc60471
static Material getType(net.minecraft.world.item.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java
-index a1f2b9d40d374e8cdbaf916b25fa74b6c0970f81..d03f4a767f6c7fe7d6bcef20e6676c39d9657584 100644
+index 6d76cc1db3ac3f1ae74c13511937fb86082a0b3d..f4a6ee6dfcb2d516a9a1a9c81494b50a629110e4 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java
@@ -114,8 +114,8 @@ public class CraftItemType<M extends ItemMeta> implements ItemType.Typed<M>, Han
@@ -231,7 +231,7 @@ index a1f2b9d40d374e8cdbaf916b25fa74b6c0970f81..d03f4a767f6c7fe7d6bcef20e6676c39
public M getItemMeta(ItemMeta itemMeta) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
-index 865977ce17fbb8793a1eefd71079729e83f5cfaf..889d43acf4cf7a5917f110105ed05838e24c8cf7 100644
+index 0d3b1692af010bfd7ea83e22e9571dc954906f71..e83a662f82b144b11a003a682633cd0ee797fd19 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
@@ -34,8 +34,8 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
@@ -456,10 +456,10 @@ index 4941e0afff8df5f10f06c715b54bf58eb86051c5..566d893a413fd04b99e83dc2da8fe958
getOrEmpty(tag, CraftMetaFirework.FIREWORKS).ifPresent((fireworks) -> {
this.power = fireworks.flightDuration();
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index c2a215544589d903633c5aed51522870bea556d8..85bc581d0807f07212bf0cd4c85c65f0ec7ef547 100644
+index 6b3eed94c26bc16177f9b9fadd140f9a89163af2..86045b7c4aa6ce9007cdeb1bb1ffdce98de6568b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -339,7 +339,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -389,7 +389,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
// Paper end
}
@@ -468,7 +468,7 @@ index c2a215544589d903633c5aed51522870bea556d8..85bc581d0807f07212bf0cd4c85c65f0
CraftMetaItem.getOrEmpty(tag, CraftMetaItem.NAME).ifPresent((component) -> {
this.displayName = component;
});
-@@ -450,9 +450,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -521,9 +521,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
});
// Paper end - fix ItemFlags
@@ -486,7 +486,7 @@ index c2a215544589d903633c5aed51522870bea556d8..85bc581d0807f07212bf0cd4c85c65f0
key.getValue().ifPresent((value) -> {
this.unhandledTags.set((DataComponentType) key.getKey(), value);
});
-@@ -2045,68 +2052,76 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -2351,75 +2358,83 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
this.version = version;
}
@@ -498,18 +498,25 @@ index c2a215544589d903633c5aed51522870bea556d8..85bc581d0807f07212bf0cd4c85c65f0
- CraftMetaItem.ITEM_NAME.TYPE,
- CraftMetaItem.LORE.TYPE,
- CraftMetaItem.CUSTOM_MODEL_DATA.TYPE,
+- CraftMetaItem.ENCHANTABLE.TYPE,
- CraftMetaItem.BLOCK_DATA.TYPE,
- CraftMetaItem.REPAIR.TYPE,
- CraftMetaItem.ENCHANTMENTS.TYPE,
- CraftMetaItem.HIDE_ADDITIONAL_TOOLTIP.TYPE,
- CraftMetaItem.HIDE_TOOLTIP.TYPE,
+- CraftMetaItem.TOOLTIP_STYLE.TYPE,
+- CraftMetaItem.ITEM_MODEL.TYPE,
- CraftMetaItem.UNBREAKABLE.TYPE,
- CraftMetaItem.ENCHANTMENT_GLINT_OVERRIDE.TYPE,
-- CraftMetaItem.FIRE_RESISTANT.TYPE,
+- CraftMetaItem.GLIDER.TYPE,
+- CraftMetaItem.DAMAGE_RESISTANT.TYPE,
- CraftMetaItem.MAX_STACK_SIZE.TYPE,
- CraftMetaItem.RARITY.TYPE,
+- CraftMetaItem.USE_REMAINDER.TYPE,
+- CraftMetaItem.USE_COOLDOWN.TYPE,
- CraftMetaItem.FOOD.TYPE,
- CraftMetaItem.TOOL.TYPE,
+- CraftMetaItem.EQUIPPABLE.TYPE,
- CraftMetaItem.JUKEBOX_PLAYABLE.TYPE,
- CraftMetaItem.DAMAGE.TYPE,
- CraftMetaItem.MAX_DAMAGE.TYPE,
@@ -558,16 +565,23 @@ index c2a215544589d903633c5aed51522870bea556d8..85bc581d0807f07212bf0cd4c85c65f0
+ CraftMetaItem.ITEM_NAME.TYPE,
+ CraftMetaItem.LORE.TYPE,
+ CraftMetaItem.CUSTOM_MODEL_DATA.TYPE,
++ CraftMetaItem.CUSTOM_MODEL_DATA.TYPE,
+ CraftMetaItem.BLOCK_DATA.TYPE,
+ CraftMetaItem.REPAIR.TYPE,
+ CraftMetaItem.ENCHANTMENTS.TYPE,
+ CraftMetaItem.HIDE_ADDITIONAL_TOOLTIP.TYPE,
+ CraftMetaItem.HIDE_TOOLTIP.TYPE,
++ CraftMetaItem.TOOLTIP_STYLE.TYPE,
++ CraftMetaItem.ITEM_MODEL.TYPE,
+ CraftMetaItem.UNBREAKABLE.TYPE,
+ CraftMetaItem.ENCHANTMENT_GLINT_OVERRIDE.TYPE,
-+ CraftMetaItem.FIRE_RESISTANT.TYPE,
++ CraftMetaItem.GLIDER.TYPE,
++ CraftMetaItem.DAMAGE_RESISTANT.TYPE,
++ CraftMetaItem.ENCHANTABLE.TYPE,
+ CraftMetaItem.MAX_STACK_SIZE.TYPE,
+ CraftMetaItem.RARITY.TYPE,
++ CraftMetaItem.USE_REMAINDER.TYPE,
++ CraftMetaItem.USE_COOLDOWN.TYPE,
+ CraftMetaItem.FOOD.TYPE,
+ CraftMetaItem.TOOL.TYPE,
+ CraftMetaItem.JUKEBOX_PLAYABLE.TYPE,
@@ -624,10 +638,10 @@ index c2a215544589d903633c5aed51522870bea556d8..85bc581d0807f07212bf0cd4c85c65f0
protected static <T> Optional<? extends T> getOrEmpty(DataComponentPatch tag, ItemMetaKeyType<T> type) {
Optional<? extends T> result = tag.get(type.TYPE);
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java
-index 573806b9200282f9842ab5289af4e2987905cafc..e47c1b9a52c938b145b721d9c088f4a916a01424 100644
+index 68c0a6d5e06a44ddddddb9cbe093ed6814380444..4dc7adb626ccb74b7e3a60c5a7250d0dc9703997 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java
-@@ -30,8 +30,8 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo
+@@ -32,8 +32,8 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo
}
}
@@ -684,10 +698,10 @@ index 76a3e4893cbdba903a712d6db1d30b9c644795be..a80b9b142ca99c7c0257b1bdeb059dce
getOrEmpty(tag, CraftMetaMusicInstrument.GOAT_HORN_INSTRUMENT).ifPresent((instrument) -> {
this.instrument = org.bukkit.craftbukkit.CraftRegistry.unwrapAndConvertHolder(org.bukkit.Registry.INSTRUMENT, instrument).orElse(null); // Paper - fix upstream not handling inlined instrument
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java
-index 17336c177a969f04c51ff12de4599ef261d79fef..90c554dcbfe2bcca3f742379499f1e8e8665c512 100644
+index ed272c7eb435677de5f6b106a6012c472decbb62..b118d8ecb505d187c02bb158f14df333f487a87f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java
-@@ -23,8 +23,8 @@ public class CraftMetaOminousBottle extends CraftMetaItem implements OminousBott
+@@ -24,8 +24,8 @@ public class CraftMetaOminousBottle extends CraftMetaItem implements OminousBott
this.ominousBottleAmplifier = bottleMeta.ominousBottleAmplifier;
}
@@ -696,13 +710,13 @@ index 17336c177a969f04c51ff12de4599ef261d79fef..90c554dcbfe2bcca3f742379499f1e8e
+ CraftMetaOminousBottle(DataComponentPatch tag, java.util.Set<net.minecraft.core.component.DataComponentType<?>> extraHandledDcts) { // Paper
+ super(tag, extraHandledDcts); // Paper
getOrEmpty(tag, CraftMetaOminousBottle.OMINOUS_BOTTLE_AMPLIFIER).ifPresent((amplifier) -> {
- this.ominousBottleAmplifier = amplifier;
+ this.ominousBottleAmplifier = amplifier.value();
});
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
-index 8404520a3d15464f9dc9fa2292048e9fb1b06930..1a18779f9796704c8690226dbe491b0fa6ba99ea 100644
+index 533c600d632eb733c121f5d8189142726b091713..6f0eebcaffa20337cf5a7f8485f891c690d948ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
-@@ -51,8 +51,8 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
+@@ -54,8 +54,8 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
}
}
diff --git a/patches/unapplied/server/0961-Expose-hasColor-to-leather-armor.patch b/patches/server/0952-Expose-hasColor-to-leather-armor.patch
index fb4dc944de..9166ad6261 100644
--- a/patches/unapplied/server/0961-Expose-hasColor-to-leather-armor.patch
+++ b/patches/server/0952-Expose-hasColor-to-leather-armor.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose #hasColor to leather armor
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java
-index 299f2f4f143f753f3cd8a020c8e6ae46298e0f6f..51d7263cdd34359d9cdf72cc01ba654b519f838d 100644
+index 6517ec4933b0eae761fceb117ea1db175755d0b1..dc6398cfbd6e749733c3a681e1eb8ce15c3b2c5e 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java
-@@ -118,4 +118,11 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable
+@@ -100,4 +100,11 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable
}
return original != hash ? CraftMetaColorableArmor.class.hashCode() ^ hash : hash;
}
@@ -21,10 +21,10 @@ index 299f2f4f143f753f3cd8a020c8e6ae46298e0f6f..51d7263cdd34359d9cdf72cc01ba654b
+ // Paper end - Expose #hasColor to leather armor
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java
-index f1dbfba7ec11b12ead627f098a0b833f49be8000..49889026661fb2a558e14569324016d637de27a0 100644
+index e8c950aa74d31bf7a9128f4acc4bccee26bbcd7f..e76749bffaf5a0bbd3a8d35f882edcc3598351b9 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java
-@@ -177,4 +177,11 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta {
+@@ -156,4 +156,11 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta {
builder.put(CraftMetaLeatherArmor.COLOR.BUKKIT, meta.getColor());
}
}
diff --git a/patches/unapplied/server/0962-Added-API-to-get-player-ha-proxy-address.patch b/patches/server/0953-Added-API-to-get-player-ha-proxy-address.patch
index a21e9c27e9..4ff67e86ed 100644
--- a/patches/unapplied/server/0962-Added-API-to-get-player-ha-proxy-address.patch
+++ b/patches/server/0953-Added-API-to-get-player-ha-proxy-address.patch
@@ -35,10 +35,10 @@ index c62df32af11636ad408b584fcc590590ce4fb0d0..baed0bb80d44973f9323bbe536551182
} else {
super.channelRead(ctx, msg);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 6db4d21ee4dc97820943d3fd2aa55054cac95f50..5f12c91ea598b4b133bf41532a9864645ebf6cea 100644
+index 24b05e9b21ec84a4677f58ed790d308e700741b5..60a5eb5bd23bb267648bc55c1ee6bdfb29f806ce 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -265,7 +265,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -266,7 +266,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public InetSocketAddress getAddress() {
@@ -47,7 +47,7 @@ index 6db4d21ee4dc97820943d3fd2aa55054cac95f50..5f12c91ea598b4b133bf41532a986464
SocketAddress addr = this.getHandle().connection.getRemoteAddress();
if (addr instanceof InetSocketAddress) {
-@@ -275,6 +275,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -276,6 +276,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}