java.lang.Object
net.minecraft.client.renderer.texture.AbstractTexture
team.lodestar.lodestone.systems.rendering.multipass.DynamicTexture
All Implemented Interfaces:
AutoCloseable

public class DynamicTexture extends net.minecraft.client.renderer.texture.AbstractTexture
  • Field Summary

    Fields inherited from class net.minecraft.client.renderer.texture.AbstractTexture

    blur, id, mipmap, NOT_ASSIGNED
  • Constructor Summary

    Constructors
    Constructor
    Description
    DynamicTexture(net.minecraft.resources.ResourceLocation resourceLocation, int size)
     
    DynamicTexture(net.minecraft.resources.ResourceLocation resourceLocation, int width, int height)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    void
    Downloads the GPU texture to CPU for edit
    com.mojang.blaze3d.pipeline.RenderTarget
     
    int
     
    int
     
    com.mojang.blaze3d.platform.NativeImage
     
    net.minecraft.resources.ResourceLocation
     
    int
     
    void
    load(net.minecraft.server.packs.resources.ResourceManager manager)
     
    void
     
    saveTextureToFile(Path texturesDir)
     
    void
    Uploads the image to GPU and closes its CPU side one

    Methods inherited from class net.minecraft.client.renderer.texture.AbstractTexture

    bind, reset, restoreLastBlurMipmap, setBlurMipmap, setFilter

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DynamicTexture

      public DynamicTexture(net.minecraft.resources.ResourceLocation resourceLocation, int width, int height)
    • DynamicTexture

      public DynamicTexture(net.minecraft.resources.ResourceLocation resourceLocation, int size)
  • Method Details

    • load

      public void load(net.minecraft.server.packs.resources.ResourceManager manager)
      Specified by:
      load in class net.minecraft.client.renderer.texture.AbstractTexture
    • getFrameBuffer

      public com.mojang.blaze3d.pipeline.RenderTarget getFrameBuffer()
    • bindWrite

      public void bindWrite()
    • getWidth

      public int getWidth()
    • getHeight

      public int getHeight()
    • getTextureLocation

      public net.minecraft.resources.ResourceLocation getTextureLocation()
    • getId

      public int getId()
      Overrides:
      getId in class net.minecraft.client.renderer.texture.AbstractTexture
    • releaseId

      public void releaseId()
      Overrides:
      releaseId in class net.minecraft.client.renderer.texture.AbstractTexture
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class net.minecraft.client.renderer.texture.AbstractTexture
    • getPixels

      public com.mojang.blaze3d.platform.NativeImage getPixels()
    • download

      public void download()
      Downloads the GPU texture to CPU for edit
    • upload

      public void upload()
      Uploads the image to GPU and closes its CPU side one
    • saveTextureToFile

      public List<Path> saveTextureToFile(Path texturesDir) throws IOException
      Throws:
      IOException