Record Class MultiPartBlock.Clipper<PART extends MultiPartBlock.IPart>
java.lang.Object
java.lang.Record
com.petrolpark.core.world.block.multiPart.MultiPartBlock.Clipper<PART>
- Enclosing class:
MultiPartBlock<PART extends MultiPartBlock.IPart>
public static record MultiPartBlock.Clipper<PART extends MultiPartBlock.IPart>(List<net.minecraft.world.phys.AABB> boxes, List<PART extends MultiPartBlock.IPart> parts)
extends Record
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<net.minecraft.world.phys.AABB> boxes()Returns the value of theboxesrecord component.clip(net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static final <PART extends MultiPartBlock.IPart>
MultiPartBlock.Clipper<PART> of(Collection<PART> uniqueParts) parts()Returns the value of thepartsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Clipper
Creates an instance of aClipperrecord class.- Parameters:
boxes- the value for theboxesrecord componentparts- the value for thepartsrecord component
-
-
Method Details
-
clip
@Nullable public PART clip(net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity) -
of
public static final <PART extends MultiPartBlock.IPart> MultiPartBlock.Clipper<PART> of(Collection<PART> uniqueParts) -
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). -
boxes
Returns the value of theboxesrecord component.- Returns:
- the value of the
boxesrecord component
-
parts
Returns the value of thepartsrecord component.- Returns:
- the value of the
partsrecord component
-