All Known Implementing Classes:
FieldTopology

public interface Topology
Contract specifying the mathematical rule set that governs internal volume strength falloff, directional axis projection, and bounding box generation for a spell field volume.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<net.minecraft.world.item.enchantment.LevelBasedValue>
    Retrieves the optional distance limit extending parallel to the primary orientation axis().
    Retrieves the falloff scaling function applied to a target's distance parallel to axis().
    Retrieves the optional directional axis vector governing cylindrical/planar field alignment.
    net.minecraft.world.phys.AABB
    computeAABB(int enchantmentLevel, net.minecraft.world.entity.Entity spatialReference, net.minecraft.world.phys.Vec3 volumeCenter)
    Constructs a tight world-space axis-aligned bounding box enclosing the active topological range.
    float
    evaluateMultiplier(int enchantmentLevel, net.minecraft.world.entity.Entity spatialReference, net.minecraft.world.phys.Vec3 epicenter, net.minecraft.world.phys.Vec3 targetPos)
    Evaluates the composite topological multiplier ($\text{origin} \cdot \text{axial} \cdot \text{radial}$) for a target at targetPos.
    net.minecraft.world.phys.Vec3
    getOrigin(int enchantmentLevel, net.minecraft.world.entity.Entity spatialReference, net.minecraft.world.phys.Vec3 epicenter)
    Calculates the absolute world-space origin coordinate for topological evaluation by applying originOffset() to the given epicenter.
    Retrieves the distance metric ($L_2$ Euclidean or $L_1$ Manhattan) used for radius comparisons.
    Retrieves the optional spatial displacement separating the topological origin from the volume center.
    net.minecraft.world.item.enchantment.LevelBasedValue
    Retrieves the primary operational range radiating from the spatial epicenter.
    Retrieves the falloff scaling function applied to a target's distance from the topological origin.
    Optional<net.minecraft.world.item.enchantment.LevelBasedValue>
    Retrieves the optional distance limit extending perpendicular to the primary orientation axis().
    Retrieves the falloff scaling function applied to a target's distance perpendicular to axis().
  • Method Details

    • originRange

      net.minecraft.world.item.enchantment.LevelBasedValue originRange()
      Retrieves the primary operational range radiating from the spatial epicenter.
      Returns:
      The LevelBasedValue governing the maximum origin distance.
    • axialRange

      Optional<net.minecraft.world.item.enchantment.LevelBasedValue> axialRange()
      Retrieves the optional distance limit extending parallel to the primary orientation axis().
      Returns:
      An Optional containing the axial range LevelBasedValue.
    • radialRange

      Optional<net.minecraft.world.item.enchantment.LevelBasedValue> radialRange()
      Retrieves the optional distance limit extending perpendicular to the primary orientation axis().
      Returns:
      An Optional containing the radial range LevelBasedValue.
    • originOffset

      Optional<SpatialVector> originOffset()
      Retrieves the optional spatial displacement separating the topological origin from the volume center.
      Returns:
      An Optional containing the origin offset SpatialVector.
    • axis

      Retrieves the optional directional axis vector governing cylindrical/planar field alignment.
      Returns:
      An Optional containing the orientation axis SpatialVector.
    • originScaling

      DistanceScalingFunction originScaling()
      Retrieves the falloff scaling function applied to a target's distance from the topological origin.
      Returns:
      The origin DistanceScalingFunction.
    • axialScaling

      DistanceScalingFunction axialScaling()
      Retrieves the falloff scaling function applied to a target's distance parallel to axis().
      Returns:
      The axial DistanceScalingFunction.
    • radialScaling

      DistanceScalingFunction radialScaling()
      Retrieves the falloff scaling function applied to a target's distance perpendicular to axis().
      Returns:
      The radial DistanceScalingFunction.
    • metric

      DistanceMetric metric()
      Retrieves the distance metric ($L_2$ Euclidean or $L_1$ Manhattan) used for radius comparisons.
      Returns:
      The active DistanceMetric.
    • getOrigin

      net.minecraft.world.phys.Vec3 getOrigin(int enchantmentLevel, net.minecraft.world.entity.Entity spatialReference, net.minecraft.world.phys.Vec3 epicenter)
      Calculates the absolute world-space origin coordinate for topological evaluation by applying originOffset() to the given epicenter.
      Parameters:
      enchantmentLevel - The active level of the spell field enchantment.
      spatialReference - The entity defining the local reference frame, or null.
      epicenter - The base mathematical center of the volume.
      Returns:
      The offset world-space origin coordinate.
    • computeAABB

      net.minecraft.world.phys.AABB computeAABB(int enchantmentLevel, net.minecraft.world.entity.Entity spatialReference, net.minecraft.world.phys.Vec3 volumeCenter)
      Constructs a tight world-space axis-aligned bounding box enclosing the active topological range.
      Parameters:
      enchantmentLevel - The active level of the spell field enchantment.
      spatialReference - The entity defining the local reference frame, or null.
      volumeCenter - The mathematical center of the volume.
      Returns:
      The computed world-space AABB.
    • evaluateMultiplier

      float evaluateMultiplier(int enchantmentLevel, net.minecraft.world.entity.Entity spatialReference, net.minecraft.world.phys.Vec3 epicenter, net.minecraft.world.phys.Vec3 targetPos)
      Evaluates the composite topological multiplier ($\text{origin} \cdot \text{axial} \cdot \text{radial}$) for a target at targetPos.
      Parameters:
      enchantmentLevel - The active level of the spell field enchantment.
      spatialReference - The entity defining the local reference frame, or null.
      epicenter - The mathematical center of the field volume.
      targetPos - The absolute world position of the target entity or block.
      Returns:
      The scalar multiplier in $[0.0, 1.0]$, or 0.0F if the target lies outside any active range bound.