Java Code Examples for net.minecraft.init.Items#reeds()

The following examples show how to use net.minecraft.init.Items#reeds() . 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: PlantHelper.java    From EmergingTechnology with MIT License 5 votes vote down vote up
public static boolean isSeedItem(Item item) {
    if (item instanceof IPlantable) {
        return true;
    }

    if (item == Items.REEDS) {
        return true;
    }

    return false;
}
 
Example 2
Source File: PlantHelper.java    From EmergingTechnology with MIT License 5 votes vote down vote up
public static IBlockState getBlockStateFromItemStackForPlanting(ItemStack itemStack, World world, BlockPos pos) {

        if (itemStack.getItem() == Items.WHEAT_SEEDS) {
            return Blocks.WHEAT.getDefaultState();
        }
        if (itemStack.getItem() == Items.POTATO) {
            return Blocks.POTATOES.getDefaultState();
        }
        if (itemStack.getItem() == Items.CARROT) {
            return Blocks.CARROTS.getDefaultState();
        }
        if (itemStack.getItem() == Items.BEETROOT_SEEDS) {
            return Blocks.BEETROOTS.getDefaultState();
        }
        if (itemStack.getItem() == Items.REEDS) {
            return Blocks.REEDS.getDefaultState();
        }
        if (itemStack.getItem() == Items.PUMPKIN_SEEDS) {
            return Blocks.PUMPKIN_STEM.getDefaultState();
        }
        if (itemStack.getItem() == Items.MELON_SEEDS) {
            return Blocks.MELON_STEM.getDefaultState();
        }

        if (itemStack.getItem() instanceof IPlantable) {
            return ((IPlantable) itemStack.getItem()).getPlant(world, pos);
        }

        return null;
    }
 
Example 3
Source File: PlantHelper.java    From EmergingTechnology with MIT License 4 votes vote down vote up
private static boolean isItemInOverride(Item item) {
    if (item == Items.REEDS)
        return true;
    return false;
}