Fix scarpet's unmountable attribute
This commit is contained in:
1 parent
469a9356f6
commit
c9b90ab766
2 files changed
+9
-2
No files matched your search
@@ -18,6 +18,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
||||
|
||||
import static carpet.script.CarpetEventServer.Event.PLAYER_ATTACKS_ENTITY;
|
||||
import static carpet.script.CarpetEventServer.Event.PLAYER_DEALS_DAMAGE;
|
||||
@@ -86,4 +87,10 @@ public abstract class Player_scarpetEventsMixin extends LivingEntity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ModifyReturnValue(method = "wantsToStopRiding", at = @At("TAIL"))
|
||||
private boolean dontUnmountFromIfPermanentVehicle(boolean original)
|
||||
{
|
||||
return original && !((EntityInterface) this.getVehicle()).isPermanentVehicle();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user