Record Class Unstitcher
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.texture.atlas.sources.Unstitcher
- All Implemented Interfaces:
SpriteSource
public record Unstitcher(ResourceLocation resource, List<Unstitcher.Region> regions, double xDivisor, double yDivisor)
extends Record
implements SpriteSource
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static class
Nested classes/interfaces inherited from interface net.minecraft.client.renderer.texture.atlas.SpriteSource
SpriteSource.Output, SpriteSource.SpriteSupplier
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final org.slf4j.Logger
static final com.mojang.serialization.MapCodec
<Unstitcher> private final List
<Unstitcher.Region> The field for theregions
record component.private final ResourceLocation
The field for theresource
record component.private final double
The field for thexDivisor
record component.private final double
The field for theyDivisor
record component.Fields inherited from interface net.minecraft.client.renderer.texture.atlas.SpriteSource
TEXTURE_ID_CONVERTER
-
Constructor Summary
ConstructorsConstructorDescriptionUnstitcher
(ResourceLocation resource, List<Unstitcher.Region> regions, double xDivisor, double yDivisor) Creates an instance of aUnstitcher
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec
<Unstitcher> codec()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.regions()
Returns the value of theregions
record component.resource()
Returns the value of theresource
record component.void
run
(ResourceManager p_261498_, SpriteSource.Output p_261828_) final String
toString()
Returns a string representation of this record class.double
xDivisor()
Returns the value of thexDivisor
record component.double
yDivisor()
Returns the value of theyDivisor
record component.
-
Field Details
-
resource
The field for theresource
record component. -
regions
The field for theregions
record component. -
xDivisor
private final double xDivisorThe field for thexDivisor
record component. -
yDivisor
private final double yDivisorThe field for theyDivisor
record component. -
LOGGER
static final org.slf4j.Logger LOGGER -
MAP_CODEC
-
-
Constructor Details
-
Unstitcher
public Unstitcher(ResourceLocation resource, List<Unstitcher.Region> regions, double xDivisor, double yDivisor) Creates an instance of aUnstitcher
record class.- Parameters:
resource
- the value for theresource
record componentregions
- the value for theregions
record componentxDivisor
- the value for thexDivisor
record componentyDivisor
- the value for theyDivisor
record component
-
-
Method Details
-
run
- Specified by:
run
in interfaceSpriteSource
-
codec
- Specified by:
codec
in interfaceSpriteSource
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
resource
Returns the value of theresource
record component.- Returns:
- the value of the
resource
record component
-
regions
Returns the value of theregions
record component.- Returns:
- the value of the
regions
record component
-
xDivisor
public double xDivisor()Returns the value of thexDivisor
record component.- Returns:
- the value of the
xDivisor
record component
-
yDivisor
public double yDivisor()Returns the value of theyDivisor
record component.- Returns:
- the value of the
yDivisor
record component
-