Class GlobalCounters
java.lang.Object
org.cyclops.cyclopscore.persist.world.WorldStorage
org.cyclops.cyclopscore.persist.world.GlobalCounters
- All Implemented Interfaces:
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
-
Method Summary
Methods inherited from class org.cyclops.cyclopscore.persist.world.WorldStorage
afterLoad, beforeSave, onAboutToStartEvent, onStartedEvent, onStoppingEvent, readFromNBT, writeToNBT
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cyclops.cyclopscore.persist.nbt.INBTProvider
readGeneratedFieldsFromNBT, writeGeneratedFieldsToNBT
-
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
-