Record Class UnobstructedPredicate
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.blockpredicates.UnobstructedPredicate
- All Implemented Interfaces:
BiPredicate<WorldGenLevel, BlockPos>, BlockPredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<UnobstructedPredicate> private final Vec3iThe field for theoffsetrecord component.Fields inherited from interface BlockPredicate
ONLY_IN_AIR_OR_WATER_PREDICATE, ONLY_IN_AIR_PREDICATE -
Constructor Summary
ConstructorsConstructorDescriptionUnobstructedPredicate(Vec3i offset) Creates an instance of aUnobstructedPredicaterecord 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.offset()Returns the value of theoffsetrecord component.booleantest(WorldGenLevel worldGenLevel, BlockPos pos) final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface BiPredicate
and, negate, or
-
Field Details
-
offset
The field for theoffsetrecord component. -
CODEC
-
-
Constructor Details
-
UnobstructedPredicate
UnobstructedPredicate(Vec3i offset) Creates an instance of aUnobstructedPredicaterecord class.- Parameters:
offset- the value for theoffsetrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceBlockPredicate
-
test
- Specified by:
testin interfaceBiPredicate<WorldGenLevel, 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). -
offset
Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-