Search in sources :

Example 1 with GuiGPSTool

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;
}
Also used : ChunkPosition(net.minecraft.world.ChunkPosition) GuiGPSTool(pneumaticCraft.client.gui.GuiGPSTool)

Aggregations

ChunkPosition (net.minecraft.world.ChunkPosition)1 GuiGPSTool (pneumaticCraft.client.gui.GuiGPSTool)1