63 lines
1.7 KiB
Java
63 lines
1.7 KiB
Java
package biomesoplenty.blocks;
|
|
|
|
import static net.minecraftforge.common.ForgeDirection.UP;
|
|
|
|
import java.util.Random;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.client.renderer.texture.IconRegister;
|
|
import net.minecraft.entity.Entity;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.entity.player.InventoryPlayer;
|
|
import net.minecraft.util.AxisAlignedBB;
|
|
import net.minecraft.world.IBlockAccess;
|
|
import net.minecraft.world.World;
|
|
import net.minecraftforge.common.ForgeDirection;
|
|
import biomesoplenty.BiomesOPlenty;
|
|
import biomesoplenty.api.Blocks;
|
|
import biomesoplenty.api.Fluids;
|
|
import biomesoplenty.api.Items;
|
|
import biomesoplenty.entities.EntityWasp;
|
|
|
|
public class BlockHoney extends Block
|
|
{
|
|
public BlockHoney(int par1)
|
|
{
|
|
super(par1, Material.glass);
|
|
this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
|
|
}
|
|
|
|
@Override
|
|
public void registerIcons(IconRegister par1IconRegister)
|
|
{
|
|
blockIcon = par1IconRegister.registerIcon("biomesoplenty:honeyblock");
|
|
}
|
|
|
|
@Override
|
|
public void breakBlock(World world, int x, int y, int z, int par5, int par6)
|
|
{
|
|
world.setBlock(x, y, z, Fluids.honey.get().blockID, 7, 2);
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public int getRenderBlockPass()
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
@Override
|
|
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
|
{
|
|
return super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, 1 - par5);
|
|
}
|
|
|
|
@Override
|
|
public boolean isOpaqueCube()
|
|
{
|
|
return false;
|
|
}
|
|
}
|