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.pos- rendering relative pos, if null then aabb is usedcolor- the line color.width- the line width.showThroughBlocks- true to display through blocks.
- Enclosing interface:
IBlockOverlayItem
public static record IBlockOverlayItem.OverlayBox(@Nullable net.minecraft.world.phys.AABB bounds, @Nullable net.minecraft.core.BlockPos pos, int color, float width, boolean showThroughBlocks)
extends Record
Details about the overlay box to draw.
-
Constructor Summary
ConstructorsConstructorDescriptionOverlayBox(net.minecraft.core.BlockPos bounds, int color, float width, boolean showThroughBlocks) OverlayBox(@Nullable net.minecraft.world.phys.AABB bounds, @Nullable net.minecraft.core.BlockPos pos, int color, float width, boolean showThroughBlocks) Creates an instance of aOverlayBoxrecord class.OverlayBox(net.minecraft.world.phys.AABB bounds, int color, float width, boolean showThroughBlocks) -
Method Summary
Modifier and TypeMethodDescription@Nullable net.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.@Nullable net.minecraft.core.BlockPospos()Returns the value of theposrecord component.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(@Nullable @Nullable net.minecraft.world.phys.AABB bounds, @Nullable @Nullable net.minecraft.core.BlockPos pos, int color, float width, boolean showThroughBlocks) Creates an instance of aOverlayBoxrecord class.- Parameters:
bounds- the value for theboundsrecord componentpos- the value for theposrecord componentcolor- the value for thecolorrecord componentwidth- the value for thewidthrecord componentshowThroughBlocks- the value for theshowThroughBlocksrecord component
-
OverlayBox
public OverlayBox(net.minecraft.core.BlockPos bounds, int color, float width, boolean showThroughBlocks) -
OverlayBox
public OverlayBox(net.minecraft.world.phys.AABB bounds, int color, float width, boolean showThroughBlocks)
-
-
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
@Nullable public @Nullable net.minecraft.world.phys.AABB bounds()Returns the value of theboundsrecord component.- Returns:
- the value of the
boundsrecord component
-
pos
@Nullable public @Nullable net.minecraft.core.BlockPos pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord 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
-