Record Class VolumeMatchPredicate
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.blockpredicates.VolumeMatchPredicate
- All Implemented Interfaces:
BiPredicate<LevelAccessor, BlockPos>, BlockPredicate
public record VolumeMatchPredicate(Vec3i min, Vec3i max, BlockPredicate match)
extends Record
implements BlockPredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<VolumeMatchPredicate> private final BlockPredicateThe field for thematchrecord component.private final Vec3iThe field for themaxrecord component.private final Vec3iThe field for theminrecord component.private static final com.mojang.serialization.MapCodec<VolumeMatchPredicate> Fields inherited from interface BlockPredicate
ONLY_IN_AIR_OR_WATER_PREDICATE, ONLY_IN_AIR_PREDICATE -
Constructor Summary
ConstructorsConstructorDescriptionVolumeMatchPredicate(Vec3i min, Vec3i max, BlockPredicate match) Creates an instance of aVolumeMatchPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.match()Returns the value of thematchrecord component.max()Returns the value of themaxrecord component.min()Returns the value of theminrecord component.booleantest(LevelAccessor level, BlockPos blockPos) final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface BiPredicate
and, negate, or
-
Field Details
-
min
The field for theminrecord component. -
max
The field for themaxrecord component. -
match
The field for thematchrecord component. -
UNVALIDATED_CODEC
-
CODEC
-
-
Constructor Details
-
VolumeMatchPredicate
Creates an instance of aVolumeMatchPredicaterecord class.- Parameters:
min- the value for theminrecord componentmax- the value for themaxrecord componentmatch- the value for thematchrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceBlockPredicate
-
test
- Specified by:
testin interfaceBiPredicate<LevelAccessor, BlockPos>
-
toString
-
hashCode
-
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). -
min
Returns the value of theminrecord component.- Returns:
- the value of the
minrecord component
-
max
Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-
match
Returns the value of thematchrecord component.- Returns:
- the value of the
matchrecord component
-