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 cm
intermediary net/minecraft/class_2102
named net/minecraft/predicate/entity/EntityEffectPredicate
official b
intermediary comp_1811
named effects
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static final record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EntityEffectPredicate>
private final Map<RegistryEntry<StatusEffect>,
EntityEffectPredicate.EffectData> The field for theeffects
record component. -
Constructor Summary
ConstructorDescriptionCreates an instance of aEntityEffectPredicate
record class. -
Method Summary
Modifier and TypeMethodDescriptioneffects()
Returns the value of theeffects
record component.final boolean
Indicates whether some other object is "equal to" this one.static Optional<EntityEffectPredicate>
fromJson
(@Nullable com.google.gson.JsonElement json) final int
hashCode()
Returns a hash code value for this object.boolean
test
(Map<StatusEffect, StatusEffectInstance> effects) boolean
boolean
test
(LivingEntity livingEntity) com.google.gson.JsonElement
toJson()
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
effects
The field for theeffects
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector official a
Lcm;a:Lcom/mojang/serialization/Codec;
intermediary field_45764
Lnet/minecraft/class_2102;field_45764:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/minecraft/predicate/entity/EntityEffectPredicate;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
EntityEffectPredicate
public EntityEffectPredicate(Map<RegistryEntry<StatusEffect>, EntityEffectPredicate.EffectData> effects) Creates an instance of aEntityEffectPredicate
record class.- Parameters:
effects
- the value for theeffects
record component
-
-
Method Details
-
test
- Mappings:
Namespace Name Mixin selector official a
Lcm;a(Lbiq;)Z
intermediary method_9062
Lnet/minecraft/class_2102;method_9062(Lnet/minecraft/class_1297;)Z
named test
Lnet/minecraft/predicate/entity/EntityEffectPredicate;test(Lnet/minecraft/entity/Entity;)Z
-
test
- Mappings:
Namespace Name Mixin selector official a
Lcm;a(Lbjg;)Z
intermediary method_9067
Lnet/minecraft/class_2102;method_9067(Lnet/minecraft/class_1309;)Z
named test
Lnet/minecraft/predicate/entity/EntityEffectPredicate;test(Lnet/minecraft/entity/LivingEntity;)Z
-
test
- Mappings:
Namespace Name Mixin selector official a
Lcm;a(Ljava/util/Map;)Z
intermediary method_9063
Lnet/minecraft/class_2102;method_9063(Ljava/util/Map;)Z
named test
Lnet/minecraft/predicate/entity/EntityEffectPredicate;test(Ljava/util/Map;)Z
-
fromJson
public static Optional<EntityEffectPredicate> fromJson(@Nullable @Nullable com.google.gson.JsonElement json) - Mappings:
Namespace Name Mixin selector official a
Lcm;a(Lcom/google/gson/JsonElement;)Ljava/util/Optional;
intermediary method_9064
Lnet/minecraft/class_2102;method_9064(Lcom/google/gson/JsonElement;)Ljava/util/Optional;
named fromJson
Lnet/minecraft/predicate/entity/EntityEffectPredicate;fromJson(Lcom/google/gson/JsonElement;)Ljava/util/Optional;
-
toJson
public com.google.gson.JsonElement toJson()- Mappings:
Namespace Name Mixin selector official a
Lcm;a()Lcom/google/gson/JsonElement;
intermediary method_9068
Lnet/minecraft/class_2102;method_9068()Lcom/google/gson/JsonElement;
named toJson
Lnet/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 theeffects
record component.- Returns:
- the value of the
effects
record component
-