Package net.minecraft.predicate
Record Class NbtPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.NbtPredicate
- Record Components:
nbt-
- Mappings:
Namespace Name named net/minecraft/predicate/NbtPredicateintermediary net/minecraft/class_2105official dknamed nbtintermediary comp_1816official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<NbtPredicate> private final NbtCompoundThe field for thenbtrecord component.static final PacketCodec<ByteBuf, NbtPredicate> -
Constructor Summary
ConstructorsConstructorDescriptionNbtPredicate(NbtCompound nbt) Creates an instance of aNbtPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic NbtCompoundentityToNbt(Entity entity) 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.booleanbooleanbooleantest(@Nullable NbtElement element) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
nbt
The field for thenbtrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/predicate/NbtPredicate;CODEC:Lcom/mojang/serialization/Codec;intermediary field_45768Lnet/minecraft/class_2105;field_45768:Lcom/mojang/serialization/Codec;official aLdk;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/predicate/NbtPredicate;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49244Lnet/minecraft/class_2105;field_49244:Lnet/minecraft/class_9139;official bLdk;b:Lyx;
-
-
Constructor Details
-
NbtPredicate
Creates an instance of aNbtPredicaterecord class.- Parameters:
nbt- the value for thenbtrecord component
-
-
Method Details
-
test
- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/predicate/NbtPredicate;test(Lnet/minecraft/item/ItemStack;)Zintermediary method_9074Lnet/minecraft/class_2105;method_9074(Lnet/minecraft/class_1799;)Zofficial aLdk;a(Lcuq;)Z
-
test
- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/predicate/NbtPredicate;test(Lnet/minecraft/entity/Entity;)Zintermediary method_9072Lnet/minecraft/class_2105;method_9072(Lnet/minecraft/class_1297;)Zofficial aLdk;a(Lbsr;)Z
-
test
- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/predicate/NbtPredicate;test(Lnet/minecraft/nbt/NbtElement;)Zintermediary method_9077Lnet/minecraft/class_2105;method_9077(Lnet/minecraft/class_2520;)Zofficial aLdk;a(Luy;)Z
-
entityToNbt
- Mappings:
Namespace Name Mixin selector named entityToNbtLnet/minecraft/predicate/NbtPredicate;entityToNbt(Lnet/minecraft/entity/Entity;)Lnet/minecraft/nbt/NbtCompound;intermediary method_9076Lnet/minecraft/class_2105;method_9076(Lnet/minecraft/class_1297;)Lnet/minecraft/class_2487;official bLdk;b(Lbsr;)Lub;
-
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). -
nbt
Returns the value of thenbtrecord component.- Returns:
- the value of the
nbtrecord component
-