All Known Implementing Classes:
CubeShape, CuboidShape, DeepCuboidShape, WideCuboidShape

public interface SpellFieldShape
Contract defining an outer axis-aligned bounding box (AABB) structural frame that restricts spatial target collection for a SpellFieldVolume.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.serialization.MapCodec<? extends SpellFieldShape>
    Retrieves the MapCodec responsible for serializing and deserializing this shape definition.
    net.minecraft.world.phys.AABB
    computeBounds(net.minecraft.world.entity.Entity caster, net.minecraft.world.phys.Vec3 epicenter, int enchantmentLevel)
    Computes the world-space axis-aligned bounding box enclosing the shape at the given epicenter.
  • Method Details

    • computeBounds

      net.minecraft.world.phys.AABB computeBounds(net.minecraft.world.entity.Entity caster, net.minecraft.world.phys.Vec3 epicenter, int enchantmentLevel)
      Computes the world-space axis-aligned bounding box enclosing the shape at the given epicenter.
      Parameters:
      caster - The reference entity anchoring or orienting the shape, or null.
      epicenter - The world-space center coordinate of the shape evaluation.
      enchantmentLevel - The active level of the spell field enchantment.
      Returns:
      The computed world-space AABB restricting field evaluation.
    • codec

      com.mojang.serialization.MapCodec<? extends SpellFieldShape> codec()
      Retrieves the MapCodec responsible for serializing and deserializing this shape definition.
      Returns:
      The registered MapCodec instance.