Record Class ChestTriple
java.lang.Object
java.lang.Record
net.anawesomguy.wsmlmb.block.chest.ChestTriple
public record ChestTriple(net.minecraft.util.Identifier singleTexture, net.minecraft.util.Identifier leftTexture, net.minecraft.util.Identifier rightTexture)
extends Record
Used for storing
Identifiers for chest textures.
The textures must be in the chest atlas, or in the entity/chest directory.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordUsed for storingSpriteIdentifiers for chest block entity textures. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ChestTriple>static final ChestTripleAChestTriplestoring the default textures for a chest when it is Christmas.static final ChestTripleAChestTriplestoring the default textures for a chest. -
Constructor Summary
ConstructorsConstructorDescriptionChestTriple(net.minecraft.util.Identifier singleTexture, net.minecraft.util.Identifier leftTexture, net.minecraft.util.Identifier rightTexture) Creates an instance of aChestTriplerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ChestTriplestatic ChestTriplegetDefault(boolean christmas) static ChestTriplenet.minecraft.util.IdentifiergetLeft()net.minecraft.util.IdentifiergetRight()net.minecraft.util.Identifierfinal inthashCode()Returns a hash code value for this object.booleanbooleanisDefault(boolean christmas) booleannet.minecraft.util.IdentifierReturns the value of theleftTexturerecord component.net.minecraft.util.IdentifierReturns the value of therightTexturerecord component.net.minecraft.util.IdentifierReturns the value of thesingleTexturerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
DEFAULT_TEXTURES
AChestTriplestoring the default textures for a chest. -
DEFAULT_CHRISTMAS_TEXTURES
AChestTriplestoring the default textures for a chest when it is Christmas.
-
-
Constructor Details
-
ChestTriple
public ChestTriple(net.minecraft.util.Identifier singleTexture, net.minecraft.util.Identifier leftTexture, net.minecraft.util.Identifier rightTexture) Creates an instance of aChestTriplerecord class.- Parameters:
singleTexture- the value for thesingleTexturerecord componentleftTexture- the value for theleftTexturerecord componentrightTexture- the value for therightTexturerecord component
-
-
Method Details
-
getDefault
-
getDefaultChristmas
-
getDefault
-
getSingle
public net.minecraft.util.Identifier getSingle() -
getLeft
public net.minecraft.util.Identifier getLeft() -
getRight
public net.minecraft.util.Identifier getRight() -
isDefault
public boolean isDefault() -
isDefaultChristmas
public boolean isDefaultChristmas() -
isDefault
public boolean isDefault(boolean christmas) -
toSpriteIdentifiers
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
singleTexture
public net.minecraft.util.Identifier singleTexture()Returns the value of thesingleTexturerecord component.- Returns:
- the value of the
singleTexturerecord component
-
leftTexture
public net.minecraft.util.Identifier leftTexture()Returns the value of theleftTexturerecord component.- Returns:
- the value of the
leftTexturerecord component
-
rightTexture
public net.minecraft.util.Identifier rightTexture()Returns the value of therightTexturerecord component.- Returns:
- the value of the
rightTexturerecord component
-