Interface SpellFieldEventDispatcher.BlockTargetInterceptor
- Enclosing class:
SpellFieldEventDispatcher
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional listener that intercepts and modifies the topological scalar for individual block coordinates
targeted within a spell field volume.
-
Method Summary
Modifier and TypeMethodDescriptionfloatonBlockTarget(net.minecraft.server.level.ServerLevel level, int enchantmentLevel, net.minecraft.world.item.enchantment.EnchantedItemInUse context, net.minecraft.world.entity.Entity target, net.minecraft.core.BlockPos pos, float currentScalar) Evaluates and modifies the effect scalar for a specific block coordinate.
-
Method Details
-
onBlockTarget
float onBlockTarget(net.minecraft.server.level.ServerLevel level, int enchantmentLevel, net.minecraft.world.item.enchantment.EnchantedItemInUse context, net.minecraft.world.entity.Entity target, net.minecraft.core.BlockPos pos, float currentScalar) Evaluates and modifies the effect scalar for a specific block coordinate.- Parameters:
level- The executing server level.enchantmentLevel- The level of the spell field enchantment.context- The item usage context triggering the spell field.target- The anchor entity or focal point of the spell field.pos- The block coordinate targeted by the spell field.currentScalar- The active topological multiplier for the target.- Returns:
- The modified scalar value; returning
<= 0.0Fexcludes the block from all effects.
-