SPIGOT-3789: Can't Remove Entity Equipment in Same Tick Spawned without using Consumer

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-01-27 14:24:20 +11:00
parent 9a6f2ccb6b
commit 67905be24d
2 changed files with 23 additions and 2 deletions

View File

@@ -145,8 +145,11 @@
if (!collection.isEmpty()) {
consumer.accept(new PacketPlayOutUpdateAttributes(this.tracker.getId(), collection));
}
@@ -238,6 +290,11 @@
@@ -236,8 +288,14 @@
if (!list.isEmpty()) {
consumer.accept(new PacketPlayOutEntityEquipment(this.tracker.getId(), list));
}
+ ((EntityLiving) this.tracker).updateEquipment(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending
}
+ // CraftBukkit start - Fix for nonsensical head yaw
@@ -157,7 +160,7 @@
if (this.tracker instanceof EntityLiving) {
EntityLiving entityliving = (EntityLiving) this.tracker;
Iterator iterator = entityliving.getEffects().iterator();
@@ -278,6 +335,11 @@
@@ -278,6 +336,11 @@
Set<AttributeModifiable> set = ((EntityLiving) this.tracker).getAttributeMap().getAttributes();
if (!set.isEmpty()) {