StitcherException.java

net.minecraft.client.renderer.texture.StitcherException

信息

  • 全限定名:net.minecraft.client.renderer.texture.StitcherException
  • 类型:public class
  • 包:net.minecraft.client.renderer.texture
  • 源码路径:src/main/java/net/minecraft/client/renderer/texture/StitcherException.java
  • 起始行号:L9
  • 继承:RuntimeException
  • 职责:

    TODO

字段/常量

  • allSprites
    • 类型: Collection<Stitcher.Entry>
    • 修饰符: private final
    • 源码定位: L10
    • 说明:

      TODO

内部类/嵌套类型

构造器

public StitcherException(Stitcher.Entry sprite, Collection<Stitcher.Entry> allSprites) @ L12

  • 构造器名:StitcherException
  • 源码定位:L12
  • 修饰符:public

参数:

  • sprite: Stitcher.Entry
  • allSprites: Collection<Stitcher.Entry>

说明:

TODO

方法

下面的方法块按源码顺序生成。

public Collection<Stitcher.Entry> getAllSprites() @ L21

  • 方法名:getAllSprites
  • 源码定位:L21
  • 返回类型:Collection<Stitcher.Entry>
  • 修饰符:public

参数:

说明:

TODO

代码

@OnlyIn(Dist.CLIENT)
public class StitcherException extends RuntimeException {
    private final Collection<Stitcher.Entry> allSprites;
 
    public StitcherException(Stitcher.Entry sprite, Collection<Stitcher.Entry> allSprites) {
        super(
            String.format(
                Locale.ROOT, "Unable to fit: %s - size: %dx%d - Maybe try a lower resolution resourcepack?", sprite.name(), sprite.width(), sprite.height()
            )
        );
        this.allSprites = allSprites;
    }
 
    public Collection<Stitcher.Entry> getAllSprites() {
        return this.allSprites;
    }
}

引用的其他类

  • Stitcher
    • 引用位置: 参数/字段/返回值