Interface SpriteContentsConstructor

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SpriteContentsConstructor
Functional interface representing the signature of the SpriteContents constructor but nullable to support skipping based on metadata.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable net.minecraft.client.renderer.texture.SpriteContents
    create(net.minecraft.resources.ResourceLocation id, net.minecraft.client.resources.metadata.animation.FrameSize frameSize, com.mojang.blaze3d.platform.NativeImage nativeImage, net.minecraft.server.packs.resources.ResourceMetadata resourceMetadata)
    Construct an instance of SpriteContents or return null to not load the sprite.
  • Method Details

    • create

      @Nullable @Nullable net.minecraft.client.renderer.texture.SpriteContents create(net.minecraft.resources.ResourceLocation id, net.minecraft.client.resources.metadata.animation.FrameSize frameSize, com.mojang.blaze3d.platform.NativeImage nativeImage, net.minecraft.server.packs.resources.ResourceMetadata resourceMetadata)
      Construct an instance of SpriteContents or return null to not load the sprite.
      Parameters:
      id - the id of the sprite
      frameSize - the frame size of the sprite
      nativeImage - the image of the sprite
      resourceMetadata - the metadata of the resource
      Returns:
      an instance of SpriteContents or return null to not load the sprite