Class GlobalCounters

java.lang.Object
org.cyclops.cyclopscore.persist.world.WorldStorage
org.cyclops.cyclopscore.persist.world.GlobalCounters
All Implemented Interfaces:
INBTProvider

public class GlobalCounters extends WorldStorage
Global counter that is shared over all dimensions, persisted, and consistent over server and clients.
  • Constructor Details

    • GlobalCounters

      public GlobalCounters(ModBase mod)
  • Method Details

    • getNext

      public int getNext(String key)
      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 class WorldStorage
    • getDataId

      protected String getDataId()
      Specified by:
      getDataId in class WorldStorage