java.lang.Object
de.ellpeck.actuallyadditions.api.lens.Lens
Direct Known Subclasses:
LensConversion

public abstract class Lens extends Object
This is the base class for a Reconstructor Lens Type (NOT THE ITEM!)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canInvoke(IAtomicReconstructor tile, net.minecraft.core.Direction sideToShootTo, int energyUsePerShot)
     
    abstract int
    Returns the color in an array of 3 float values that are r, g, b
    abstract int
    Gets the maximum distance the beam goes with this lens
    abstract boolean
    invoke(net.minecraft.world.level.block.state.BlockState hitState, net.minecraft.core.BlockPos hitBlock, IAtomicReconstructor tile)
    Invokes the lens type's behavior on a block

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Lens

      public Lens()
  • Method Details

    • invoke

      public abstract boolean invoke(net.minecraft.world.level.block.state.BlockState hitState, net.minecraft.core.BlockPos hitBlock, IAtomicReconstructor tile)
      Invokes the lens type's behavior on a block
      Parameters:
      hitBlock - The block that was hit
      tile - The tile the lens was invoked from
      Returns:
      If the Reconstructor should stop continuing (return false if you want it to go through blocks)
    • getColor

      public abstract int getColor()
      Returns the color in an array of 3 float values that are r, g, b
    • getDistance

      public abstract int getDistance()
      Gets the maximum distance the beam goes with this lens
    • canInvoke

      public boolean canInvoke(IAtomicReconstructor tile, net.minecraft.core.Direction sideToShootTo, int energyUsePerShot)
      Returns:
      If the lens can be invoked at the current time