net.minecraft.block.BlockPlanks.EnumType Java Examples

The following examples show how to use net.minecraft.block.BlockPlanks.EnumType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CocoaHandler.java    From BetterChests with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public boolean canHandlePlant(Collection<ItemStack> items, World world, BlockPos pos, IBlockState state) {
	if (!WorldUtil.isBlockAir(state)) {
		return false;
	}
	boolean found = false;
	for (EnumFacing dir : EnumFacing.HORIZONTALS) {
		BlockPos toCheck = pos.offset(dir);
		IBlockState other = world.getBlockState(toCheck);
		if (other.getBlock() == Blocks.LOG && other.getValue(BlockOldLog.VARIANT) == EnumType.JUNGLE) {
			found = true;
			break;
		}
	}
	return found && items.stream().anyMatch(this::canPlantStack);
}
 
Example #2
Source File: BlockGregLeaves.java    From GregTech with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public EnumType getWoodType(int meta) {
    return null;
}
 
Example #3
Source File: BlockInfestedLeaves.java    From ExNihiloAdscensio with MIT License 4 votes vote down vote up
@Override
public EnumType getWoodType(int meta) {
	return null;
}
 
Example #4
Source File: BlockAlienLeaves.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
@Override
public EnumType getWoodType(int meta) {
	return EnumType.OAK;
}
 
Example #5
Source File: CocoaHandler.java    From BetterChests with GNU Lesser General Public License v3.0 4 votes vote down vote up
private boolean isJungleTree(IBlockState state) {
	return state.getBlock() == Blocks.LOG && state.getValue(BlockOldLog.VARIANT) == EnumType.JUNGLE;
}