@Override
public boolean onItemUseFirst(ItemStack itemStack, EntityPlayer entityPlayer, World worldObj, int x, int y, int z, int side, float var8, float var9, float var10) {
if (worldObj.isRemote)
return super.onItemUseFirst(itemStack, entityPlayer, worldObj, x, y, z, side, var8, var9, var10);
Pipe pipe = BlockGenericPipe.getPipe(worldObj, x, y, z);
if (BlockGenericPipe.isValid(pipe)) {
if (pipe.hasGate()) {
if (itemStack.stackTagCompound == null)
itemStack.stackTagCompound = new NBTTagCompound();
if (entityPlayer.isSneaking() && itemStack.stackTagCompound.hasKey("GateSettings")) {
// apply settings to gate