记录类 Unstitcher.Region
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.texture.atlas.sources.Unstitcher.Region
- 封闭类:
Unstitcher
static record Unstitcher.Region(ResourceLocation sprite, double x, double y, double width, double height)
extends Record
-
字段概要
字段修饰符和类型字段说明static final com.mojang.serialization.Codec
<Unstitcher.Region> private final double
height
记录组件的字段。private final ResourceLocation
sprite
记录组件的字段。private final double
width
记录组件的字段。private final double
x
记录组件的字段。private final double
y
记录组件的字段。 -
构造器概要
构造器构造器说明Region
(ResourceLocation sprite, double x, double y, double width, double height) 创建Region
记录类的实例。 -
方法概要
-
字段详细资料
-
sprite
sprite
记录组件的字段。 -
x
private final double xx
记录组件的字段。 -
y
private final double yy
记录组件的字段。 -
width
private final double widthwidth
记录组件的字段。 -
height
private final double heightheight
记录组件的字段。 -
CODEC
-
-
构造器详细资料
-
Region
Region(ResourceLocation sprite, double x, double y, double width, double height) 创建Region
记录类的实例。- 参数:
sprite
-sprite
记录组件的值x
-x
记录组件的值y
-y
记录组件的值width
-width
记录组件的值height
-height
记录组件的值
-
-
方法详细资料
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)
对参考组件进行比较;使用 '==' 对基元组件进行比较 -
sprite
返回sprite
记录组件的值。- 返回:
sprite
记录组件的值
-
x
public double x()返回x
记录组件的值。- 返回:
x
记录组件的值
-
y
public double y()返回y
记录组件的值。- 返回:
y
记录组件的值
-
width
public double width()返回width
记录组件的值。- 返回:
width
记录组件的值
-
height
public double height()返回height
记录组件的值。- 返回:
height
记录组件的值
-