mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +01:00
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:
parent
9a6f2ccb6b
commit
67905be24d
@ -800,6 +800,24 @@
|
|||||||
this.setFlag(7, false);
|
this.setFlag(7, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@@ -1957,7 +2377,7 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- this.p();
|
||||||
|
+ this.updateEquipment(); // PAIL rename
|
||||||
|
if (this.ticksLived % 20 == 0) {
|
||||||
|
this.getCombatTracker().g();
|
||||||
|
}
|
||||||
|
@@ -2058,7 +2478,7 @@
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- private void p() {
|
||||||
|
+ public void updateEquipment() { // PAIL private->public; updateEquipment
|
||||||
|
Map<EnumItemSlot, ItemStack> map = this.q();
|
||||||
|
|
||||||
|
if (map != null) {
|
||||||
@@ -2321,6 +2741,7 @@
|
@@ -2321,6 +2741,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,8 +145,11 @@
|
|||||||
if (!collection.isEmpty()) {
|
if (!collection.isEmpty()) {
|
||||||
consumer.accept(new PacketPlayOutUpdateAttributes(this.tracker.getId(), collection));
|
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
|
+ // CraftBukkit start - Fix for nonsensical head yaw
|
||||||
@ -157,7 +160,7 @@
|
|||||||
if (this.tracker instanceof EntityLiving) {
|
if (this.tracker instanceof EntityLiving) {
|
||||||
EntityLiving entityliving = (EntityLiving) this.tracker;
|
EntityLiving entityliving = (EntityLiving) this.tracker;
|
||||||
Iterator iterator = entityliving.getEffects().iterator();
|
Iterator iterator = entityliving.getEffects().iterator();
|
||||||
@@ -278,6 +335,11 @@
|
@@ -278,6 +336,11 @@
|
||||||
Set<AttributeModifiable> set = ((EntityLiving) this.tracker).getAttributeMap().getAttributes();
|
Set<AttributeModifiable> set = ((EntityLiving) this.tracker).getAttributeMap().getAttributes();
|
||||||
|
|
||||||
if (!set.isEmpty()) {
|
if (!set.isEmpty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user