Package net.minecraft.util
Class CooldownTracker
- java.lang.Object
-
- net.minecraft.util.CooldownTracker
-
- Direct Known Subclasses:
ServerCooldownTracker
public class CooldownTracker extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
CooldownTracker.Cooldown
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<Item,CooldownTracker.Cooldown>
cooldowns
private int
tickCount
-
Constructor Summary
Constructors Constructor Description CooldownTracker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCooldown(Item p_185145_1_, int p_185145_2_)
float
getCooldownPercent(Item p_185143_1_, float p_185143_2_)
boolean
isOnCooldown(Item p_185141_1_)
protected void
onCooldownEnded(Item p_185146_1_)
protected void
onCooldownStarted(Item p_185140_1_, int p_185140_2_)
void
removeCooldown(Item p_185142_1_)
void
tick()
-
-
-
Field Detail
-
cooldowns
private final java.util.Map<Item,CooldownTracker.Cooldown> cooldowns
-
tickCount
private int tickCount
-
-
Method Detail
-
isOnCooldown
public boolean isOnCooldown(Item p_185141_1_)
-
getCooldownPercent
public float getCooldownPercent(Item p_185143_1_, float p_185143_2_)
-
tick
public void tick()
-
addCooldown
public void addCooldown(Item p_185145_1_, int p_185145_2_)
-
removeCooldown
public void removeCooldown(Item p_185142_1_)
-
onCooldownStarted
protected void onCooldownStarted(Item p_185140_1_, int p_185140_2_)
-
onCooldownEnded
protected void onCooldownEnded(Item p_185146_1_)
-
-