Record Class PackageStyles.PackageStyle
java.lang.Object
java.lang.Record
com.simibubi.create.content.logistics.box.PackageStyles.PackageStyle
- Enclosing class:
PackageStyles
-
Constructor Summary
ConstructorsConstructorDescriptionPackageStyle(String type, int width, int height, float riggingOffset, boolean rare) Creates an instance of aPackageStylerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationnet.minecraft.resources.ResourceLocationfinal inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.booleanrare()Returns the value of therarerecord component.floatReturns the value of theriggingOffsetrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
PackageStyle
Creates an instance of aPackageStylerecord class.- Parameters:
type- the value for thetyperecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentriggingOffset- the value for theriggingOffsetrecord componentrare- the value for therarerecord component
-
-
Method Details
-
getItemId
public net.minecraft.resources.ResourceLocation getItemId() -
getRiggingModel
public net.minecraft.resources.ResourceLocation getRiggingModel() -
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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
riggingOffset
public float riggingOffset()Returns the value of theriggingOffsetrecord component.- Returns:
- the value of the
riggingOffsetrecord component
-
rare
public boolean rare()Returns the value of therarerecord component.- Returns:
- the value of the
rarerecord component
-