public class DegradationExecutor
extends java.lang.Object
IDegradable.| Constructor and Description |
|---|
DegradationExecutor(IDegradable degradable)
Make a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getTickInterval() |
void |
read(net.minecraft.nbt.CompoundNBT compound)
Reads the data for this executor from NBT.
|
boolean |
runRandomEffect(boolean isRemote)
Execute a random
IDegradationEffect if the tick is at the correct value that
as defined in getTickInterval(). |
void |
setTickInterval(int tickInterval) |
void |
write(net.minecraft.nbt.CompoundNBT compound)
Writes the data for this executor to NBT.
|
public DegradationExecutor(IDegradable degradable)
degradable - The IDegradable this executor applies to.public boolean runRandomEffect(boolean isRemote)
IDegradationEffect if the tick is at the correct value that
as defined in getTickInterval(). Each time this method
is called, the tick is increased.isRemote - True for clients, false for servers.public void read(net.minecraft.nbt.CompoundNBT compound)
compound - The tag to read from.public void write(net.minecraft.nbt.CompoundNBT compound)
compound - The tag to write to.public int getTickInterval()
public void setTickInterval(int tickInterval)
tickInterval - the tickInterval to set