Fixed crash when taking damage

This commit is contained in:
Sollace 2023-06-07 23:41:08 +01:00
parent f278bdb1ae
commit ee0a3df549

View file

@ -40,7 +40,7 @@ abstract class MixinDamageSource {
@Mixin(FallLocation.class) @Mixin(FallLocation.class)
abstract class MixinFallLocation { abstract class MixinFallLocation {
@Inject(method = "fromEntity", at = @At("RETURN")) @Inject(method = "fromEntity", at = @At("RETURN"), cancellable = true)
private static void onFromEntity(LivingEntity entity, CallbackInfoReturnable<FallLocation> info) { private static void onFromEntity(LivingEntity entity, CallbackInfoReturnable<FallLocation> info) {
FallLocation location = info.getReturnValue(); FallLocation location = info.getReturnValue();
if (location == null) { if (location == null) {