Class DefaultSpellFields

java.lang.Object
johnsmith.enchantingoverhauled.data.datagen.spellfield.DefaultSpellFields

public class DefaultSpellFields extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.resources.ResourceKey<AiSpellField>
     
    static final Function<net.minecraft.data.worldgen.BootstrapContext<?>,net.minecraft.advancements.criterion.ContextAwarePredicate>
    Positive target filter (true = entity CAN be harmed by offensive spell effects): Entity is NOT in Tags.ENCHANTED_TOME_ALLIES, Tags.ENCHANTED_TOME_NEUTRAL, or Tags.ENCHANTED_TOME_AVOID_COLLATERAL. AND entity either is NOT wearing enchanted armor OR the caster is actively hostile towards them. Use this for entity_filter on SpellFieldEntityEffects (e.g., ApplyPotionEffect, AbsoluteStasisEffect, DamageEffect, ImpulseEffect).
    static final net.minecraft.resources.ResourceKey<AiSpellField>
     
    static final net.minecraft.resources.ResourceKey<AiSpellField>
     
    static final net.minecraft.resources.ResourceKey<AiSpellField>
     
    static final net.minecraft.resources.ResourceKey<AiSpellField>
     
    static final Function<net.minecraft.data.worldgen.BootstrapContext<?>,net.minecraft.advancements.criterion.ContextAwarePredicate>
    Immunity filter (true = entity MUST NOT be harmed / is immune to explosion damage): Evaluates to true for Allies, Neutrals (e.g., Villagers), Avoid-Collateral mobs, and pacified players wearing enchanted armor. Evaluates to false for valid hostile targets (e.g., Zombies and provoked players). Use this for ExplosionDefinition's immunity predicate where true grants immunity.
    static final Function<net.minecraft.data.worldgen.BootstrapContext<?>,net.minecraft.advancements.criterion.ContextAwarePredicate>
     
    static final net.minecraft.resources.ResourceKey<AiSpellField>
     
    static final net.minecraft.resources.ResourceKey<AiSpellField>
     
    static final Function<net.minecraft.data.worldgen.BootstrapContext<?>,net.minecraft.advancements.criterion.ContextAwarePredicate>
     
    static final net.minecraft.resources.ResourceKey<AiSpellField>
     
    static final net.minecraft.resources.ResourceKey<AiSpellField>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder
    canHarmCondition(net.minecraft.core.HolderGetter<net.minecraft.world.entity.EntityType<?>> type)
     
    static net.minecraft.world.level.storage.loot.predicates.LootItemCondition
     
    static johnsmith.enchantmentcore.api.enchantment.spellfield.shape.SpellFieldVolume
    linearSphereVolume(float radius)
     
    static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder
    noneOf(net.minecraft.core.HolderGetter<net.minecraft.world.entity.EntityType<?>> type, net.minecraft.tags.TagKey<net.minecraft.world.entity.EntityType<?>>... tags)
     
    static net.minecraft.core.HolderSet<MagicSchool>
    schoolSet(net.minecraft.data.worldgen.BootstrapContext<AiSpellField> context, net.minecraft.resources.ResourceKey<MagicSchool> schoolKey)
     
    static net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent>
    soundHolder(net.minecraft.sounds.SoundEvent soundEvent)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • OBLITERATION

      public static final net.minecraft.resources.ResourceKey<AiSpellField> OBLITERATION
    • ABJURATION

      public static final net.minecraft.resources.ResourceKey<AiSpellField> ABJURATION
    • PERPETUATION

      public static final net.minecraft.resources.ResourceKey<AiSpellField> PERPETUATION
    • COERCION

      public static final net.minecraft.resources.ResourceKey<AiSpellField> COERCION
    • DECEPTION

      public static final net.minecraft.resources.ResourceKey<AiSpellField> DECEPTION
    • DIVINATION

      public static final net.minecraft.resources.ResourceKey<AiSpellField> DIVINATION
    • TRANSLATION

      public static final net.minecraft.resources.ResourceKey<AiSpellField> TRANSLATION
    • CONJURATION

      public static final net.minecraft.resources.ResourceKey<AiSpellField> CONJURATION
    • TRANSMUTATION

      public static final net.minecraft.resources.ResourceKey<AiSpellField> TRANSMUTATION
    • CAN_HARM

      public static final Function<net.minecraft.data.worldgen.BootstrapContext<?>,net.minecraft.advancements.criterion.ContextAwarePredicate> CAN_HARM
      Positive target filter (true = entity CAN be harmed by offensive spell effects): Use this for entity_filter on SpellFieldEntityEffects (e.g., ApplyPotionEffect, AbsoluteStasisEffect, DamageEffect, ImpulseEffect).
    • DO_NOT_HARM

      public static final Function<net.minecraft.data.worldgen.BootstrapContext<?>,net.minecraft.advancements.criterion.ContextAwarePredicate> DO_NOT_HARM
      Immunity filter (true = entity MUST NOT be harmed / is immune to explosion damage):
      • Evaluates to true for Allies, Neutrals (e.g., Villagers), Avoid-Collateral mobs, and pacified players wearing enchanted armor.
      • Evaluates to false for valid hostile targets (e.g., Zombies and provoked players).
      Use this for ExplosionDefinition's immunity predicate where true grants immunity.
    • NON_PLAYER_FILTER

      public static final Function<net.minecraft.data.worldgen.BootstrapContext<?>,net.minecraft.advancements.criterion.ContextAwarePredicate> NON_PLAYER_FILTER
    • PLAYER_ONLY_FILTER

      public static final Function<net.minecraft.data.worldgen.BootstrapContext<?>,net.minecraft.advancements.criterion.ContextAwarePredicate> PLAYER_ONLY_FILTER
  • Constructor Details

    • DefaultSpellFields

      public DefaultSpellFields()
  • Method Details

    • canHarmCondition

      public static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder canHarmCondition(net.minecraft.core.HolderGetter<net.minecraft.world.entity.EntityType<?>> type)
    • noneOf

      @SafeVarargs public static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder noneOf(net.minecraft.core.HolderGetter<net.minecraft.world.entity.EntityType<?>> type, net.minecraft.tags.TagKey<net.minecraft.world.entity.EntityType<?>>... tags)
    • hasEnchantedArmor

      public static net.minecraft.world.level.storage.loot.predicates.LootItemCondition hasEnchantedArmor()
    • schoolSet

      public static net.minecraft.core.HolderSet<MagicSchool> schoolSet(net.minecraft.data.worldgen.BootstrapContext<AiSpellField> context, net.minecraft.resources.ResourceKey<MagicSchool> schoolKey)
    • soundHolder

      public static net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> soundHolder(net.minecraft.sounds.SoundEvent soundEvent)
    • linearSphereVolume

      public static johnsmith.enchantmentcore.api.enchantment.spellfield.shape.SpellFieldVolume linearSphereVolume(float radius)