Class GlobalCounters
java.lang.Object
org.cyclops.cyclopscore.persist.world.WorldStorage
org.cyclops.cyclopscore.persist.world.GlobalCounters
- All Implemented Interfaces:
org.cyclops.cyclopscore.persist.nbt.INBTProvider
Global counter that is shared over all dimensions, persisted, and consistent over server and clients.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cyclops.cyclopscore.persist.world.WorldStorage
WorldStorage.NBTDataHolder
-
Field Summary
Fields inherited from class org.cyclops.cyclopscore.persist.world.WorldStorage
mod
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.cyclops.cyclopscore.persist.world.WorldStorage
afterLoad, beforeSave, onAboutToStartEvent, onStartedEvent, onStoppingEvent, readFromNBT, readGeneratedFieldsFromNBT, writeGeneratedFieldsToNBT, writeToNBT
-
Constructor Details
-
GlobalCounters
-
-
Method Details
-
getNext
Get the next counter value for the given key.- Parameters:
key
- the key for the counter.- Returns:
- The next counter value.
-
reset
public void reset()Description copied from class:WorldStorage
Reset the stored data because it will be reloaded from NBT.- Specified by:
reset
in classWorldStorage
-
getDataId
- Specified by:
getDataId
in classWorldStorage
-