Class Lens
java.lang.Object
de.ellpeck.actuallyadditions.api.lens.Lens
- Direct Known Subclasses:
LensConversion
This is the base class for a Reconstructor Lens Type (NOT THE ITEM!)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanInvoke(IAtomicReconstructor tile, net.minecraft.core.Direction sideToShootTo, int energyUsePerShot) abstract intgetColor()Returns the color in an array of 3 float values that are r, g, babstract intGets the maximum distance the beam goes with this lensabstract booleaninvoke(net.minecraft.world.level.block.state.BlockState hitState, net.minecraft.core.BlockPos hitBlock, IAtomicReconstructor tile) Invokes the lens type's behavior on a block
-
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 hittile- 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
-