use of pneumaticCraft.client.gui.GuiGPSTool in project PneumaticCraft by MineMaarten.
the class ItemGPSTool method onItemRightClick.
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if (world.isRemote) {
ChunkPosition pos = getGPSLocation(stack);
FMLCommonHandler.instance().showGuiScreen(new GuiGPSTool(pos != null ? pos : new ChunkPosition(0, 0, 0), getVariable(stack)));
}
return stack;
}
Aggregations