public class ItemCooldownManager extends Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
ItemCooldownManager.Entry |
Modifier and Type | Field and Description |
---|---|
private Map<Item,ItemCooldownManager.Entry> |
entries |
private int |
tick |
Constructor and Description |
---|
ItemCooldownManager() |
Modifier and Type | Method and Description |
---|---|
float |
getCooldownProgress(Item item,
float partialTicks) |
boolean |
isCoolingDown(Item item) |
protected void |
onCooldownUpdate(Item item) |
protected void |
onCooldownUpdate(Item item,
int duration) |
void |
remove(Item item) |
void |
set(Item item,
int duration) |
void |
update() |
private final Map<Item,ItemCooldownManager.Entry> entries
private int tick
public boolean isCoolingDown(Item item)
public float getCooldownProgress(Item item, float partialTicks)
public void update()
public void set(Item item, int duration)
@Environment(value=CLIENT) public void remove(Item item)
protected void onCooldownUpdate(Item item, int duration)
protected void onCooldownUpdate(Item item)