SingleSpriteSource.java

net.minecraft.client.gui.font.SingleSpriteSource

信息

  • 全限定名:net.minecraft.client.gui.font.SingleSpriteSource
  • 类型:public record
  • 包:net.minecraft.client.gui.font
  • 源码路径:src/main/java/net/minecraft/client/gui/font/SingleSpriteSource.java
  • 起始行号:L10
  • 实现:GlyphSource
  • 职责:

    TODO

字段/常量

内部类/嵌套类型

构造器

方法

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

public BakedGlyph getGlyph(int codepoint) @ L11

  • 方法名:getGlyph
  • 源码定位:L11
  • 返回类型:BakedGlyph
  • 修饰符:public

参数:

  • codepoint: int

说明:

TODO

public BakedGlyph getRandomGlyph(RandomSource random, int width) @ L16

  • 方法名:getRandomGlyph
  • 源码定位:L16
  • 返回类型:BakedGlyph
  • 修饰符:public

参数:

  • random: RandomSource
  • width: int

说明:

TODO

代码

@OnlyIn(Dist.CLIENT)
public record SingleSpriteSource(BakedGlyph glyph) implements GlyphSource {
    @Override
    public BakedGlyph getGlyph(int codepoint) {
        return this.glyph;
    }
 
    @Override
    public BakedGlyph getRandomGlyph(RandomSource random, int width) {
        return this.glyph;
    }
}

引用的其他类