2016-05-14 14:14:06 +02:00
|
|
|
/*
|
2016-05-16 22:52:27 +02:00
|
|
|
* This file ("LensConversion.java") is part of the Actually Additions mod for Minecraft.
|
2016-05-14 14:14:06 +02:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-05-16 22:52:27 +02:00
|
|
|
* http://ellpeck.de/actaddlicense
|
2016-05-14 14:14:06 +02:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2017-01-01 16:23:26 +01:00
|
|
|
* © 2015-2017 Ellpeck
|
2016-05-14 14:14:06 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
package de.ellpeck.actuallyadditions.api.lens;
|
|
|
|
|
|
|
|
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
|
|
|
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
|
|
|
import net.minecraft.block.state.IBlockState;
|
|
|
|
import net.minecraft.util.math.BlockPos;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This is the base class for a Reconstructor Lens Type that converts two items
|
2016-05-19 20:05:12 +02:00
|
|
|
* via the ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_CONVERSION_RECIPES list.
|
2016-06-01 00:39:35 +02:00
|
|
|
* <p>
|
2016-05-14 14:14:06 +02:00
|
|
|
* If you want to make a new type of conversion, just use your type in the recipe
|
2016-05-15 12:00:42 +02:00
|
|
|
* If you want to use the default type of conversion, use ActuallyAdditionsAPI.lensDefaultConversion.
|
2016-05-14 14:14:06 +02:00
|
|
|
*/
|
2019-05-02 09:10:29 +02:00
|
|
|
public class LensConversion extends Lens {
|
2016-05-14 14:14:06 +02:00
|
|
|
|
|
|
|
@Override
|
2019-05-02 09:10:29 +02:00
|
|
|
public boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile) {
|
2016-05-14 14:14:06 +02:00
|
|
|
return ActuallyAdditionsAPI.methodHandler.invokeConversionLens(hitState, hitBlock, tile);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-05-02 09:10:29 +02:00
|
|
|
public float[] getColor() {
|
|
|
|
return new float[] { 27F / 255F, 109F / 255F, 1F };
|
2016-05-14 14:14:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-05-02 09:10:29 +02:00
|
|
|
public int getDistance() {
|
2016-05-14 14:14:06 +02:00
|
|
|
return 10;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|