Package net.minecraft.predicate
Record Class BlockPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.BlockPredicate
- Record Components:
tag-blocks-state-nbt-
public record BlockPredicate(Optional<TagKey<Block>> tag, Optional<RegistryEntryList<Block>> blocks, Optional<StatePredicate> state, Optional<NbtPredicate> nbt)
extends Record
- Mappings:
Namespace Name official auintermediary net/minecraft/class_4550named net/minecraft/predicate/BlockPredicateofficial bintermediary comp_1731named tagofficial cintermediary comp_1732named blocksofficial dintermediary comp_1733named stateofficial eintermediary comp_1734named nbt
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.serialization.Codec<RegistryEntryList<Block>>private final Optional<RegistryEntryList<Block>>The field for theblocksrecord component.static final com.mojang.serialization.Codec<BlockPredicate>private final Optional<NbtPredicate>The field for thenbtrecord component.private final Optional<StatePredicate>The field for thestaterecord component.The field for thetagrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBlockPredicate(Optional<TagKey<Block>> optional, Optional<RegistryEntryList<Block>> optional2, Optional<StatePredicate> optional3, Optional<NbtPredicate> optional4) -
Method Summary
Modifier and TypeMethodDescriptionblocks()Returns the value of theblocksrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.nbt()Returns the value of thenbtrecord component.state()Returns the value of thestaterecord component.tag()Returns the value of thetagrecord component.booleantest(ServerWorld world, BlockPos pos) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
tag
The field for thetagrecord component. -
blocks
The field for theblocksrecord component. -
state
The field for thestaterecord component. -
nbt
The field for thenbtrecord component. -
BLOCK_ENTRY_LIST_CODEC
private static final com.mojang.serialization.Codec<RegistryEntryList<Block>> BLOCK_ENTRY_LIST_CODEC- Mappings:
Namespace Name Mixin selector official fLau;f:Lcom/mojang/serialization/Codec;intermediary field_45724Lnet/minecraft/class_4550;field_45724:Lcom/mojang/serialization/Codec;named BLOCK_ENTRY_LIST_CODECLnet/minecraft/predicate/BlockPredicate;BLOCK_ENTRY_LIST_CODEC:Lcom/mojang/serialization/Codec;
-
CODEC
- Mappings:
Namespace Name Mixin selector official aLau;a:Lcom/mojang/serialization/Codec;intermediary field_45723Lnet/minecraft/class_4550;field_45723:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/predicate/BlockPredicate;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
BlockPredicate
public BlockPredicate(Optional<TagKey<Block>> optional, Optional<RegistryEntryList<Block>> optional2, Optional<StatePredicate> optional3, Optional<NbtPredicate> optional4)
-
-
Method Details
-
test
- Mappings:
Namespace Name Mixin selector official aLau;a(Land;Lhx;)Zintermediary method_22454Lnet/minecraft/class_4550;method_22454(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;)Znamed testLnet/minecraft/predicate/BlockPredicate;test(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;)Z
-
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). -
tag
Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-
blocks
Returns the value of theblocksrecord component.- Returns:
- the value of the
blocksrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
nbt
Returns the value of thenbtrecord component.- Returns:
- the value of the
nbtrecord component
-