Package vazkii.botania.api.block_entity
Record Class RadiusDescriptor.Rectangle
java.lang.Object
java.lang.Record
vazkii.botania.api.block_entity.RadiusDescriptor.Rectangle
- All Implemented Interfaces:
RadiusDescriptor
- Enclosing interface:
RadiusDescriptor
public static record RadiusDescriptor.Rectangle(net.minecraft.core.BlockPos subtileCoords, net.minecraft.world.phys.AABB aabb)
extends Record
implements RadiusDescriptor
-
Nested Class Summary
Nested classes/interfaces inherited from interface vazkii.botania.api.block_entity.RadiusDescriptor
RadiusDescriptor.Circle, RadiusDescriptor.Rectangle -
Constructor Summary
ConstructorsConstructorDescriptionRectangle(net.minecraft.core.BlockPos subtileCoords, net.minecraft.world.phys.AABB aabb) Creates an instance of aRectanglerecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.AABBaabb()Returns the value of theaabbrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static RadiusDescriptor.Rectanglesquare(net.minecraft.core.BlockPos subtileCoords, int expand) net.minecraft.core.BlockPosReturns the value of thesubtileCoordsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Rectangle
public Rectangle(net.minecraft.core.BlockPos subtileCoords, net.minecraft.world.phys.AABB aabb) Creates an instance of aRectanglerecord class.- Parameters:
subtileCoords- the value for thesubtileCoordsrecord componentaabb- the value for theaabbrecord component
-
-
Method Details
-
square
public static RadiusDescriptor.Rectangle square(net.minecraft.core.BlockPos subtileCoords, int expand) -
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). -
subtileCoords
public net.minecraft.core.BlockPos subtileCoords()Returns the value of thesubtileCoordsrecord component.- Returns:
- the value of the
subtileCoordsrecord component
-
aabb
public net.minecraft.world.phys.AABB aabb()Returns the value of theaabbrecord component.- Returns:
- the value of the
aabbrecord component
-