diff --git a/patches/unapplied/server/Added-API-to-get-player-ha-proxy-address.patch b/patches/server/Added-API-to-get-player-ha-proxy-address.patch similarity index 100% rename from patches/unapplied/server/Added-API-to-get-player-ha-proxy-address.patch rename to patches/server/Added-API-to-get-player-ha-proxy-address.patch diff --git a/patches/unapplied/server/Expose-hasColor-to-leather-armor.patch b/patches/server/Expose-hasColor-to-leather-armor.patch similarity index 100% rename from patches/unapplied/server/Expose-hasColor-to-leather-armor.patch rename to patches/server/Expose-hasColor-to-leather-armor.patch diff --git a/patches/unapplied/server/Fix-ItemFlags.patch b/patches/server/Fix-ItemFlags.patch similarity index 87% rename from patches/unapplied/server/Fix-ItemFlags.patch rename to patches/server/Fix-ItemFlags.patch index 5630d7c6b0..22457763a4 100644 --- a/patches/unapplied/server/Fix-ItemFlags.patch +++ b/patches/server/Fix-ItemFlags.patch @@ -118,8 +118,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @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 @@ -171,7 +171,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // 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 { @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex); diff --git a/patches/unapplied/server/Fix-helmet-damage-reduction-inconsistencies.patch b/patches/server/Fix-helmet-damage-reduction-inconsistencies.patch similarity index 100% rename from patches/unapplied/server/Fix-helmet-damage-reduction-inconsistencies.patch rename to patches/server/Fix-helmet-damage-reduction-inconsistencies.patch diff --git a/patches/unapplied/server/Fix-shield-disable-inconsistency.patch b/patches/server/Fix-shield-disable-inconsistency.patch similarity index 100% rename from patches/unapplied/server/Fix-shield-disable-inconsistency.patch rename to patches/server/Fix-shield-disable-inconsistency.patch diff --git a/patches/unapplied/server/Handle-Large-Packets-disconnecting-client.patch b/patches/server/Handle-Large-Packets-disconnecting-client.patch similarity index 99% rename from patches/unapplied/server/Handle-Large-Packets-disconnecting-client.patch rename to patches/server/Handle-Large-Packets-disconnecting-client.patch index 4f318b7928..56438f5615 100644 --- a/patches/unapplied/server/Handle-Large-Packets-disconnecting-client.patch +++ b/patches/server/Handle-Large-Packets-disconnecting-client.patch @@ -118,7 +118,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 diff --git a/patches/unapplied/server/Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch b/patches/server/Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch similarity index 89% rename from patches/unapplied/server/Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch rename to patches/server/Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch index b45d4f4482..2b5e8586e3 100644 --- a/patches/unapplied/server/Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch +++ b/patches/server/Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch @@ -9,16 +9,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -0,0 +0,0 @@ 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; @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable { - if (!this.actuallyHurt(source, (float) event.getFinalDamage() - this.lastHurt, event)) { + 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. @@ -26,13 +26,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.lastHurt = amount; flag1 = false; @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable { - if (!this.actuallyHurt(source, (float) event.getFinalDamage(), event)) { + 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); + // this.actuallyHurt(worldserver, damagesource, f); @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable { return true; diff --git a/patches/unapplied/server/Support-old-UUID-format-for-NBT.patch b/patches/server/Support-old-UUID-format-for-NBT.patch similarity index 100% rename from patches/unapplied/server/Support-old-UUID-format-for-NBT.patch rename to patches/server/Support-old-UUID-format-for-NBT.patch diff --git a/patches/unapplied/server/improve-checking-handled-tags-in-itemmeta.patch b/patches/server/improve-checking-handled-tags-in-itemmeta.patch similarity index 98% rename from patches/unapplied/server/improve-checking-handled-tags-in-itemmeta.patch rename to patches/server/improve-checking-handled-tags-in-itemmeta.patch index 19f0240ffa..3785c09af6 100644 --- a/patches/unapplied/server/improve-checking-handled-tags-in-itemmeta.patch +++ b/patches/server/improve-checking-handled-tags-in-itemmeta.patch @@ -498,18 +498,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - 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 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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, @@ -696,7 +710,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + CraftMetaOminousBottle(DataComponentPatch tag, java.util.Set> 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644