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.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from class net.minecraft.world.level.saveddata.SavedData

    net.minecraft.world.level.saveddata.SavedData.Context
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the next counter value for the given key.

    Methods inherited from class org.cyclops.cyclopscore.persist.world.WorldStorage

    afterLoad, beforeSave

    Methods inherited from class net.minecraft.world.level.saveddata.SavedData

    isDirty, setDirty, setDirty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.