Applied-Energistics-2-tiler.../src/api/java/appeng/api/definitions/IBlockDefinition.java

35 lines
727 B
Java
Raw Normal View History

2016-01-01 01:48:15 +01:00
package appeng.api.definitions;
import java.util.Optional;
2016-01-01 01:47:22 +01:00
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
public interface IBlockDefinition extends IItemDefinition
{
/**
* @return the {@link Block} implementation if applicable
*/
Optional<Block> maybeBlock();
/**
* @return the {@link ItemBlock} implementation if applicable
*/
Optional<ItemBlock> maybeItemBlock();
/**
* Compare Block with world.
*
* @param world world of block
2015-06-16 02:44:59 +02:00
* @param pos location
*
* @return if the block is placed in the world at the specific location.
*/
2015-06-16 02:44:59 +02:00
boolean isSameAs( IBlockAccess world, BlockPos pos );
}