@Override public boolean canSustainPlant(@Nonnull IBlockState state, @Nonnull IBlockAccess world, BlockPos pos, @Nonnull EnumFacing direction, IPlantable plantable) { // can sustain both slimeplants and normal plants return plantable.getPlantType(world, pos) == TinkerWorld.slimePlantType || plantable.getPlantType(world, pos) == EnumPlantType.Plains; }
@Override public boolean canSustainPlant(@Nonnull IBlockState state, @Nonnull IBlockAccess world, BlockPos pos, @Nonnull EnumFacing direction, IPlantable plantable) { // can sustain both slimeplants and normal plants return plantable.getPlantType(world, pos) == TinkerWorld.slimePlantType || plantable.getPlantType(world, pos) == EnumPlantType.Plains; }
@Override public boolean canSustainPlant(@Nonnull IBlockState state, @Nonnull IBlockAccess world, BlockPos pos, @Nonnull EnumFacing direction, IPlantable plantable) { EnumPlantType type = plantable.getPlantType(world, pos.down()); return type == EnumPlantType.Plains || type == EnumPlantType.Beach; }
@Override public boolean canSustainPlant(@Nonnull IBlockState state, @Nonnull IBlockAccess world, BlockPos pos, @Nonnull EnumFacing direction, IPlantable plantable) { SoilTypes type = world.getBlockState(pos).getValue(TYPE); if(type == SoilTypes.SLIMY_MUD_GREEN || type == SoilTypes.SLIMY_MUD_BLUE) { // can sustain slimeplants return plantable.getPlantType(world, pos) == TinkerWorld.slimePlantType; } return super.canSustainPlant(state, world, pos, direction, plantable); }
@Override public boolean canSustainPlant(@Nonnull IBlockState state, @Nonnull IBlockAccess world, BlockPos pos, @Nonnull EnumFacing direction, IPlantable plantable) { return plantable.getPlantType(world, pos.down()) == EnumPlantType.Plains; }
@Override public boolean canSustainPlant(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing direction, IPlantable plantable) { EnumPlantType plantType = plantable.getPlantType(world, pos); return plantType == EnumPlantType.Crop || plantType == EnumPlantType.Plains; }
private boolean canHarvest(World world, BlockPos pos, IBlockState state) { Block block = state.getBlock(); if(block instanceof IPlantable) { IPlantable plant = (IPlantable) block; EnumPlantType type = plant.getPlantType(world, pos); return type != EnumPlantType.Water && type != EnumPlantType.Desert; } return false; }
@Override public boolean canSustainPlant(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing direction, net.minecraftforge.common.IPlantable plantable) { EnumPlantType plantType = plantable.getPlantType(world, pos.up()); if (plantType == EnumPlantType.Nether) { return true; } return super.canSustainPlant(state, world, pos, direction, plantable); }
@Override public boolean canSustainPlant(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing direction, IPlantable plantable) { EnumPlantType plantType = plantable.getPlantType(world, pos.offset(direction)); if (plantType == EnumPlantType.Plains) { return true; } return super.canSustainPlant(state, world, pos, direction, plantable); }
@Override protected boolean isFarmable(Block block, BlockPos farmablePos) { if (super.isFarmable(block, farmablePos)) { return ((IPlantable) block).getPlantType(world, farmablePos) == EnumPlantType.Crop; } return block instanceof BlockCrops || block instanceof BlockStem; }
@Override public boolean canSustainPlant(@Nonnull IBlockState state, @Nonnull IBlockAccess world, BlockPos pos, @Nonnull EnumFacing direction, IPlantable plantable) { return plantable.getPlantType(world, pos.up()) == EnumPlantType.Plains; }
@Override public boolean canSustainPlant(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing direction, IPlantable plantable) { return plantable instanceof BlockBush || plantable.getPlantType(world, pos).equals(VReference.VAMPIRE_PLANT_TYPE); }
EnumPlantType type = plantable.getPlantType(farm.getWorld(), bc); if (type == null) { return false;
@Override public boolean canSustainPlant(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing direction, IPlantable plantable) EnumPlantType plantType = plantable.getPlantType(world, pos.offset(direction));