Package net.minecraftforge.common

Examples of net.minecraftforge.common.EnumPlantType


    if(!(seedStack.getItem() instanceof IPlantable)) {
      return false;
    }

    IPlantable plantable = (IPlantable) seedStack.getItem();
    EnumPlantType type = plantable.getPlantType(farm.getWorldObj(), bc.x, bc.y, bc.z);
    if(type == null) {
      return false;
    }
    Block ground = farm.getBlock(bc.getLocation(ForgeDirection.DOWN));
    if(type == EnumPlantType.Nether) {
View Full Code Here


        return this == target || target == Blocks.netherrack;
    }

    public boolean canSustainPlant (World world, int x, int y, int z, ForgeDirection direction, IPlantable plant)
    {
        EnumPlantType plantType = plant.getPlantType(world, x, y + 1, z);
        if (plantType == EnumPlantType.Nether)
            return true;
        return super.canSustainPlant(world, x, y, z, direction, plant);
    }
View Full Code Here

    world.markBlockForUpdate(i, j, k);
  }

  @Override
  public boolean canSustainPlant(IBlockAccess world, int x, int y, int z, ForgeDirection direction, IPlantable plant) {
    EnumPlantType plantType = plant.getPlantType(world, x, y, z);
    if (plantType != EnumPlantType.Crop && plantType != EnumPlantType.Plains)
      return false;

    int meta = world.getBlockMetadata(x, y, z);
    SoilType type = getTypeFromMeta(meta);
View Full Code Here

TOP

Related Classes of net.minecraftforge.common.EnumPlantType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.