Interface IEnergyLaser<T extends net.minecraft.entity.Entity>

  • All Superinterfaces:
    IEnergyAbility<T>, IEnergyProjectile<T>, IEntity<T>

    public interface IEnergyLaser<T extends net.minecraft.entity.Entity>
    extends IEnergyProjectile<T>
    A continuous laser beam that extends outward from its origin along a direction vector.

    Unlike other projectiles, lasers don't move through the world — they extend from their origin point along a direction, hitting everything in their path up to getMaxLength(). The direction can be set explicitly via setDirection(double, double, double).

    The coordinate-based fireAt(x, y, z) calculates and sets the direction vector automatically, then uses the laser's internal launch sequence.

    • Method Detail

      • getLaserWidth

        float getLaserWidth()
        Width of the laser beam.
        Returns:
        the laser width in blocks
      • setLaserWidth

        void setLaserWidth​(float width)
      • getExpansionSpeed

        float getExpansionSpeed()
      • setExpansionSpeed

        void setExpansionSpeed​(float speed)
      • getMaxLength

        float getMaxLength()
      • setMaxLength

        void setMaxLength​(float maxLength)
      • getCurrentLength

        float getCurrentLength()
      • isFullyExtended

        boolean isFullyExtended()
      • getDirX

        double getDirX()
      • getDirY

        double getDirY()
      • getDirZ

        double getDirZ()
      • setDirection

        void setDirection​(double x,
                          double y,
                          double z)
      • getEndX

        double getEndX()
      • getEndY

        double getEndY()
      • getEndZ

        double getEndZ()