From d7eab570bde699ca11ab876644135983bde5fb73 Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Sat, 14 Dec 2024 18:41:01 +0100 Subject: [PATCH] components --- .../item/component/Consumable.java.patch | 39 ++++++++++++++ .../component/ConsumableListener.java.patch | 9 ++++ .../item/component/CustomData.java.patch | 6 +-- .../item/component/DeathProtection.java.patch | 11 ++++ .../component/LodestoneTracker.java.patch | 6 +-- .../OminousBottleAmplifier.java.patch | 20 +++++++ .../component/ResolvableProfile.java.patch | 20 +++---- .../SuspiciousStewEffects.java.patch | 18 +++++++ .../item/component/Consumable.java.patch | 53 ------------------- .../component/ConsumableListener.java.patch | 9 ---- .../item/component/DeathProtection.java.patch | 22 -------- .../OminousBottleAmplifier.java.patch | 18 ------- .../SuspiciousStewEffects.java.patch | 28 ---------- 13 files changed, 113 insertions(+), 146 deletions(-) create mode 100644 paper-server/patches/sources/net/minecraft/world/item/component/Consumable.java.patch create mode 100644 paper-server/patches/sources/net/minecraft/world/item/component/ConsumableListener.java.patch rename paper-server/patches/{unapplied => sources}/net/minecraft/world/item/component/CustomData.java.patch (83%) create mode 100644 paper-server/patches/sources/net/minecraft/world/item/component/DeathProtection.java.patch rename paper-server/patches/{unapplied => sources}/net/minecraft/world/item/component/LodestoneTracker.java.patch (70%) create mode 100644 paper-server/patches/sources/net/minecraft/world/item/component/OminousBottleAmplifier.java.patch rename paper-server/patches/{unapplied => sources}/net/minecraft/world/item/component/ResolvableProfile.java.patch (58%) create mode 100644 paper-server/patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch delete mode 100644 paper-server/patches/unapplied/net/minecraft/world/item/component/Consumable.java.patch delete mode 100644 paper-server/patches/unapplied/net/minecraft/world/item/component/ConsumableListener.java.patch delete mode 100644 paper-server/patches/unapplied/net/minecraft/world/item/component/DeathProtection.java.patch delete mode 100644 paper-server/patches/unapplied/net/minecraft/world/item/component/OminousBottleAmplifier.java.patch delete mode 100644 paper-server/patches/unapplied/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch diff --git a/paper-server/patches/sources/net/minecraft/world/item/component/Consumable.java.patch b/paper-server/patches/sources/net/minecraft/world/item/component/Consumable.java.patch new file mode 100644 index 0000000000..d39f21455d --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/item/component/Consumable.java.patch @@ -0,0 +1,39 @@ +--- a/net/minecraft/world/item/component/Consumable.java ++++ b/net/minecraft/world/item/component/Consumable.java +@@ -84,13 +_,35 @@ + + stack.getAllOfType(ConsumableListener.class).forEach(consumableListener -> consumableListener.onConsume(level, entity, stack, this)); + if (!level.isClientSide) { +- this.onConsumeEffects.forEach(consumeEffect -> consumeEffect.apply(level, stack, entity)); ++ // CraftBukkit start ++ org.bukkit.event.entity.EntityPotionEffectEvent.Cause cause; ++ if (stack.is(net.minecraft.world.item.Items.MILK_BUCKET)) { ++ cause = org.bukkit.event.entity.EntityPotionEffectEvent.Cause.MILK; ++ } else if (stack.is(net.minecraft.world.item.Items.POTION)) { ++ cause = org.bukkit.event.entity.EntityPotionEffectEvent.Cause.POTION_DRINK; ++ } else { ++ cause = org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD; ++ } ++ ++ this.onConsumeEffects.forEach(consumeEffect -> consumeEffect.apply(level, stack, entity, cause)); ++ // CraftBukkit end + } + + entity.gameEvent(this.animation == ItemUseAnimation.DRINK ? GameEvent.DRINK : GameEvent.EAT); + stack.consume(1, entity); + return stack; + } ++ ++ // CraftBukkit start ++ public void cancelUsingItem(ServerPlayer player, ItemStack stack) { ++ final java.util.List> packets = new it.unimi.dsi.fastutil.objects.ObjectArrayList<>(); // Paper - properly resend entities - collect packets for bundle ++ stack.getAllOfType(ConsumableListener.class).forEach(listener -> { ++ listener.cancelUsingItem(player, stack, packets); // Paper - properly resend entities - collect packets for bundle ++ }); ++ player.server.getPlayerList().sendActiveEffects(player, packets::add); // Paper - properly resend entities - collect packets for bundle ++ player.connection.send(new net.minecraft.network.protocol.game.ClientboundBundlePacket(packets)); ++ } ++ // CraftBukkit end + + public boolean canConsume(LivingEntity entity, ItemStack stack) { + FoodProperties foodProperties = stack.get(DataComponents.FOOD); diff --git a/paper-server/patches/sources/net/minecraft/world/item/component/ConsumableListener.java.patch b/paper-server/patches/sources/net/minecraft/world/item/component/ConsumableListener.java.patch new file mode 100644 index 0000000000..a47c2b2a62 --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/item/component/ConsumableListener.java.patch @@ -0,0 +1,9 @@ +--- a/net/minecraft/world/item/component/ConsumableListener.java ++++ b/net/minecraft/world/item/component/ConsumableListener.java +@@ -6,4 +_,6 @@ + + public interface ConsumableListener { + void onConsume(Level level, LivingEntity entity, ItemStack stack, Consumable consumable); ++ ++ default void cancelUsingItem(net.minecraft.server.level.ServerPlayer player, ItemStack stack, java.util.List> collectedPackets) {} // CraftBukkit // Paper - properly resend entities - collect packets for bundle + } diff --git a/paper-server/patches/unapplied/net/minecraft/world/item/component/CustomData.java.patch b/paper-server/patches/sources/net/minecraft/world/item/component/CustomData.java.patch similarity index 83% rename from paper-server/patches/unapplied/net/minecraft/world/item/component/CustomData.java.patch rename to paper-server/patches/sources/net/minecraft/world/item/component/CustomData.java.patch index 73089c0170..33b96fd4de 100644 --- a/paper-server/patches/unapplied/net/minecraft/world/item/component/CustomData.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/item/component/CustomData.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/world/item/component/CustomData.java +++ b/net/minecraft/world/item/component/CustomData.java -@@ -34,7 +34,17 @@ +@@ -34,7 +_,17 @@ private static final Logger LOGGER = LogUtils.getLogger(); public static final CustomData EMPTY = new CustomData(new CompoundTag()); private static final String TYPE_TAG = "id"; @@ -16,6 +16,6 @@ + } + }) + // Paper end - Item serialization as json - .xmap(CustomData::new, component -> component.tag); + .xmap(CustomData::new, customData -> customData.tag); public static final Codec CODEC_WITH_ID = CODEC.validate( - component -> component.getUnsafe().contains("id", 8) ? DataResult.success(component) : DataResult.error(() -> "Missing id for entity in: " + component) + data -> data.getUnsafe().contains("id", 8) ? DataResult.success(data) : DataResult.error(() -> "Missing id for entity in: " + data) diff --git a/paper-server/patches/sources/net/minecraft/world/item/component/DeathProtection.java.patch b/paper-server/patches/sources/net/minecraft/world/item/component/DeathProtection.java.patch new file mode 100644 index 0000000000..b2efb28173 --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/item/component/DeathProtection.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/component/DeathProtection.java ++++ b/net/minecraft/world/item/component/DeathProtection.java +@@ -37,7 +_,7 @@ + + public void applyEffects(ItemStack stack, LivingEntity entity) { + for (ConsumeEffect consumeEffect : this.deathEffects) { +- consumeEffect.apply(entity.level(), stack, entity); ++ consumeEffect.apply(entity.level(), stack, entity, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.TOTEM); // CraftBukkit + } + } + } diff --git a/paper-server/patches/unapplied/net/minecraft/world/item/component/LodestoneTracker.java.patch b/paper-server/patches/sources/net/minecraft/world/item/component/LodestoneTracker.java.patch similarity index 70% rename from paper-server/patches/unapplied/net/minecraft/world/item/component/LodestoneTracker.java.patch rename to paper-server/patches/sources/net/minecraft/world/item/component/LodestoneTracker.java.patch index 79d33fc6bf..6a668d9014 100644 --- a/paper-server/patches/unapplied/net/minecraft/world/item/component/LodestoneTracker.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/item/component/LodestoneTracker.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/item/component/LodestoneTracker.java +++ b/net/minecraft/world/item/component/LodestoneTracker.java -@@ -29,7 +29,7 @@ +@@ -29,7 +_,7 @@ return this; } else { BlockPos blockPos = this.target.get().pos(); -- return world.isInWorldBounds(blockPos) && world.getPoiManager().existsAtPosition(PoiTypes.LODESTONE, blockPos) -+ return world.isInWorldBounds(blockPos) && (!world.hasChunkAt(blockPos) || world.getPoiManager().existsAtPosition(PoiTypes.LODESTONE, blockPos)) // Paper - Prevent compass from loading chunks +- return level.isInWorldBounds(blockPos) && level.getPoiManager().existsAtPosition(PoiTypes.LODESTONE, blockPos) ++ return level.isInWorldBounds(blockPos) && (!level.hasChunkAt(blockPos) || level.getPoiManager().existsAtPosition(PoiTypes.LODESTONE, blockPos)) // Paper - Prevent compass from loading chunks ? this : new LodestoneTracker(Optional.empty(), true); } diff --git a/paper-server/patches/sources/net/minecraft/world/item/component/OminousBottleAmplifier.java.patch b/paper-server/patches/sources/net/minecraft/world/item/component/OminousBottleAmplifier.java.patch new file mode 100644 index 0000000000..6a00c3c6f2 --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/item/component/OminousBottleAmplifier.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/item/component/OminousBottleAmplifier.java ++++ b/net/minecraft/world/item/component/OminousBottleAmplifier.java +@@ -28,8 +_,15 @@ + + @Override + public void onConsume(Level level, LivingEntity entity, ItemStack stack, Consumable consumable) { +- entity.addEffect(new MobEffectInstance(MobEffects.BAD_OMEN, 120000, this.value, false, false, true)); +- } ++ entity.addEffect(new MobEffectInstance(MobEffects.BAD_OMEN, 120000, this.value, false, false, true)); // Paper - properly resend entities - diff on change for below ++ } ++ ++ // Paper start - properly resend entities - collect packets for bundle ++ @Override ++ public void cancelUsingItem(net.minecraft.server.level.ServerPlayer player, ItemStack stack, List> collectedPackets) { ++ collectedPackets.add(new net.minecraft.network.protocol.game.ClientboundRemoveMobEffectPacket(player.getId(), MobEffects.BAD_OMEN)); ++ } ++ // Paper end - properly resend entities - collect packets for bundle + + @Override + public void addToTooltip(Item.TooltipContext context, Consumer tooltipAdder, TooltipFlag tooltipFlag) { diff --git a/paper-server/patches/unapplied/net/minecraft/world/item/component/ResolvableProfile.java.patch b/paper-server/patches/sources/net/minecraft/world/item/component/ResolvableProfile.java.patch similarity index 58% rename from paper-server/patches/unapplied/net/minecraft/world/item/component/ResolvableProfile.java.patch rename to paper-server/patches/sources/net/minecraft/world/item/component/ResolvableProfile.java.patch index c0d2bc1d79..e12079be3f 100644 --- a/paper-server/patches/unapplied/net/minecraft/world/item/component/ResolvableProfile.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/item/component/ResolvableProfile.java.patch @@ -1,18 +1,18 @@ --- a/net/minecraft/world/item/component/ResolvableProfile.java +++ b/net/minecraft/world/item/component/ResolvableProfile.java -@@ -20,9 +20,10 @@ +@@ -20,9 +_,10 @@ instance -> instance.group( - ExtraCodecs.PLAYER_NAME.optionalFieldOf("name").forGetter(ResolvableProfile::name), - UUIDUtil.CODEC.optionalFieldOf("id").forGetter(ResolvableProfile::id), -+ UUIDUtil.STRING_CODEC.lenientOptionalFieldOf("Id").forGetter($ -> Optional.empty()), // Paper - ExtraCodecs.PROPERTY_MAP.optionalFieldOf("properties", new PropertyMap()).forGetter(ResolvableProfile::properties) - ) -- .apply(instance, ResolvableProfile::new) -+ .apply(instance, (s, uuid, uuid2, propertyMap) -> new ResolvableProfile(s, uuid2.or(() -> uuid), propertyMap)) // Paper + ExtraCodecs.PLAYER_NAME.optionalFieldOf("name").forGetter(ResolvableProfile::name), + UUIDUtil.CODEC.optionalFieldOf("id").forGetter(ResolvableProfile::id), ++ UUIDUtil.STRING_CODEC.lenientOptionalFieldOf("Id").forGetter($ -> Optional.empty()), // Paper + ExtraCodecs.PROPERTY_MAP.optionalFieldOf("properties", new PropertyMap()).forGetter(ResolvableProfile::properties) + ) +- .apply(instance, ResolvableProfile::new) ++ .apply(instance, (name, uuid, uuid2, propertyMap) -> new ResolvableProfile(name, uuid2.or(() -> uuid), propertyMap)) // Paper ); public static final Codec CODEC = Codec.withAlternative( FULL_CODEC, ExtraCodecs.PLAYER_NAME, name -> new ResolvableProfile(Optional.of(name), Optional.empty(), new PropertyMap()) -@@ -49,7 +50,7 @@ +@@ -49,7 +_,7 @@ if (this.isResolved()) { return CompletableFuture.completedFuture(this); } else { @@ -20,4 +20,4 @@ + return this.id.isPresent() ? SkullBlockEntity.fetchGameProfile(this.id.get(), this.name.orElse(null)).thenApply(optional -> { // Paper - player profile events GameProfile gameProfile = optional.orElseGet(() -> new GameProfile(this.id.get(), this.name.orElse(""))); return new ResolvableProfile(gameProfile); - }) : SkullBlockEntity.fetchGameProfile(this.name.orElseThrow()).thenApply(profile -> { + }) : SkullBlockEntity.fetchGameProfile(this.name.orElseThrow()).thenApply(optional -> { diff --git a/paper-server/patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch b/paper-server/patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch new file mode 100644 index 0000000000..d84c096c8b --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/world/item/component/SuspiciousStewEffects.java ++++ b/net/minecraft/world/item/component/SuspiciousStewEffects.java +@@ -41,6 +_,15 @@ + } + } + ++ // CraftBukkit start ++ @Override ++ public void cancelUsingItem(net.minecraft.server.level.ServerPlayer player, ItemStack stack, List> collectedPackets) { // Paper - properly resend entities - collect packets for bundle ++ for (SuspiciousStewEffects.Entry entry : this.effects) { ++ collectedPackets.add(new net.minecraft.network.protocol.game.ClientboundRemoveMobEffectPacket(player.getId(), entry.effect())); // Paper - bundlize packets ++ } ++ } ++ // CraftBukkit end ++ + @Override + public void addToTooltip(Item.TooltipContext context, Consumer tooltipAdder, TooltipFlag tooltipFlag) { + if (tooltipFlag.isCreative()) { diff --git a/paper-server/patches/unapplied/net/minecraft/world/item/component/Consumable.java.patch b/paper-server/patches/unapplied/net/minecraft/world/item/component/Consumable.java.patch deleted file mode 100644 index a163ec68c0..0000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/item/component/Consumable.java.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- a/net/minecraft/world/item/component/Consumable.java -+++ b/net/minecraft/world/item/component/Consumable.java -@@ -29,6 +29,11 @@ - import net.minecraft.world.level.Level; - import net.minecraft.world.level.gameevent.GameEvent; - -+// CraftBukkit start -+import net.minecraft.world.item.Items; -+import org.bukkit.event.entity.EntityPotionEffectEvent; -+// CraftBukkit end -+ - public record Consumable(float consumeSeconds, ItemUseAnimation animation, Holder sound, boolean hasConsumeParticles, List onConsumeEffects) { - - public static final float DEFAULT_CONSUME_SECONDS = 1.6F; -@@ -69,8 +74,19 @@ - consumablelistener.onConsume(world, user, stack, this); - }); - if (!world.isClientSide) { -+ // CraftBukkit start -+ EntityPotionEffectEvent.Cause cause; -+ if (stack.is(Items.MILK_BUCKET)) { -+ cause = EntityPotionEffectEvent.Cause.MILK; -+ } else if (stack.is(Items.POTION)) { -+ cause = EntityPotionEffectEvent.Cause.POTION_DRINK; -+ } else { -+ cause = EntityPotionEffectEvent.Cause.FOOD; -+ } -+ - this.onConsumeEffects.forEach((consumeeffect) -> { -- consumeeffect.apply(world, stack, user); -+ consumeeffect.apply(world, stack, user, cause); -+ // CraftBukkit end - }); - } - -@@ -79,6 +95,17 @@ - return stack; - } - -+ // CraftBukkit start -+ public void cancelUsingItem(net.minecraft.server.level.ServerPlayer entityplayer, ItemStack itemstack) { -+ final java.util.List> packets = new it.unimi.dsi.fastutil.objects.ObjectArrayList<>(); // Paper - properly resend entities - collect packets for bundle -+ itemstack.getAllOfType(ConsumableListener.class).forEach((consumablelistener) -> { -+ consumablelistener.cancelUsingItem(entityplayer, itemstack, packets); // Paper - properly resend entities - collect packets for bundle -+ }); -+ entityplayer.server.getPlayerList().sendActiveEffects(entityplayer, packets::add); // Paper - properly resend entities - collect packets for bundle -+ entityplayer.connection.send(new net.minecraft.network.protocol.game.ClientboundBundlePacket(packets)); -+ } -+ // CraftBukkit end -+ - public boolean canConsume(LivingEntity user, ItemStack stack) { - FoodProperties foodinfo = (FoodProperties) stack.get(DataComponents.FOOD); - diff --git a/paper-server/patches/unapplied/net/minecraft/world/item/component/ConsumableListener.java.patch b/paper-server/patches/unapplied/net/minecraft/world/item/component/ConsumableListener.java.patch deleted file mode 100644 index 2e31354cba..0000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/item/component/ConsumableListener.java.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/net/minecraft/world/item/component/ConsumableListener.java -+++ b/net/minecraft/world/item/component/ConsumableListener.java -@@ -7,4 +7,6 @@ - public interface ConsumableListener { - - void onConsume(Level world, LivingEntity user, ItemStack stack, Consumable consumable); -+ -+ default void cancelUsingItem(net.minecraft.server.level.ServerPlayer entityplayer, ItemStack itemstack, java.util.List> collectedPackets) {} // CraftBukkit // Paper - properly resend entities - collect packets for bundle - } diff --git a/paper-server/patches/unapplied/net/minecraft/world/item/component/DeathProtection.java.patch b/paper-server/patches/unapplied/net/minecraft/world/item/component/DeathProtection.java.patch deleted file mode 100644 index 8516839b42..0000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/item/component/DeathProtection.java.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/net/minecraft/world/item/component/DeathProtection.java -+++ b/net/minecraft/world/item/component/DeathProtection.java -@@ -15,6 +15,10 @@ - import net.minecraft.world.item.consume_effects.ClearAllStatusEffectsConsumeEffect; - import net.minecraft.world.item.consume_effects.ConsumeEffect; - -+// CraftBukkit start -+import org.bukkit.event.entity.EntityPotionEffectEvent; -+// CraftBukkit end -+ - public record DeathProtection(List deathEffects) { - - public static final Codec CODEC = RecordCodecBuilder.create((instance) -> { -@@ -29,7 +33,7 @@ - while (iterator.hasNext()) { - ConsumeEffect consumeeffect = (ConsumeEffect) iterator.next(); - -- consumeeffect.apply(entity.level(), stack, entity); -+ consumeeffect.apply(entity.level(), stack, entity, EntityPotionEffectEvent.Cause.TOTEM); // CraftBukkit - } - - } diff --git a/paper-server/patches/unapplied/net/minecraft/world/item/component/OminousBottleAmplifier.java.patch b/paper-server/patches/unapplied/net/minecraft/world/item/component/OminousBottleAmplifier.java.patch deleted file mode 100644 index 57338edcbf..0000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/item/component/OminousBottleAmplifier.java.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/net/minecraft/world/item/component/OminousBottleAmplifier.java -+++ b/net/minecraft/world/item/component/OminousBottleAmplifier.java -@@ -28,8 +28,14 @@ - - @Override - public void onConsume(Level world, LivingEntity user, ItemStack stack, Consumable consumable) { -- user.addEffect(new MobEffectInstance(MobEffects.BAD_OMEN, 120000, this.value, false, false, true)); -+ user.addEffect(new MobEffectInstance(MobEffects.BAD_OMEN, 120000, this.value, false, false, true)); // Paper - properly resend entities - diff on change for below - } -+ // Paper start - properly resend entities - collect packets for bundle -+ @Override -+ public void cancelUsingItem(net.minecraft.server.level.ServerPlayer entityplayer, ItemStack itemstack, java.util.List> collectedPackets) { -+ collectedPackets.add(new net.minecraft.network.protocol.game.ClientboundRemoveMobEffectPacket(entityplayer.getId(), MobEffects.BAD_OMEN)); -+ } -+ // Paper end - properly resend entities - collect packets for bundle - - @Override - public void addToTooltip(Item.TooltipContext context, Consumer tooltip, TooltipFlag type) { diff --git a/paper-server/patches/unapplied/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch b/paper-server/patches/unapplied/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch deleted file mode 100644 index 2836856f9c..0000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/net/minecraft/world/item/component/SuspiciousStewEffects.java -+++ b/net/minecraft/world/item/component/SuspiciousStewEffects.java -@@ -29,7 +29,7 @@ - public static final StreamCodec STREAM_CODEC = SuspiciousStewEffects.Entry.STREAM_CODEC.apply(ByteBufCodecs.list()).map(SuspiciousStewEffects::new, SuspiciousStewEffects::effects); - - public SuspiciousStewEffects withEffectAdded(SuspiciousStewEffects.Entry stewEffect) { -- return new SuspiciousStewEffects(Util.copyAndAdd(this.effects, (Object) stewEffect)); -+ return new SuspiciousStewEffects(Util.copyAndAdd(this.effects, stewEffect)); // CraftBukkit - decompile error - } - - @Override -@@ -44,7 +44,16 @@ - - } - -+ // CraftBukkit start - @Override -+ public void cancelUsingItem(net.minecraft.server.level.ServerPlayer entityplayer, ItemStack itemstack, java.util.List> collectedPackets) { // Paper - properly resend entities - collect packets for bundle -+ for (SuspiciousStewEffects.Entry suspicioussteweffects_a : this.effects) { -+ collectedPackets.add(new net.minecraft.network.protocol.game.ClientboundRemoveMobEffectPacket(entityplayer.getId(), suspicioussteweffects_a.effect())); // Paper - bundlize packets -+ } -+ } -+ // CraftBukkit end -+ -+ @Override - public void addToTooltip(Item.TooltipContext context, Consumer tooltip, TooltipFlag type) { - if (type.isCreative()) { - List list = new ArrayList();