类 EternalPotatoFacade

java.lang.Object
top.r3944realms.superleadrope.core.potato.EternalPotatoFacade

public class EternalPotatoFacade extends Object
外观类:统一入口 调用方只管 Facade,不关心底层是 Local 还是 Synced。
  • 构造器详细资料

    • EternalPotatoFacade

      public EternalPotatoFacade()
  • 方法详细资料

    • addListener

      public static void addListener(IEternalPotatoChangeListener listener)
      Add listener.
      参数:
      listener - the listener
    • removeListener

      public static void removeListener(IEternalPotatoChangeListener listener)
      Remove listener.
      参数:
      listener - the listener
    • getManager

      public static IEternalPotatoManager getManager()
      Gets manager.
      返回:
      the manager
    • getSavedData

      public static PotatoSavedData getSavedData()
      Gets saved data.
      返回:
      the saved data
    • initSavedData

      public static void initSavedData(net.minecraft.server.level.ServerLevel serverLevel)
      Init saved data.
      参数:
      serverLevel - the server level
    • init

      public static void init(PotatoMode mode, boolean isServer)
      初始化(进入世界时调用)
      参数:
      mode - 当前运行模式
      isServer - 是否在服务端
    • getOrCreate

      public static IEternalPotato getOrCreate(UUID uuid)
      Gets or create.
      参数:
      uuid - the uuid
      返回:
      the or create
    • remove

      public static void remove(UUID uuid)
      Remove.
      参数:
      uuid - the uuid
    • clear

      public static void clear()
      Clear.
    • isServer

      public static boolean isServer()
      Is server boolean.
      返回:
      the boolean