Search in sources :

Example 1 with IDecayCapability

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

the class IPlayerExpansionTBL method setDecaySaturationLevel.

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

Example 2 with IDecayCapability

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

the class IPlayerExpansionTBL method addStats.

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

Example 3 with IDecayCapability

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

the class IPlayerExpansionTBL method getAccelerationLevel.

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

Example 4 with IDecayCapability

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

the class IPlayerExpansionTBL method getDecayLevel.

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

Example 5 with IDecayCapability

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

the class IPlayerExpansionTBL method addDecayAcceleration.

@ZenMethod
public static void addDecayAcceleration(IPlayer player, float acceleration) {
    EntityPlayer mcPlayer = CraftTweakerMC.getPlayer(player);
    IDecayCapability cap = mcPlayer.getCapability(CapabilityRegistry.CAPABILITY_DECAY, null);
    assert cap != null;
    cap.getDecayStats().addDecayAcceleration(acceleration);
}
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