Class GlobalCounters

java.lang.Object
net.minecraft.world.level.saveddata.SavedData
org.cyclops.cyclopscore.persist.world.WorldStorage<GlobalCounters>
org.cyclops.cyclopscore.persist.world.GlobalCounters

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

  • 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.