Package net.minecraft.predicate.entity
Record Class EntityEffectPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.EntityEffectPredicate
- Record Components:
effects-
public record EntityEffectPredicate(Map<RegistryEntry<StatusEffect>,EntityEffectPredicate.EffectData> effects)
extends Record
- Mappings:
Namespace Name official ckintermediary net/minecraft/class_2102named net/minecraft/predicate/entity/EntityEffectPredicateofficial bintermediary comp_1811named effects
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<RegistryEntry<StatusEffect>,EntityEffectPredicate.EffectData> The field for theeffectsrecord component.static final com.mojang.serialization.Codec<EntityEffectPredicate> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aEntityEffectPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptioneffects()Returns the value of theeffectsrecord component.final booleanIndicates whether some other object is "equal to" this one.static Optional<EntityEffectPredicate>fromJson(@Nullable JsonElement json) final inthashCode()Returns a hash code value for this object.booleantest(Map<StatusEffect, StatusEffectInstance> effects) booleanbooleantest(LivingEntity livingEntity) toJson()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
effects
The field for theeffectsrecord component. -
field_45764
- Mappings:
Namespace Name Mixin selector official aLck;a:Lcom/mojang/serialization/Codec;intermediary field_45764Lnet/minecraft/class_2102;field_45764:Lcom/mojang/serialization/Codec;named field_45764Lnet/minecraft/predicate/entity/EntityEffectPredicate;field_45764:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
EntityEffectPredicate
public EntityEffectPredicate(Map<RegistryEntry<StatusEffect>, EntityEffectPredicate.EffectData> effects) Creates an instance of aEntityEffectPredicaterecord class.- Parameters:
effects- the value for theeffectsrecord component
-
-
Method Details
-
test
- Mappings:
Namespace Name Mixin selector official aLck;a(Lbii;)Zintermediary method_9062Lnet/minecraft/class_2102;method_9062(Lnet/minecraft/class_1297;)Znamed testLnet/minecraft/predicate/entity/EntityEffectPredicate;test(Lnet/minecraft/entity/Entity;)Z
-
test
- Mappings:
Namespace Name Mixin selector official aLck;a(Lbiy;)Zintermediary method_9067Lnet/minecraft/class_2102;method_9067(Lnet/minecraft/class_1309;)Znamed testLnet/minecraft/predicate/entity/EntityEffectPredicate;test(Lnet/minecraft/entity/LivingEntity;)Z
-
test
- Mappings:
Namespace Name Mixin selector official aLck;a(Ljava/util/Map;)Zintermediary method_9063Lnet/minecraft/class_2102;method_9063(Ljava/util/Map;)Znamed testLnet/minecraft/predicate/entity/EntityEffectPredicate;test(Ljava/util/Map;)Z
-
fromJson
- Mappings:
Namespace Name Mixin selector official aLck;a(Lcom/google/gson/JsonElement;)Ljava/util/Optional;intermediary method_9064Lnet/minecraft/class_2102;method_9064(Lcom/google/gson/JsonElement;)Ljava/util/Optional;named fromJsonLnet/minecraft/predicate/entity/EntityEffectPredicate;fromJson(Lcom/google/gson/JsonElement;)Ljava/util/Optional;
-
toJson
- Mappings:
Namespace Name Mixin selector official aLck;a()Lcom/google/gson/JsonElement;intermediary method_9068Lnet/minecraft/class_2102;method_9068()Lcom/google/gson/JsonElement;named toJsonLnet/minecraft/predicate/entity/EntityEffectPredicate;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). -
effects
Returns the value of theeffectsrecord component.- Returns:
- the value of the
effectsrecord component
-