package net.geforcemods.securitycraft.blocks; import java.util.Random; import cpw.mods.fml.relauncher.ReflectionHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.geforcemods.securitycraft.tileentity.TileEntityOwnable; import net.minecraft.block.Block; import net.minecraft.block.BlockPane; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class BlockReinforcedGlassPane extends BlockPane implements ITileEntityProvider { public BlockReinforcedGlassPane(String par2Str, String par3Str, Material par4Material, boolean par5) { super(par2Str, par3Str, par4Material, par5); ReflectionHelper.setPrivateValue(Block.class, this, true, 25); } /** * Called whenever the block is added into the world. Args: world, x, y, z */ public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) { super.onBlockAdded(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_); } public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); p_149749_1_.removeTileEntity(p_149749_2_, p_149749_3_, p_149749_4_); } public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_) { super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_); TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_); return tileentity != null ? tileentity.receiveClientEvent(p_149696_5_, p_149696_6_) : false; } @SideOnly(Side.CLIENT) public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { return Item.getItemFromBlock(this); } @SideOnly(Side.CLIENT) /** * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) */ public Item getItemDropped(int par1, Random par2Random, int par3) { return Item.getItemFromBlock(this); } @Override public int quantityDropped(Random random) { return 1; } public TileEntity createNewTileEntity(World var1, int var2) { return new TileEntityOwnable(); } }