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 com.mojang.serialization.MapCodec<UnobstructedPredicate> private final Vec3iThe field for theoffsetrecord component.Fields inherited from interface net.minecraft.world.level.levelgen.blockpredicates.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 p_346037_, BlockPos p_345229_) final StringtoString()Returns a string representation of this record class.type()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.function.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
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). -
offset
Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-