Record Class BlockNotFilter
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.block.filter.BlockNotFilter
- All Implemented Interfaces:
BlockFilter, BlockPredicate, SimpleBlockPredicate, CustomRegistryOwnTypeProvider<net.minecraft.network.RegistryFriendlyByteBuf, BlockFilter>, CustomRegistryValue<net.minecraft.network.RegistryFriendlyByteBuf, BlockFilter>, RefOptimizer<BlockFilter>, WithKey, WithRef<BlockFilter>, Predicate<net.minecraft.world.level.block.state.pattern.BlockInWorld>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic DynamicType<net.minecraft.network.RegistryFriendlyByteBuf, BlockFilter> Fields inherited from interface BlockFilter
ANY, CODEC, DATA_TYPE, EXPOSED, FLUID, NONE, PARTIAL, REGISTRY, STREAM_CODEC, VISIBLEFields inherited from interface WithKey
COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionBlockNotFilter(Ref<BlockFilter> filter) Creates an instance of aBlockNotFilterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.filter()Returns the value of thefilterrecord component.final inthashCode()Returns a hash code value for this object.not()booleantest(net.minecraft.world.level.block.state.pattern.BlockInWorld block) booleantest(net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) final StringtoString()Returns a string representation of this record class.DynamicType<net.minecraft.network.RegistryFriendlyByteBuf, BlockFilter> type()Methods inherited from interface BlockFilter
and, getRegistry, orMethods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface RefOptimizer
optimize
-
Field Details
-
TYPE
-
-
Constructor Details
-
BlockNotFilter
Creates an instance of aBlockNotFilterrecord class.- Parameters:
filter- the value for thefilterrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceCustomRegistryOwnTypeProvider<net.minecraft.network.RegistryFriendlyByteBuf, BlockFilter>
-
test
-
test
public boolean test(net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) - Specified by:
testin interfaceBlockPredicate- Specified by:
testin interfaceSimpleBlockPredicate
-
not
- Specified by:
notin interfaceBlockFilter
-
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). -
filter
Returns the value of thefilterrecord component.- Returns:
- the value of the
filterrecord component
-