Search in sources :

Example 6 with IDecayCapability

use of thebetweenlands.api.capability.IDecayCapability in project RandomTweaker by Project-RT.

the class IPlayerExpansionTBL method getPrevDecayLevel.

@ZenMethod
public static int getPrevDecayLevel(IPlayer player) {
    EntityPlayer mcPlayer = CraftTweakerMC.getPlayer(player);
    IDecayCapability cap = mcPlayer.getCapability(CapabilityRegistry.CAPABILITY_DECAY, null);
    assert cap != null;
    return cap.getDecayStats().getPrevDecayLevel();
}
Also used : EntityPlayer(net.minecraft.entity.player.EntityPlayer) IDecayCapability(thebetweenlands.api.capability.IDecayCapability) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 7 with IDecayCapability

use of thebetweenlands.api.capability.IDecayCapability in project RandomTweaker by Project-RT.

the class IPlayerExpansionTBL method setDecayLevel.

@ZenMethod
public static void setDecayLevel(IPlayer player, int decay) {
    EntityPlayer mcPlayer = CraftTweakerMC.getPlayer(player);
    IDecayCapability cap = mcPlayer.getCapability(CapabilityRegistry.CAPABILITY_DECAY, null);
    assert cap != null;
    cap.getDecayStats().setDecayLevel(decay);
}
Also used : EntityPlayer(net.minecraft.entity.player.EntityPlayer) IDecayCapability(thebetweenlands.api.capability.IDecayCapability) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 8 with IDecayCapability

use of thebetweenlands.api.capability.IDecayCapability in project RandomTweaker by Project-RT.

the class IPlayerExpansionTBL method getSaturationLevel.

@ZenMethod
public static float getSaturationLevel(IPlayer player) {
    EntityPlayer mcPlayer = CraftTweakerMC.getPlayer(player);
    IDecayCapability cap = mcPlayer.getCapability(CapabilityRegistry.CAPABILITY_DECAY, null);
    assert cap != null;
    return cap.getDecayStats().getSaturationLevel();
}
Also used : EntityPlayer(net.minecraft.entity.player.EntityPlayer) IDecayCapability(thebetweenlands.api.capability.IDecayCapability) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 9 with IDecayCapability

use of thebetweenlands.api.capability.IDecayCapability in project RandomTweaker by Project-RT.

the class IPlayerExpansionTBL method isCapBeNull.

@ZenMethod
public static boolean isCapBeNull(IPlayer player) {
    EntityPlayer mcPlayer = CraftTweakerMC.getPlayer(player);
    IDecayCapability cap = mcPlayer.getCapability(CapabilityRegistry.CAPABILITY_DECAY, null);
    return cap == null;
}
Also used : EntityPlayer(net.minecraft.entity.player.EntityPlayer) IDecayCapability(thebetweenlands.api.capability.IDecayCapability) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Aggregations

EntityPlayer (net.minecraft.entity.player.EntityPlayer)9 ZenMethod (stanhebben.zenscript.annotations.ZenMethod)9 IDecayCapability (thebetweenlands.api.capability.IDecayCapability)9