Record Class BlockXorFilter
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.block.filter.BlockXorFilter
- 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 BlockXorFilter(Ref<BlockFilter> a, Ref<BlockFilter> b)
extends Record
implements BlockFilter
-
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
ConstructorsConstructorDescriptionBlockXorFilter(Ref<BlockFilter> a, Ref<BlockFilter> b) Creates an instance of aBlockXorFilterrecord class. -
Method Summary
Modifier and TypeMethodDescriptiona()Returns the value of thearecord component.b()Returns the value of thebrecord 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 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.CustomRegistryType<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
-
BlockXorFilter
Creates an instance of aBlockXorFilterrecord class.- Parameters:
a- the value for thearecord componentb- the value for thebrecord 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). -
a
Returns the value of thearecord component.- Returns:
- the value of the
arecord component
-
b
Returns the value of thebrecord component.- Returns:
- the value of the
brecord component
-