Class DamageSourcePredicate

java.lang.Object
net.minecraft.advancements.criterion.DamageSourcePredicate

public class DamageSourcePredicate extends Object
  • Field Details

    • ANY

      public static final DamageSourcePredicate ANY
    • isProjectile

      private final Boolean isProjectile
    • isExplosion

      private final Boolean isExplosion
    • bypassesArmor

      private final Boolean bypassesArmor
    • bypassesInvulnerability

      private final Boolean bypassesInvulnerability
    • bypassesMagic

      private final Boolean bypassesMagic
    • isFire

      private final Boolean isFire
    • isMagic

      private final Boolean isMagic
    • isLightning

      private final Boolean isLightning
    • directEntity

      private final EntityPredicate directEntity
    • sourceEntity

      private final EntityPredicate sourceEntity
  • Constructor Details

  • Method Details

    • 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 Boolean getOptionalBoolean(com.google.gson.JsonObject p_192448_0_, String p_192448_1_)
    • serializeToJson

      public com.google.gson.JsonElement serializeToJson()
    • addOptionally

      private void addOptionally(com.google.gson.JsonObject p_203992_1_, String p_203992_2_, @Nullable Boolean p_203992_3_)