Search in sources :

Example 6 with CarrierComponent

use of me.steven.carrier.api.CarrierComponent in project Carrier by GabrielOlvH.

the class MixinPlayerEntity method b.

@Inject(method = "checkFallFlying", at = @At("HEAD"), cancellable = true)
private void b(CallbackInfoReturnable<Boolean> cir) {
    CarrierComponent carrier = Carrier.HOLDER.get(this);
    CarryingData carrying = carrier.getCarryingData();
    if (carrying != null) {
        cir.setReturnValue(false);
    }
}
Also used : CarryingData(me.steven.carrier.api.CarryingData) CarrierComponent(me.steven.carrier.api.CarrierComponent) Inject(org.spongepowered.asm.mixin.injection.Inject)

Aggregations

CarrierComponent (me.steven.carrier.api.CarrierComponent)6 CarryingData (me.steven.carrier.api.CarryingData)5 Inject (org.spongepowered.asm.mixin.injection.Inject)5 ClientPlayerEntity (net.minecraft.client.network.ClientPlayerEntity)1 StatusEffectInstance (net.minecraft.entity.effect.StatusEffectInstance)1 PlayerEntity (net.minecraft.entity.player.PlayerEntity)1 ServerPlayerEntity (net.minecraft.server.network.ServerPlayerEntity)1