Interface SpellFieldBlockEffect

All Superinterfaces:
SpellFieldEffect
All Known Implementing Classes:
BreakBlockEffect, BurstBlockVisualEffect, IgniteBlockEffect, PlaceBlockEffect, PlaceTemporaryBlockEffect, PlaySoundBlockEffect, TemporaryTransmuteBlockEffect, TransmuteBlockEffect

public interface SpellFieldBlockEffect extends SpellFieldEffect
Contract for a SpellFieldEffect applied to individual block coordinates within an evaluated spell field volume.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.core.BlockPos pos, float scalar, Set<net.minecraft.core.BlockPos> modifiedBlocks)
    Executes the block modification or interaction logic at the specified block position.
    default float
    getPriority(int enchantmentLevel)
    Returns the execution priority of this block effect for sorting prior to block iteration.

    Methods inherited from interface johnsmith.enchantmentcore.api.enchantment.spellfield.effect.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.core.BlockPos pos, float scalar, Set<net.minecraft.core.BlockPos> modifiedBlocks)
      Executes the block modification or interaction logic at the specified block position.
      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.
      pos - The target block coordinate being evaluated.
      scalar - The active topological multiplier at pos in $(0.0, 1.0]$.
      modifiedBlocks - A mutable set tracking block coordinates already mutated during the current evaluation cycle.
    • getPriority

      default float getPriority(int enchantmentLevel)
      Returns the execution priority of this block effect for sorting prior to block iteration. Higher priority values execute earlier in the evaluation cycle.
      Parameters:
      enchantmentLevel - The active level of the spell field enchantment.
      Returns:
      The priority scalar (defaults to 0.0F).