Class DamageSourcePredicate
- java.lang.Object
-
- net.minecraft.advancements.criterion.DamageSourcePredicate
-
public class DamageSourcePredicate extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DamageSourcePredicate.Builder
-
Field Summary
Fields Modifier and Type Field Description static DamageSourcePredicate
ANY
private java.lang.Boolean
bypassesArmor
private java.lang.Boolean
bypassesInvulnerability
private java.lang.Boolean
bypassesMagic
private EntityPredicate
directEntity
private java.lang.Boolean
isExplosion
private java.lang.Boolean
isFire
private java.lang.Boolean
isLightning
private java.lang.Boolean
isMagic
private java.lang.Boolean
isProjectile
private EntityPredicate
sourceEntity
-
Constructor Summary
Constructors Constructor Description DamageSourcePredicate(java.lang.Boolean p_i50810_1_, java.lang.Boolean p_i50810_2_, java.lang.Boolean p_i50810_3_, java.lang.Boolean p_i50810_4_, java.lang.Boolean p_i50810_5_, java.lang.Boolean p_i50810_6_, java.lang.Boolean p_i50810_7_, java.lang.Boolean p_i50810_8_, EntityPredicate p_i50810_9_, EntityPredicate p_i50810_10_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addOptionally(com.google.gson.JsonObject p_203992_1_, java.lang.String p_203992_2_, java.lang.Boolean p_203992_3_)
static DamageSourcePredicate
fromJson(com.google.gson.JsonElement p_192447_0_)
private static java.lang.Boolean
getOptionalBoolean(com.google.gson.JsonObject p_192448_0_, java.lang.String p_192448_1_)
boolean
matches(ServerPlayerEntity p_193418_1_, DamageSource p_193418_2_)
boolean
matches(ServerWorld p_217952_1_, Vector3d p_217952_2_, DamageSource p_217952_3_)
com.google.gson.JsonElement
serializeToJson()
-
-
-
Field Detail
-
ANY
public static final DamageSourcePredicate ANY
-
isProjectile
private final java.lang.Boolean isProjectile
-
isExplosion
private final java.lang.Boolean isExplosion
-
bypassesArmor
private final java.lang.Boolean bypassesArmor
-
bypassesInvulnerability
private final java.lang.Boolean bypassesInvulnerability
-
bypassesMagic
private final java.lang.Boolean bypassesMagic
-
isFire
private final java.lang.Boolean isFire
-
isMagic
private final java.lang.Boolean isMagic
-
isLightning
private final java.lang.Boolean isLightning
-
directEntity
private final EntityPredicate directEntity
-
sourceEntity
private final EntityPredicate sourceEntity
-
-
Constructor Detail
-
DamageSourcePredicate
public DamageSourcePredicate(@Nullable java.lang.Boolean p_i50810_1_, @Nullable java.lang.Boolean p_i50810_2_, @Nullable java.lang.Boolean p_i50810_3_, @Nullable java.lang.Boolean p_i50810_4_, @Nullable java.lang.Boolean p_i50810_5_, @Nullable java.lang.Boolean p_i50810_6_, @Nullable java.lang.Boolean p_i50810_7_, @Nullable java.lang.Boolean p_i50810_8_, EntityPredicate p_i50810_9_, EntityPredicate p_i50810_10_)
-
-
Method Detail
-
matches
public boolean matches(ServerPlayerEntity p_193418_1_, DamageSource p_193418_2_)
-
matches
public boolean matches(ServerWorld p_217952_1_, Vector3d p_217952_2_, DamageSource p_217952_3_)
-
fromJson
public static DamageSourcePredicate fromJson(@Nullable com.google.gson.JsonElement p_192447_0_)
-
getOptionalBoolean
@Nullable private static java.lang.Boolean getOptionalBoolean(com.google.gson.JsonObject p_192448_0_, java.lang.String p_192448_1_)
-
serializeToJson
public com.google.gson.JsonElement serializeToJson()
-
addOptionally
private void addOptionally(com.google.gson.JsonObject p_203992_1_, java.lang.String p_203992_2_, @Nullable java.lang.Boolean p_203992_3_)
-
-