use of com.miningmark48.pearcelmod.gui.manual.GuiManual in project Pearcel-Mod by MiningMark48.
the class KeyHandler method onEvent.
@SideOnly(Side.CLIENT)
@SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true)
public void onEvent(TickEvent.PlayerTickEvent event) {
if (event.side == Side.SERVER) {
return;
}
if (event.phase == TickEvent.Phase.START) {
Minecraft mc = Minecraft.getMinecraft();
EntityPlayer player = event.player;
World world = player.getEntityWorld();
int x = (int) event.player.posX;
int y = (int) event.player.posY;
int z = (int) event.player.posZ;
//PCP GUI
if (item_pcp.isPressed()) {
if (player.inventory.hasItemStack(new ItemStack(ModItems.pcp))) {
player.sendMessage(new TextComponentString("This is a WIP, Coming Soon™!"));
//player.openGui(PearcelMod.instance, GUIs.gui_id_pcp, world, x, y, z);
}
}
//PEPC GUI
if (item_pepc.isPressed()) {
if (player.inventory.hasItemStack(new ItemStack(ModItems.pepc))) {
player.sendMessage(new TextComponentString("This is a WIP, Coming Soon™!"));
//player.displayGUIChest(player.getInventoryEnderChest());
}
}
//Manual Gui
if (gui_manual.isPressed()) {
if (player.inventory.hasItemStack(new ItemStack(ModItems.pearcel_manual))) {
Minecraft.getMinecraft().displayGuiScreen(new GuiManual(0));
}
}
}
}
Aggregations