Record Class BlockOrFilter
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.block.filter.BlockOrFilter
- 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
ConstructorsConstructorDescriptionBlockOrFilter(List<Ref<BlockFilter>> filters) Creates an instance of aBlockOrFilterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.filters()Returns the value of thefiltersrecord component.final inthashCode()Returns a hash code value for this object.or(BlockFilter filter) 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, notMethods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface RefOptimizer
optimize
-
Field Details
-
TYPE
-
-
Constructor Details
-
BlockOrFilter
Creates an instance of aBlockOrFilterrecord class.- Parameters:
filters- the value for thefiltersrecord 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
-
or
- Specified by:
orin 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). -
filters
Returns the value of thefiltersrecord component.- Returns:
- the value of the
filtersrecord component
-