记录类 ImmediateWindowHandler.DummyProvider

java.lang.Object
java.lang.Record
net.minecraftforge.fml.loading.ImmediateWindowHandler.DummyProvider
所有已实现的接口:
ImmediateWindowProvider
封闭类:
ImmediateWindowHandler

private static record ImmediateWindowHandler.DummyProvider() extends Record implements ImmediateWindowProvider
  • 字段详细资料

    • NV_HANDOFF

      private static Method NV_HANDOFF
    • NV_POSITION

      private static Method NV_POSITION
    • NV_OVERLAY

      private static Method NV_OVERLAY
    • NV_VERSION

      private static Method NV_VERSION
  • 构造器详细资料

    • DummyProvider

      private DummyProvider()
      创建 DummyProvider 记录类的实例。
  • 方法详细资料

    • name

      public String name()
      指定者:
      name 在接口中 ImmediateWindowProvider
      返回:
      The name of this window provider. Do NOT use fmlearlywindow.
    • initialize

      public Runnable initialize(String[] args)
      从接口复制的说明: ImmediateWindowProvider
      This is called very early on to initialize ourselves. Use this to initialize the window and other GL core resources. One thing we want to ensure is that we try and create the highest GL_PROFILE we can accomplish. GLFW_CONTEXT_VERSION_MAJOR,GLFW_CONTEXT_VERSION_MINOR should be as high as possible on the created window, and it should have all the typical profile settings.
      指定者:
      initialize 在接口中 ImmediateWindowProvider
      参数:
      args - The arguments provided to the Java process. This is the entire command line, so you can process stuff from it.
      返回:
      A runnable that will be periodically ticked by FML during startup ON THE MAIN THREAD. This is usually a good place to put glfwPollEvents() tests.
    • updateFramebufferSize

      public void updateFramebufferSize(IntConsumer width, IntConsumer height)
      从接口复制的说明: ImmediateWindowProvider
      This will be called during the handoff to minecraft to update minecraft with the size of the framebuffer we have. Generally won't be called because Minecraft figures it out for itself.
      指定者:
      updateFramebufferSize 在接口中 ImmediateWindowProvider
      参数:
      width - Consumer of the framebuffer width
      height - Consumer of the framebuffer height
    • setupMinecraftWindow

      public long setupMinecraftWindow(IntSupplier width, IntSupplier height, Supplier<String> title, LongSupplier monitor)
      从接口复制的说明: ImmediateWindowProvider
      This is called to setup the minecraft window, as if Mojang had done it themselves in their Window class. This handoff is difficult to get right - you have to make sure that any activities you're doing to the window are finished prior to returning. You should try and setup the width and height as Mojang expects - the suppliers give you all that information. Alternatively, you can force Mojang to update from the current position of the window in ImmediateWindowProvider.positionWindow(Optional, IntConsumer, IntConsumer, IntConsumer, IntConsumer) instead. This might give a more seamless experience.
      指定者:
      setupMinecraftWindow 在接口中 ImmediateWindowProvider
      参数:
      width - This is the width of the window Mojang expects
      height - This is the height of the Window Mojang expects.
      title - This is the title for the window.
      monitor - This is the monitor it should appear on.
      返回:
      The window id
    • positionWindow

      public boolean positionWindow(Optional<Object> monitor, IntConsumer widthSetter, IntConsumer heightSetter, IntConsumer xSetter, IntConsumer ySetter)
      从接口复制的说明: ImmediateWindowProvider
      This is called after window handoff to allow us to tell Mojang about our window's position. This might give a preferrable user experience to users, because we just tell Mojang our truth, rather than accept theirs.
      指定者:
      positionWindow 在接口中 ImmediateWindowProvider
      参数:
      monitor - This is the monitor we're rendering on. Note that this is the Mojang monitor object. You might have trouble unwrapping it.
      widthSetter - This sets the width on the Mojang side
      heightSetter - This sets the height on the Mojang side
      xSetter - This sets the x coordinate on the Mojang side
      ySetter - This sets the y coordinate on the Mojang side
      返回:
      true if you've handled the window positioning - this skips the "forced fullscreen" code until a later stage
    • loadingOverlay

      public <T> Supplier<T> loadingOverlay(Supplier<?> mc, Supplier<?> ri, Consumer<Optional<Throwable>> ex, boolean fade)
      从接口复制的说明: ImmediateWindowProvider
      Return a Supplier of an object extending the LoadingOverlay class from Mojang. This is what will be used once the Mojang window code has taken over rendering of the window, to render the later stages of the loading process.
      指定者:
      loadingOverlay 在接口中 ImmediateWindowProvider
      类型参数:
      T - This is the type LoadingOverlay to allow type binding on the Mojang side
      参数:
      mc - This supplies the Minecraft object
      ri - This supplies the ReloadInstance object that tells us when the loading is finished
      ex - This Consumes the final state of the loading - if it's an error you pass it the Throwable, otherwise you pass Optional.empty()
      fade - This is the fade flag passed to LoadingOverlay. You probably want to ignore it.
      返回:
      A supplier of your later LoadingOverlay screen.
    • getGLVersion

      public String getGLVersion()
      从接口复制的说明: ImmediateWindowProvider
      This is called to construct a ForgeFeature for the GL_VERSION we managed to create for the window. Should be a string of the format {MAJOR}.{MINOR}, such as 4.6, 4.5 or such.
      指定者:
      getGLVersion 在接口中 ImmediateWindowProvider
      返回:
      the GL profile we created
    • updateModuleReads

      public void updateModuleReads(ModuleLayer layer)
      从接口复制的说明: ImmediateWindowProvider
      This is called during the module loading process to allow us to find objects inside the GAME layer, such as a later loading screen.
      指定者:
      updateModuleReads 在接口中 ImmediateWindowProvider
      参数:
      layer - This is the GAME layer from ModLauncher
    • periodicTick

      public void periodicTick()
      从接口复制的说明: ImmediateWindowProvider
      This is called periodically during the loading process to "tick" the window. It is typically the same as the Runnable from ImmediateWindowProvider.initialize(String[])
      指定者:
      periodicTick 在接口中 ImmediateWindowProvider
    • toString

      public final String toString()
      返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。
      指定者:
      toString 在类中 Record
      返回:
      此对象的字符串表示形式
    • hashCode

      public final int hashCode()
      返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。
      指定者:
      hashCode 在类中 Record
      返回:
      此对象的哈希代码值
    • equals

      public final boolean equals(Object o)
      指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。
      指定者:
      equals 在类中 Record
      参数:
      o - 要与之进行比较的对象
      返回:
      如果此对象与 o 参数相同,则为 true;否则为 false