Interface Topology
- 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 TypeMethodDescriptionOptional<net.minecraft.world.item.enchantment.LevelBasedValue> Retrieves the optional distance limit extending parallel to the primary orientationaxis().Retrieves the falloff scaling function applied to a target's distance parallel toaxis().axis()Retrieves the optional directional axis vector governing cylindrical/planar field alignment.net.minecraft.world.phys.AABBcomputeAABB(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.floatevaluateMultiplier(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 attargetPos.net.minecraft.world.phys.Vec3getOrigin(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 applyingoriginOffset()to the givenepicenter.metric()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.LevelBasedValueRetrieves 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 orientationaxis().Retrieves the falloff scaling function applied to a target's distance perpendicular toaxis().
-
Method Details
-
originRange
net.minecraft.world.item.enchantment.LevelBasedValue originRange()Retrieves the primary operational range radiating from the spatial epicenter.- Returns:
- The
LevelBasedValuegoverning the maximum origin distance.
-
axialRange
Optional<net.minecraft.world.item.enchantment.LevelBasedValue> axialRange()Retrieves the optional distance limit extending parallel to the primary orientationaxis().- Returns:
- An
Optionalcontaining the axial rangeLevelBasedValue.
-
radialRange
Optional<net.minecraft.world.item.enchantment.LevelBasedValue> radialRange()Retrieves the optional distance limit extending perpendicular to the primary orientationaxis().- Returns:
- An
Optionalcontaining the radial rangeLevelBasedValue.
-
originOffset
Optional<SpatialVector> originOffset()Retrieves the optional spatial displacement separating the topological origin from the volume center.- Returns:
- An
Optionalcontaining the origin offsetSpatialVector.
-
axis
Optional<SpatialVector> axis()Retrieves the optional directional axis vector governing cylindrical/planar field alignment.- Returns:
- An
Optionalcontaining the orientation axisSpatialVector.
-
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 toaxis().- Returns:
- The axial
DistanceScalingFunction.
-
radialScaling
DistanceScalingFunction radialScaling()Retrieves the falloff scaling function applied to a target's distance perpendicular toaxis().- 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 applyingoriginOffset()to the givenepicenter.- Parameters:
enchantmentLevel- The active level of the spell field enchantment.spatialReference- The entity defining the local reference frame, ornull.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, ornull.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 attargetPos.- Parameters:
enchantmentLevel- The active level of the spell field enchantment.spatialReference- The entity defining the local reference frame, ornull.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.0Fif the target lies outside any active range bound.
-