Package net.minecraft.predicate
Record Class StatePredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.StatePredicate
- Record Components:
conditions-
- Mappings:
Namespace Name official cyintermediary net/minecraft/class_4559named net/minecraft/predicate/StatePredicateofficial bintermediary comp_1830named conditions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static interfaceprivate static final recordprivate static final recordprivate static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<StatePredicate.Condition>The field for theconditionsrecord component.static final com.mojang.serialization.Codec<StatePredicate>private static final com.mojang.serialization.Codec<List<StatePredicate.Condition>> -
Constructor Summary
ConstructorsConstructorDescriptionStatePredicate(List<StatePredicate.Condition> conditions) Creates an instance of aStatePredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck(StateManager<?, ?> factory, Consumer<String> reporter) Returns the value of theconditionsrecord component.final booleanIndicates whether some other object is "equal to" this one.static Optional<StatePredicate>fromJson(@Nullable JsonElement json) final inthashCode()Returns a hash code value for this object.method_53235(StateManager<?, ?> stateManager) booleantest(BlockState state) booleantest(FluidState state) <S extends State<?,S>>
booleantest(StateManager<?, S> stateManager, S container) toJson()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
conditions
The field for theconditionsrecord component. -
field_45778
- Mappings:
Namespace Name Mixin selector official cLcy;c:Lcom/mojang/serialization/Codec;intermediary field_45778Lnet/minecraft/class_4559;field_45778:Lcom/mojang/serialization/Codec;named field_45778Lnet/minecraft/predicate/StatePredicate;field_45778:Lcom/mojang/serialization/Codec;
-
field_45777
- Mappings:
Namespace Name Mixin selector official aLcy;a:Lcom/mojang/serialization/Codec;intermediary field_45777Lnet/minecraft/class_4559;field_45777:Lcom/mojang/serialization/Codec;named field_45777Lnet/minecraft/predicate/StatePredicate;field_45777:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
StatePredicate
Creates an instance of aStatePredicaterecord class.- Parameters:
conditions- the value for theconditionsrecord component
-
-
Method Details
-
test
- Mappings:
Namespace Name Mixin selector official aLcy;a(Ldfb;Ldfc;)Zintermediary method_22515Lnet/minecraft/class_4559;method_22515(Lnet/minecraft/class_2689;Lnet/minecraft/class_2688;)Znamed testLnet/minecraft/predicate/StatePredicate;test(Lnet/minecraft/state/StateManager;Lnet/minecraft/state/State;)Z
-
test
- Mappings:
Namespace Name Mixin selector official aLcy;a(Ldfa;)Zintermediary method_22514Lnet/minecraft/class_4559;method_22514(Lnet/minecraft/class_2680;)Znamed testLnet/minecraft/predicate/StatePredicate;test(Lnet/minecraft/block/BlockState;)Z
-
test
- Mappings:
Namespace Name Mixin selector official aLcy;a(Lead;)Zintermediary method_22518Lnet/minecraft/class_4559;method_22518(Lnet/minecraft/class_3610;)Znamed testLnet/minecraft/predicate/StatePredicate;test(Lnet/minecraft/fluid/FluidState;)Z
-
method_53235
- Mappings:
Namespace Name Mixin selector official aLcy;a(Ldfb;)Ljava/util/Optional;intermediary method_53235Lnet/minecraft/class_4559;method_53235(Lnet/minecraft/class_2689;)Ljava/util/Optional;named method_53235Lnet/minecraft/predicate/StatePredicate;method_53235(Lnet/minecraft/state/StateManager;)Ljava/util/Optional;
-
check
- Mappings:
Namespace Name Mixin selector official aLcy;a(Ldfb;Ljava/util/function/Consumer;)Vintermediary method_22516Lnet/minecraft/class_4559;method_22516(Lnet/minecraft/class_2689;Ljava/util/function/Consumer;)Vnamed checkLnet/minecraft/predicate/StatePredicate;check(Lnet/minecraft/state/StateManager;Ljava/util/function/Consumer;)V
-
fromJson
- Mappings:
Namespace Name Mixin selector official aLcy;a(Lcom/google/gson/JsonElement;)Ljava/util/Optional;intermediary method_22519Lnet/minecraft/class_4559;method_22519(Lcom/google/gson/JsonElement;)Ljava/util/Optional;named fromJsonLnet/minecraft/predicate/StatePredicate;fromJson(Lcom/google/gson/JsonElement;)Ljava/util/Optional;
-
toJson
- Mappings:
Namespace Name Mixin selector official aLcy;a()Lcom/google/gson/JsonElement;intermediary method_22513Lnet/minecraft/class_4559;method_22513()Lcom/google/gson/JsonElement;named toJsonLnet/minecraft/predicate/StatePredicate;toJson()Lcom/google/gson/JsonElement;
-
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). -
conditions
Returns the value of theconditionsrecord component.- Returns:
- the value of the
conditionsrecord component
-