Fix my fix of the enderdragon bug, actually doubling down on the bug..

This commit is contained in:
libraryaddict 2025-01-06 02:20:32 +13:00
parent ea0ab6ae73
commit a1c7aa5037

View File

@ -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,