Fixed error rendering passengers in the HDSkins preview screen #119

This commit is contained in:
Sollace 2023-05-29 10:14:57 +01:00
parent 499df238d0
commit 5ad9b46430

View file

@ -28,7 +28,7 @@ abstract class MixinEntity implements EntityDuck {
@Override @Override
public boolean isLavaAffine() { public boolean isLavaAffine() {
Entity self = (Entity)(Object)this; Entity self = (Entity)(Object)this;
return self.hasVehicle() && ((LavaAffine)self.getVehicle()).isLavaAffine(); return self.hasVehicle() && self.getVehicle() instanceof LavaAffine affine && affine.isLavaAffine();
} }
@Inject(method = "isFireImmune", at = @At("HEAD"), cancellable = true) @Inject(method = "isFireImmune", at = @At("HEAD"), cancellable = true)