Fix multinames getting out of sync
This commit is contained in:
parent
a66b41e4f5
commit
ae34cb33b6
4
pom.xml
4
pom.xml
@ -83,12 +83,12 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.3-R0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.3-R0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- testing -->
|
||||
<dependency>
|
||||
|
@ -54,6 +54,10 @@ public class PacketHandlerMovement implements IPacketHandler {
|
||||
double height = disguise.getHeight();
|
||||
|
||||
for (PacketContainer packet : packets.getPackets()) {
|
||||
if (packet.getType() == PacketType.Play.Server.ENTITY_LOOK) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
int standId = disguise.getArmorstandIds()[i];
|
||||
PacketContainer packet2 = packet.shallowClone();
|
||||
@ -193,8 +197,12 @@ public class PacketHandlerMovement implements IPacketHandler {
|
||||
|
||||
if (entity == observer.getVehicle() &&
|
||||
AbstractHorse.class.isAssignableFrom(disguise.getType().getEntityClass())) {
|
||||
PacketContainer packet = movePacket.shallowClone();
|
||||
packet.getModifier().write(0, DisguiseAPI.getEntityAttachmentId());
|
||||
PacketContainer packet = new PacketContainer(PacketType.Play.Server.ENTITY_LOOK);
|
||||
|
||||
packet.getIntegers().write(0, DisguiseAPI.getEntityAttachmentId());
|
||||
packet.getBytes().write(0, yawValue);
|
||||
packet.getBytes().write(1, pitchValue);
|
||||
|
||||
packets.addPacket(packet);
|
||||
} else if (sentPacket.getType() == PacketType.Play.Server.ENTITY_TELEPORT &&
|
||||
disguise.getType() == DisguiseType.ITEM_FRAME) {
|
||||
|
@ -75,7 +75,7 @@ public class PacketListenerViewSelfDisguise extends PacketAdapter {
|
||||
PacketsManager.getPacketsHandler().transformPacket(packet, disguise, observer, observer);
|
||||
|
||||
if (transformed.isUnhandled()) {
|
||||
transformed.getPackets().add(packet);
|
||||
transformed.addPacket(packet);
|
||||
}
|
||||
|
||||
for (PacketContainer newPacket : transformed.getPackets()) {
|
||||
|
Loading…
Reference in New Issue
Block a user