fix player head yaw
This commit is contained in:
parent
e6a7e6f2f0
commit
a3778ffe9c
2 changed files with 3 additions and 5 deletions
|
@ -2,10 +2,9 @@ package lol.pyr.znpcsplus.packets;
|
|||
|
||||
import com.github.retrooper.packetevents.util.Vector3d;
|
||||
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerSpawnEntity;
|
||||
import lol.pyr.znpcsplus.api.entity.PropertyHolder;
|
||||
import lol.pyr.znpcsplus.entity.PacketEntity;
|
||||
import lol.pyr.znpcsplus.util.ZLocation;
|
||||
import lol.pyr.znpcsplus.entity.EntityPropertyImpl;
|
||||
import lol.pyr.znpcsplus.api.entity.PropertyHolder;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.Optional;
|
||||
|
@ -16,7 +15,6 @@ public class V1_14Factory extends V1_10Factory {
|
|||
ZLocation location = entity.getLocation();
|
||||
sendPacket(player, new WrapperPlayServerSpawnEntity(entity.getEntityId(), Optional.of(entity.getUuid()), entity.getType(),
|
||||
location.toVector3d(), location.getPitch(), location.getYaw(), location.getYaw(), 0, Optional.of(new Vector3d())));
|
||||
if (properties.hasProperty(EntityPropertyImpl.GLOW)) createTeam(player, entity, properties);
|
||||
sendAllMetadata(player, entity, properties);
|
||||
createTeam(player, entity, properties);
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ public class V1_8Factory implements PacketFactory {
|
|||
ZLocation location = entity.getLocation();
|
||||
sendPacket(player, new WrapperPlayServerSpawnPlayer(entity.getEntityId(),
|
||||
entity.getUuid(), location.toVector3d(), location.getYaw(), location.getPitch(), Collections.emptyList()));
|
||||
sendPacket(player, new WrapperPlayServerEntityHeadLook(entity.getEntityId(), location.getYaw()));
|
||||
sendAllMetadata(player, entity, properties);
|
||||
ZNpcsPlus.SCHEDULER.runLaterAsync(() -> removeTabPlayer(player, entity), 60);
|
||||
});
|
||||
|
@ -60,8 +61,7 @@ public class V1_8Factory implements PacketFactory {
|
|||
@Override
|
||||
public void teleportEntity(Player player, PacketEntity entity) {
|
||||
ZLocation location = entity.getLocation();
|
||||
sendPacket(player, new WrapperPlayServerEntityTeleport(entity.getEntityId(),
|
||||
location.toVector3d(), location.getYaw(), location.getPitch(), true));
|
||||
sendPacket(player, new WrapperPlayServerEntityTeleport(entity.getEntityId(), location.toVector3d(), location.getYaw(), location.getPitch(), true));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue