Hotfix: Fix BountifulWrapper9 (hopefully)

This commit is contained in:
2024-12-01 21:54:59 +01:00
parent 4009f11871
commit e16410fd65
2 changed files with 5 additions and 3 deletions
@@ -47,7 +47,7 @@ public abstract class SimulatorBaseGui {
public final void open() {
String newTitle = title();
String originalTitle = TrickyTrialsWrapper.impl.getInventoryTitle(player.getOpenInventory());
String originalTitle = player.getOpenInventory().getTitle();
if (inv != null && (Core.getVersion() > 19 || newTitle.equals(originalTitle))) {
// TODO: Flickering is better but not gone!
@@ -74,8 +74,10 @@ public class BountifulWrapper9 implements BountifulWrapper.IBountifulWrapper {
posX.set(packet, x);
posY.set(packet, y);
posZ.set(packet, z);
lookPitch.set(packet, (int)(pitch*256/360));
lookYaw.set(packet, (int)(yaw*256/360));
int pitchInt = (int) (pitch*256/360);
lookPitch.set(packet, isByteClass ? (byte) pitchInt : pitchInt);
int yawInt = (int) (yaw*256/360);
lookYaw.set(packet, isByteClass ? (byte) yawInt : yawInt);
};
}