Record Class ChestTriple.Sprite
java.lang.Object
java.lang.Record
net.anawesomguy.wsmlmb.block.chest.ChestTriple.Sprite
- Enclosing class:
- ChestTriple
public static record ChestTriple.Sprite(net.minecraft.client.util.SpriteIdentifier singleTexture, net.minecraft.client.util.SpriteIdentifier leftTexture, net.minecraft.client.util.SpriteIdentifier rightTexture)
extends Record
Used for storing
SpriteIdentifiers for chest block entity textures.
The textures should be in the chest atlas.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSprite(net.minecraft.client.util.SpriteIdentifier singleTexture, net.minecraft.client.util.SpriteIdentifier leftTexture, net.minecraft.client.util.SpriteIdentifier rightTexture) Creates an instance of aSpriterecord class.Sprite(net.minecraft.util.Identifier singleTexture, net.minecraft.util.Identifier leftTexture, net.minecraft.util.Identifier rightTexture) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ChestTriple.Spritestatic ChestTriple.SpritegetDefault(boolean christmas) static ChestTriple.Spritenet.minecraft.client.util.SpriteIdentifiergetLeft()net.minecraft.client.util.SpriteIdentifiergetRight()net.minecraft.client.util.SpriteIdentifierfinal inthashCode()Returns a hash code value for this object.booleanbooleanisDefault(boolean christmas) booleannet.minecraft.client.util.SpriteIdentifierReturns the value of theleftTexturerecord component.net.minecraft.client.util.SpriteIdentifierReturns the value of therightTexturerecord component.net.minecraft.client.util.SpriteIdentifierReturns the value of thesingleTexturerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_TEXTURES
-
DEFAULT_CHRISTMAS_TEXTURES
-
-
Constructor Details
-
Sprite
public Sprite(net.minecraft.client.util.SpriteIdentifier singleTexture, net.minecraft.client.util.SpriteIdentifier leftTexture, net.minecraft.client.util.SpriteIdentifier rightTexture) Creates an instance of aSpriterecord class.- Parameters:
singleTexture- the value for thesingleTexturerecord componentleftTexture- the value for theleftTexturerecord componentrightTexture- the value for therightTexturerecord component
-
Sprite
public Sprite(net.minecraft.util.Identifier singleTexture, net.minecraft.util.Identifier leftTexture, net.minecraft.util.Identifier rightTexture)
-
-
Method Details
-
getDefault
-
getDefaultChristmas
-
getDefault
-
getSingle
public net.minecraft.client.util.SpriteIdentifier getSingle() -
getLeft
public net.minecraft.client.util.SpriteIdentifier getLeft() -
getRight
public net.minecraft.client.util.SpriteIdentifier getRight() -
isDefault
public boolean isDefault() -
isDefaultChristmas
public boolean isDefaultChristmas() -
isDefault
public boolean isDefault(boolean christmas) -
toIdentifiers
-
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.client.util.SpriteIdentifier singleTexture()Returns the value of thesingleTexturerecord component.- Returns:
- the value of the
singleTexturerecord component
-
leftTexture
public net.minecraft.client.util.SpriteIdentifier leftTexture()Returns the value of theleftTexturerecord component.- Returns:
- the value of the
leftTexturerecord component
-
rightTexture
public net.minecraft.client.util.SpriteIdentifier rightTexture()Returns the value of therightTexturerecord component.- Returns:
- the value of the
rightTexturerecord component
-