Package com.minecolonies.api.items
Record Class IBlockOverlayItem.OverlayBox
java.lang.Object
java.lang.Record
com.minecolonies.api.items.IBlockOverlayItem.OverlayBox
- Record Components:
bounds- the bounds of the box.color- the line color.width- the line width.showThroughBlocks- true to display through blocks.
- Enclosing interface:
- IBlockOverlayItem
public static record IBlockOverlayItem.OverlayBox(net.minecraft.world.phys.AABB bounds, int color, float width, boolean showThroughBlocks)
extends Record
Details about the overlay box to draw.
-
Constructor Summary
ConstructorsConstructorDescriptionOverlayBox(net.minecraft.world.phys.AABB bounds, int color, float width, boolean showThroughBlocks) Creates an instance of aOverlayBoxrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.AABBbounds()Returns the value of theboundsrecord component.intcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theshowThroughBlocksrecord component.final StringtoString()Returns a string representation of this record class.floatwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
OverlayBox
public OverlayBox(net.minecraft.world.phys.AABB bounds, int color, float width, boolean showThroughBlocks) Creates an instance of aOverlayBoxrecord class.- Parameters:
bounds- the value for theboundsrecord componentcolor- the value for thecolorrecord componentwidth- the value for thewidthrecord componentshowThroughBlocks- the value for theshowThroughBlocksrecord component
-
-
Method Details
-
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 '=='. -
bounds
public net.minecraft.world.phys.AABB bounds()Returns the value of theboundsrecord component.- Returns:
- the value of the
boundsrecord component
-
color
public int color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
width
public float width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
showThroughBlocks
public boolean showThroughBlocks()Returns the value of theshowThroughBlocksrecord component.- Returns:
- the value of the
showThroughBlocksrecord component
-