Class ServerTexture

java.lang.Object
net.minecraft.client.renderer.texture.AbstractTexture
net.minecraft.client.renderer.texture.SimpleTexture
net.frozenblock.lib.image_transfer.client.ServerTexture
All Implemented Interfaces:
AutoCloseable, net.minecraft.client.renderer.texture.Tickable

@Environment(CLIENT) public class ServerTexture extends net.minecraft.client.renderer.texture.SimpleTexture implements net.minecraft.client.renderer.texture.Tickable
A texture that will use a .png file sent from the server.

Sends a file transfer request to the server if the needed texture file is not present on the client, unless the file transfer config is disabled.

  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.client.renderer.texture.SimpleTexture

    net.minecraft.client.renderer.texture.SimpleTexture.TextureImage
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final Map<String,ServerTexture>
     

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

    location

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

    blur, id, mipmap, NOT_ASSIGNED
  • Constructor Summary

    Constructors
    Constructor
    Description
    ServerTexture(String destPath, String fileName, net.minecraft.resources.ResourceLocation fallback, @Nullable Runnable callback)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    load(net.minecraft.server.packs.resources.ResourceManager manager)
     
    void
     
    void
     
    void
     

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

    getTextureImage

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

    bind, close, getId, releaseId, reset, setFilter

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • ServerTexture

      public ServerTexture(String destPath, String fileName, net.minecraft.resources.ResourceLocation fallback, @Nullable @Nullable Runnable callback)
  • Method Details

    • runFutureForTexture

      public void runFutureForTexture()
    • load

      public void load(net.minecraft.server.packs.resources.ResourceManager manager) throws IOException
      Overrides:
      load in class net.minecraft.client.renderer.texture.SimpleTexture
      Throws:
      IOException
    • updateReferenceTime

      public void updateReferenceTime()
    • tick

      public void tick()
      Specified by:
      tick in interface net.minecraft.client.renderer.texture.Tickable