Record Class BlockIdFilter
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.block.filter.BlockIdFilter
- 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>
public record BlockIdFilter(net.minecraft.world.level.block.Block block)
extends Record
implements BlockFilter
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final 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
ConstructorsConstructorDescriptionBlockIdFilter(net.minecraft.world.level.block.Block block) Creates an instance of aBlockIdFilterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.Blockblock()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleantest(net.minecraft.world.level.block.state.pattern.BlockInWorld b) 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, not, orMethods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface RefOptimizer
optimize
-
Field Details
-
TYPE
-
-
Constructor Details
-
BlockIdFilter
public BlockIdFilter(net.minecraft.world.level.block.Block block) Creates an instance of aBlockIdFilterrecord class.- Parameters:
block- the value for theblockrecord 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
-
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). -
block
public net.minecraft.world.level.block.Block block()Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-