public class EncounterData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected EnumEncounterMode |
defaultMode
The default encounter mode, usually from the config.
|
protected long |
lastEncounter |
protected EnumEncounterMode |
mode
The encounter mode loaded from nbt, this overrides the default mode provided from the config.
|
protected java.util.Map<java.util.UUID,java.lang.Long> |
playerEncounters |
Constructor and Description |
---|
EncounterData(EnumEncounterMode defaultMode) |
Modifier and Type | Method and Description |
---|---|
void |
addEncounter(java.util.UUID player,
long time) |
boolean |
canEncounter(net.minecraft.entity.player.PlayerEntity player) |
EnumEncounterMode |
getMode() |
void |
read(net.minecraft.nbt.CompoundNBT compound) |
void |
registerEncounter(net.minecraft.entity.player.PlayerEntity player) |
net.minecraft.nbt.CompoundNBT |
write(net.minecraft.nbt.CompoundNBT compound) |
protected final EnumEncounterMode defaultMode
protected EnumEncounterMode mode
protected long lastEncounter
protected final java.util.Map<java.util.UUID,java.lang.Long> playerEncounters
public EncounterData(EnumEncounterMode defaultMode)
public boolean canEncounter(net.minecraft.entity.player.PlayerEntity player)
public void registerEncounter(net.minecraft.entity.player.PlayerEntity player)
public void addEncounter(java.util.UUID player, long time)
public EnumEncounterMode getMode()
public net.minecraft.nbt.CompoundNBT write(net.minecraft.nbt.CompoundNBT compound)
public void read(net.minecraft.nbt.CompoundNBT compound)