Class DefaultSpellFields
java.lang.Object
johnsmith.enchantingoverhauled.data.datagen.spellfield.DefaultSpellFields
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic 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 inTags.ENCHANTED_TOME_ALLIES,Tags.ENCHANTED_TOME_NEUTRAL, orTags.ENCHANTED_TOME_AVOID_COLLATERAL. AND entity either is NOT wearing enchanted armor OR the caster is actively hostile towards them. Use this forentity_filteronSpellFieldEntityEffects (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 totruefor Allies, Neutrals (e.g., Villagers), Avoid-Collateral mobs, and pacified players wearing enchanted armor. Evaluates tofalsefor valid hostile targets (e.g., Zombies and provoked players). Use this forExplosionDefinition's immunity predicate wheretruegrants 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 -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.level.storage.loot.predicates.LootItemCondition.BuildercanHarmCondition(net.minecraft.core.HolderGetter<net.minecraft.world.entity.EntityType<?>> type) static net.minecraft.world.level.storage.loot.predicates.LootItemConditionstatic johnsmith.enchantmentcore.api.enchantment.spellfield.shape.SpellFieldVolumelinearSphereVolume(float radius) static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.BuildernoneOf(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)
-
Field Details
-
OBLITERATION
-
ABJURATION
-
PERPETUATION
-
COERCION
-
DECEPTION
-
DIVINATION
-
TRANSLATION
-
CONJURATION
-
TRANSMUTATION
-
CAN_HARM
public static final Function<net.minecraft.data.worldgen.BootstrapContext<?>,net.minecraft.advancements.criterion.ContextAwarePredicate> CAN_HARMPositive target filter (true= entity CAN be harmed by offensive spell effects):- Entity is NOT in
Tags.ENCHANTED_TOME_ALLIES,Tags.ENCHANTED_TOME_NEUTRAL, orTags.ENCHANTED_TOME_AVOID_COLLATERAL. - AND entity either is NOT wearing enchanted armor OR the caster is actively hostile towards them.
entity_filteronSpellFieldEntityEffects (e.g.,ApplyPotionEffect,AbsoluteStasisEffect,DamageEffect,ImpulseEffect). - Entity is NOT in
-
DO_NOT_HARM
public static final Function<net.minecraft.data.worldgen.BootstrapContext<?>,net.minecraft.advancements.criterion.ContextAwarePredicate> DO_NOT_HARMImmunity filter (true= entity MUST NOT be harmed / is immune to explosion damage):- Evaluates to
truefor Allies, Neutrals (e.g., Villagers), Avoid-Collateral mobs, and pacified players wearing enchanted armor. - Evaluates to
falsefor valid hostile targets (e.g., Zombies and provoked players).
ExplosionDefinition's immunity predicate wheretruegrants immunity. - Evaluates to
-
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)
-