Applied-Energistics-2-tiler.../src/api/java/appeng/api/definitions/IComparableDefinition.java
thatsIch 03f9436ef9 Fixes #1331: Happened on deactivating features for intermediate crafting components
If a feature dependency of ItemMultiMaterial was disabled, the returned value was never assigned with the constructed. Pulling out the construction and setting it before checking it, prevents the NPE and also matches the behaviour in ItemMultiPart, where parts are constructed, but never registered.
2015-05-01 17:52:23 +02:00

41 lines
908 B
Java

package appeng.api.definitions;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
/**
* Interface to compare a definition with an itemstack or a block
*
* @author thatsIch
* @version rv2
* @since rv2
*/
public interface IComparableDefinition
{
/**
* Compare {@link ItemStack} with this
*
* @param comparableStack compared item
*
* @return true if the item stack is a matching item.
*/
boolean isSameAs( ItemStack comparableStack );
/**
* Compare Block with world.
*
* @param world world of block
* @param x x pos of block
* @param y y pos of block
* @param z z pos of block
*
* @return if the block is placed in the world at the specific location.
*
* @deprecated moved to {@link IBlockDefinition}. Is removed in the next major release rv3
*/
@Deprecated
boolean isSameAs( IBlockAccess world, int x, int y, int z );
}