2016-05-16 22:52:27 +02:00
|
|
|
/*
|
|
|
|
* This file ("IColorLensChanger.java") is part of the Actually Additions mod for Minecraft.
|
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
|
|
|
* http://ellpeck.de/actaddlicense
|
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2017-01-01 16:23:26 +01:00
|
|
|
* © 2015-2017 Ellpeck
|
2016-05-16 22:52:27 +02:00
|
|
|
*/
|
|
|
|
|
2016-05-05 19:50:59 +02:00
|
|
|
package de.ellpeck.actuallyadditions.api.recipe;
|
|
|
|
|
2016-05-06 12:26:41 +02:00
|
|
|
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
2021-02-26 22:15:48 +01:00
|
|
|
import net.minecraft.block.state.BlockState;
|
2016-05-05 19:50:59 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
2016-05-06 12:26:41 +02:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
2016-05-05 19:50:59 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for the Atomic Reconstructor's Color Lens changing algorythm.
|
|
|
|
* When registering a new item to be changed, it needs an IColorLensChanger which
|
|
|
|
* is the method with which the item will be changed.
|
2016-05-06 12:26:41 +02:00
|
|
|
* <p>
|
2016-05-05 19:50:59 +02:00
|
|
|
* See ColorLensChangerByDyeMeta for reference.
|
|
|
|
*/
|
2019-05-02 09:10:29 +02:00
|
|
|
public interface IColorLensChanger {
|
2016-05-05 19:50:59 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Modifies the given item.
|
|
|
|
* Will only be called with stacks containing items that are registered with
|
|
|
|
* this IColorLensChanger.
|
|
|
|
*
|
2016-05-06 12:26:41 +02:00
|
|
|
* @param stack the stack to modify
|
|
|
|
* @param hitBlockState The state of the block that was hit
|
|
|
|
* @param hitBlock the block that was hit (usually air, or the block that is also in the stack)
|
|
|
|
* @param tile the Reconstructor doing the color conversion
|
2016-05-05 19:50:59 +02:00
|
|
|
* @return the modified stack. Please make sure to return a modified COPY of the input stack.
|
|
|
|
*/
|
2021-02-26 22:15:48 +01:00
|
|
|
ItemStack modifyItem(ItemStack stack, BlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile);
|
2016-05-05 19:50:59 +02:00
|
|
|
|
|
|
|
}
|