Remove dead code, param renames in added methods

This commit is contained in:
Nassim Jahnke
2024-12-17 21:59:59 +01:00
parent 2612fb57dc
commit 972266605e
4 changed files with 11 additions and 60 deletions

View File

@@ -125,8 +125,8 @@
Set<AttributeInstance> attributesToSync = ((LivingEntity)this.entity).getAttributes().getAttributesToSync();
if (!attributesToSync.isEmpty()) {
+ // CraftBukkit start - Send scaled max health
+ if (this.entity instanceof ServerPlayer) {
+ ((ServerPlayer) this.entity).getBukkitEntity().injectScaledMaxHealth(attributesToSync, false);
+ if (this.entity instanceof ServerPlayer serverPlayer) {
+ serverPlayer.getBukkitEntity().injectScaledMaxHealth(attributesToSync, false);
+ }
+ // CraftBukkit end
this.broadcastAndSend(new ClientboundUpdateAttributesPacket(this.entity.getId(), attributesToSync));