mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-02-02 23:31:53 +01:00
Fix my fix of the enderdragon bug, actually doubling down on the bug..
This commit is contained in:
parent
ea0ab6ae73
commit
a1c7aa5037
@ -107,16 +107,17 @@ public class PacketHandlerSpawn implements IPacketHandler {
|
|||||||
float pitch = (pitchLock == null ? disguisedEntity.getLocation().getPitch() : pitchLock);
|
float pitch = (pitchLock == null ? disguisedEntity.getLocation().getPitch() : pitchLock);
|
||||||
|
|
||||||
if (DisguiseConfig.isMovementPacketsEnabled()) {
|
if (DisguiseConfig.isMovementPacketsEnabled()) {
|
||||||
if (yawLock == null) {
|
if (yawLock != null) {
|
||||||
yaw = DisguiseUtilities.getYaw(DisguiseType.getType(disguisedEntity.getType()), yaw);
|
yaw = DisguiseUtilities.getYaw(disguise.getType(), yaw);
|
||||||
|
} else {
|
||||||
|
yaw = DisguiseUtilities.getYaw(disguise.getType(), DisguiseType.getType(disguisedEntity.getType()), yaw);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pitchLock == null) {
|
if (pitchLock != null) {
|
||||||
pitch = DisguiseUtilities.getPitch(DisguiseType.getType(disguisedEntity.getType()), pitch);
|
pitch = DisguiseUtilities.getPitch(disguise.getType(), pitch);
|
||||||
|
} else {
|
||||||
|
pitch = DisguiseUtilities.getPitch(disguise.getType(), DisguiseType.getType(disguisedEntity.getType()), pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
yaw = DisguiseUtilities.getYaw(disguise.getType(), yaw);
|
|
||||||
pitch = DisguiseUtilities.getPitch(disguise.getType(), pitch);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
com.github.retrooper.packetevents.protocol.world.Location pLoc =
|
com.github.retrooper.packetevents.protocol.world.Location pLoc =
|
||||||
@ -397,7 +398,7 @@ public class PacketHandlerSpawn implements IPacketHandler {
|
|||||||
PacketWrapper spawnEntity;
|
PacketWrapper spawnEntity;
|
||||||
int entityId = observer == disguisedEntity ? DisguiseAPI.getSelfDisguiseId() : disguisedEntity.getEntityId();
|
int entityId = observer == disguisedEntity ? DisguiseAPI.getSelfDisguiseId() : disguisedEntity.getEntityId();
|
||||||
com.github.retrooper.packetevents.protocol.world.Location location =
|
com.github.retrooper.packetevents.protocol.world.Location location =
|
||||||
new com.github.retrooper.packetevents.protocol.world.Location(loc.getX(), loc.getY(), loc.getZ(), pitch, yaw);
|
new com.github.retrooper.packetevents.protocol.world.Location(loc.getX(), loc.getY(), loc.getZ(), yaw, pitch);
|
||||||
|
|
||||||
if (NmsVersion.v1_19_R1.isSupported()) {
|
if (NmsVersion.v1_19_R1.isSupported()) {
|
||||||
spawnEntity = new WrapperPlayServerSpawnEntity(entityId, disguise.getUUID(), entityType, location, yaw, 0,
|
spawnEntity = new WrapperPlayServerSpawnEntity(entityId, disguise.getUUID(), entityType, location, yaw, 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user