Applied-Energistics-2-tiler.../src/api/java/appeng/api/definitions/IComparableDefinition.java
2015-06-15 19:44:59 -05:00

40 lines
866 B
Java

package appeng.api.definitions;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
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 pos in world.
*
* @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, BlockPos pos );
}