@Override public boolean canPlaceBlockAt(World worldIn, BlockPos pos) { return super.canPlaceBlockAt(worldIn, pos) && this.canBlockStay(worldIn, pos, this.getDefaultState()); }
@Override public boolean canPlaceBlockAt(World worldIn, BlockPos pos) { IBlockState state = worldIn.getBlockState(pos.down()); return super.canPlaceBlockAt(worldIn, pos) && state.getBlock() == Blocks.WATER; }
@Override public boolean canPlaceBlockAt(World worldIn, BlockPos pos) { return super.canPlaceBlockAt(worldIn, pos) || BotanyCore.getGardening().isSoil(worldIn.getBlockState(pos).getBlock()); }
@Override public boolean canPlaceBlockAt(World worldIn, BlockPos pos) { IBlockState soil = worldIn.getBlockState(pos.down()); return type != 3 ? super.canPlaceBlockAt(worldIn, pos) && soil.getBlock().canSustainPlant(soil, worldIn, pos.down(), net.minecraft.util.EnumFacing.UP, this) : soil.getBlock() == Calculator.material_block && soil.getValue(MaterialBlock.VARIANTS) == Variants.END_DIAMOND; }
@Override public void onLivingUpdate() { if (getEntityWorld().isRemote) Erebus.PROXY.spawnCustomParticle("spores", getEntityWorld(), posX + (rand.nextDouble() - 0.5D) * width, posY + rand.nextDouble() * height - 0.25D, posZ + (rand.nextDouble() - 0.5D) * width, 1.0D + rand.nextDouble(), 1.0D + rand.nextDouble(), 1.0D + rand.nextDouble()); if (!getEntityWorld().isRemote) { if (rand.nextInt(200) == 0) { if (getEntityWorld().isAirBlock(getPosition()) && getEntityWorld().getBiome(getPosition()) == ModBiomes.FUNGAL_FOREST && Blocks.BROWN_MUSHROOM.canPlaceBlockAt(getEntityWorld(), getPosition())) { int mush = rand.nextInt(3); if (mush == 0) getEntityWorld().setBlockState(getPosition(), Blocks.BROWN_MUSHROOM.getDefaultState()); if (mush == 1) getEntityWorld().setBlockState(getPosition(), Blocks.RED_MUSHROOM.getDefaultState()); else getEntityWorld().setBlockState(getPosition(), BiomeDecoratorFungalForest.MUSHROOMS[rand.nextInt(BiomeDecoratorFungalForest.MUSHROOMS.length)].getDefaultState(), 3); } } } super.onLivingUpdate(); }
@Override public boolean canPlaceBlockAt(World world, BlockPos pos) { return world.getBlockState(pos.down()).getBlock() == Blocks.SAND && world.isAirBlock(pos.up()) ? true : super.canPlaceBlockAt(world, pos) && world.isAirBlock(pos.up()); }