Class LensConversion

java.lang.Object
de.ellpeck.actuallyadditions.api.lens.Lens
de.ellpeck.actuallyadditions.api.lens.LensConversion

public class LensConversion extends Lens
This is the base class for a Reconstructor Lens Type that converts two items via the ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_CONVERSION_RECIPES list.

If you want to make a new type of conversion, just use your type in the recipe If you want to use the default type of conversion, use ActuallyAdditionsAPI.lensDefaultConversion.

  • Constructor Details

    • LensConversion

      public LensConversion()
  • Method Details

    • invoke

      public boolean invoke(net.minecraft.world.level.block.state.BlockState hitState, net.minecraft.core.BlockPos hitBlock, IAtomicReconstructor tile)
      Description copied from class: Lens
      Invokes the lens type's behavior on a block
      Specified by:
      invoke in class Lens
      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 int getColor()
      Description copied from class: Lens
      Returns the color in an array of 3 float values that are r, g, b
      Specified by:
      getColor in class Lens
    • getDistance

      public int getDistance()
      Description copied from class: Lens
      Gets the maximum distance the beam goes with this lens
      Specified by:
      getDistance in class Lens