Package ml.pluto7073.chemicals.handlers
Class HalfLifeChemicalHandler
java.lang.Object
ml.pluto7073.chemicals.handlers.ChemicalHandler
ml.pluto7073.chemicals.handlers.HalfLifeChemicalHandler
A Chemical handler that exponentially ticks down the amount in a player, using the specified half life.
-
Field Summary
FieldsFields inherited from class ml.pluto7073.chemicals.handlers.ChemicalHandler
accessor, EMPTY, maxRecommendedAmount, ticksAccessor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoTick(net.minecraft.world.entity.player.Player player) Updates the current amount of the chemical in the specified playerMethods inherited from class ml.pluto7073.chemicals.handlers.ChemicalHandler
add, appendTooltip, bloom, contrast, createCustomChemicalCommandExtension, createInstance, createInstance, defineDataForPlayer, formatAmount, get, getEffectsForAmount, getId, getLanguageKey, getMaxRecommendedAmount, getStrength, init, loadExtraPlayerData, saveExtraPlayerData, set, tickPlayer
-
Field Details
-
perTickMultiplier
protected final float perTickMultiplier
-
-
Constructor Details
-
HalfLifeChemicalHandler
public HalfLifeChemicalHandler(int halfLifeTicks, float maxRecommendedAmount)
-
-
Method Details
-
doTick
public void doTick(net.minecraft.world.entity.player.Player player) Description copied from class:ChemicalHandlerUpdates the current amount of the chemical in the specified player- Specified by:
doTickin classChemicalHandler- Parameters:
player- The player to update
-