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
Modifier and TypeFieldDescriptionstatic com.mojang.serialization.MapCodec
<UnobstructedPredicate> private final Vec3i
The field for theoffset
record component.Fields inherited from interface net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate
ONLY_IN_AIR_OR_WATER_PREDICATE, ONLY_IN_AIR_PREDICATE
-
Constructor Summary
ConstructorDescriptionUnobstructedPredicate
(Vec3i offset) Creates an instance of aUnobstructedPredicate
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.offset()
Returns the value of theoffset
record component.boolean
test
(WorldGenLevel p_346037_, BlockPos p_345229_) final String
toString()
Returns a string representation of this record class.type()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.function.BiPredicate
and, negate, or
-
Field Details
-
offset
The field for theoffset
record component. -
CODEC
-
-
Constructor Details
-
UnobstructedPredicate
UnobstructedPredicate(Vec3i offset) Creates an instance of aUnobstructedPredicate
record class.- Parameters:
offset
- the value for theoffset
record component
-
-
Method Details
-
type
- Specified by:
type
in interfaceBlockPredicate
-
test
- Specified by:
test
in 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 theoffset
record component.- Returns:
- the value of the
offset
record component
-