blob: e3ee958e01f9f86e222e1b12f4060d16a1436b0c [file] [log] [blame] [raw]
package com.legacy.aether.blocks.natural;
import net.minecraft.block.Block;
import net.minecraft.block.BlockBush;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import com.legacy.aether.CommonProxy;
import com.legacy.aether.blocks.BlocksAether;
public class BlockAetherFlower extends BlockBush {
public AxisAlignedBB FLOWER_AABB = AxisAlignedBB.getBoundingBox(0.30000001192092896D, 0.0D, 0.30000001192092896D, 0.699999988079071D, 0.6000000238418579D, 0.699999988079071D);
public BlockAetherFlower() {
this.setHardness(0.0F);
this.setTickRandomly(true);
this.setStepSound(soundTypeGrass);
this.setBlockBounds(0.5F - 0.2F, 0.0F, 0.5F - 0.2F, 0.5F + 0.2F, 0.2F * 3.0F, 0.5F + 0.2F);
}
@Override
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
Block soil = world.getBlock(x, y - 1, z);
return soil == BlocksAether.aether_grass || soil == BlocksAether.aether_dirt || soil == BlocksAether.enchanted_aether_grass;
}
@Override
public boolean canBlockStay(World world, int x, int y, int z) {
Block soil = world.getBlock(x, y - 1, z);
return (soil != null && this.canPlaceBlockAt(world, x, y, z));
}
@Override
public int getRenderType() {
return CommonProxy.aetherFlowerRenderID;
}
}