Interface SpellFieldEntityEffect
- All Superinterfaces:
SpellFieldEffect
- All Known Implementing Classes:
AbsoluteStasisEffect, AirSupplyEffect, ApplyPotionEffect, BurstEntityVisualEffect, ClearEffectsEffect, DamageEffect, DisarmEffect, ExplodeEffect, ExtinguishEffect, HealEffect, IgniteEffect, ImpulseEffect, LightningStrikeEffect, OrbitEffect, PlaySoundEntityEffect, RandomTeleportEffect, ResetLifetimeEffect, SummonEntityEffect, SummonLingeringPotionEffect, SurfaceHazardEffect
Contract for a
SpellFieldEffect applied to individual entities intersecting an evaluated
spell field volume.-
Method Summary
Modifier and TypeMethodDescriptionvoidapply(net.minecraft.server.level.ServerLevel level, int enchantmentLevel, net.minecraft.world.item.enchantment.EnchantedItemInUse context, net.minecraft.world.entity.Entity spatialReference, net.minecraft.world.phys.Vec3 epicenter, net.minecraft.world.entity.Entity victim, float volumeScalar) Executes the entity effect logic on the specifiedvictim.static net.minecraft.world.level.storage.loot.LootContextcreateLootContext(net.minecraft.server.level.ServerLevel level, net.minecraft.world.entity.Entity target, int enchantmentLevel) Constructs a standardLootContextparameterized withLootContextParamSets.ENCHANTED_ENTITYfor evaluatingLootItemConditionentity filters.Methods inherited from interface SpellFieldEffect
codec
-
Method Details
-
apply
void apply(net.minecraft.server.level.ServerLevel level, int enchantmentLevel, net.minecraft.world.item.enchantment.EnchantedItemInUse context, net.minecraft.world.entity.Entity spatialReference, net.minecraft.world.phys.Vec3 epicenter, net.minecraft.world.entity.Entity victim, float volumeScalar) Executes the entity effect logic on the specifiedvictim.- Parameters:
level- The executing server level.enchantmentLevel- The active level of the spell field enchantment.context- The item usage context triggering the spell field.spatialReference- The anchor entity or focal point of the spell field.epicenter- The exact spatial origin vector of the spell field.victim- The target entity intersecting the spell field.volumeScalar- The active topological multiplier forvictimin $(0.0, 1.0]$.
-
createLootContext
static net.minecraft.world.level.storage.loot.LootContext createLootContext(net.minecraft.server.level.ServerLevel level, net.minecraft.world.entity.Entity target, int enchantmentLevel) Constructs a standardLootContextparameterized withLootContextParamSets.ENCHANTED_ENTITYfor evaluatingLootItemConditionentity filters.- Parameters:
level- The executing server level.target- The candidate target entity being tested.enchantmentLevel- The active level of the spell field enchantment.- Returns:
- The constructed
LootContext.
-