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 recordstatic classNested 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.Loggerstatic final com.mojang.serialization.MapCodec<Unstitcher> private final List<Unstitcher.Region> The field for theregionsrecord component.private final ResourceLocationThe field for theresourcerecord component.private final doubleThe field for thexDivisorrecord component.private final doubleThe field for theyDivisorrecord 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 aUnstitcherrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<Unstitcher> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.regions()Returns the value of theregionsrecord component.resource()Returns the value of theresourcerecord component.voidrun(ResourceManager pResourceManager, SpriteSource.Output pOutput) final StringtoString()Returns a string representation of this record class.doublexDivisor()Returns the value of thexDivisorrecord component.doubleyDivisor()Returns the value of theyDivisorrecord component.
-
Field Details
-
resource
The field for theresourcerecord component. -
regions
The field for theregionsrecord component. -
xDivisor
private final double xDivisorThe field for thexDivisorrecord component. -
yDivisor
private final double yDivisorThe field for theyDivisorrecord 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 aUnstitcherrecord class.- Parameters:
resource- the value for theresourcerecord componentregions- the value for theregionsrecord componentxDivisor- the value for thexDivisorrecord componentyDivisor- the value for theyDivisorrecord component
-
-
Method Details
-
run
- Specified by:
runin interfaceSpriteSource
-
codec
- Specified by:
codecin 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 theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
regions
Returns the value of theregionsrecord component.- Returns:
- the value of the
regionsrecord component
-
xDivisor
public double xDivisor()Returns the value of thexDivisorrecord component.- Returns:
- the value of the
xDivisorrecord component
-
yDivisor
public double yDivisor()Returns the value of theyDivisorrecord component.- Returns:
- the value of the
yDivisorrecord component
-