Fix one more warning

This commit is contained in:
Sollace 2024-04-12 01:27:56 +01:00
parent 136267f439
commit fd8a2f3f32
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -218,7 +218,7 @@ public class WorldRenderDelegate {
}
private void flipAngles(Entity entity) {
if (entity instanceof PlayerEntity player) {
if (entity instanceof PlayerEntity) {
entity.prevYaw *= -1;
entity.setYaw(entity.getYaw() * -1);
@ -226,9 +226,7 @@ public class WorldRenderDelegate {
entity.setPitch(entity.getPitch() * -1);
}
if (entity instanceof LivingEntity) {
LivingEntity living = (LivingEntity)entity;
if (entity instanceof LivingEntity living) {
living.bodyYaw = -living.bodyYaw;
living.prevBodyYaw = -living.prevBodyYaw;
living.headYaw = -living.headYaw;