public void notifyPlayerOfProgression(EntityPlayer ep, ProgressElement p) { if (ep.worldObj.isRemote) { ChromaOverlays.instance.addProgressionNote(p); ReikaSoundHelper.playClientSound(ChromaSounds.GAINPROGRESS, ep, 1, 1); } else if (ep instanceof EntityPlayerMP) { ReikaPacketHelper.sendDataPacket( ChromatiCraft.packetChannel, ChromaPackets.PROGRESSNOTE.ordinal(), (EntityPlayerMP) ep, this.getID(p)); if (ChromaOptions.PROGRESSNOTIFY.getState()) { if (ChromaOptions.PROGRESSNOTIFY_SELF.getState()) ChromaAux.notifyServerPlayers(ep, p); else ChromaAux.notifyServerPlayersExcept(ep, p); } } }
@Override public final void keyTyped(char c, int key) { super.keyTyped(c, key); if (ModList.NEI.isLoaded() && key == NEIClientConfig.getKeyBinding("gui.recipe")) { int x = ReikaGuiAPI.instance.getMouseRealX(); int y = ReikaGuiAPI.instance.getMouseRealY(); int j = (width - xSize) / 2; int k = (height - ySize) / 2; if (x >= j && y >= k && x < j + xSize && y < k + ySize) { ItemStack is = ReikaGuiAPI.instance.getItemRenderAt(x, y); if (is != null) { ReikaSoundHelper.playClientSound(ChromaSounds.GUICLICK, player, 0.33F, 1); if (!MinecraftForge.EVENT_BUS.post(new NEIRecipeCheckEvent(null, is))) codechicken.nei.recipe.GuiCraftingRecipe.openRecipeGui("item", is); } } } }
@Override protected void mouseClicked(int x, int y, int button) { super.mouseClicked(x, y, button); int j = (width - xSize) / 2; int k = (height - ySize) / 2; int minx = 120; int miny = 24; int w = 36; int maxx = minx + w; int maxy = miny + w; if (mode == AspectMode.DEMAND) { if (api.isMouseInBox(j + minx, j + maxx, k + miny, k + maxy)) { // Minecraft.getMinecraft().thePlayer.playSound("random.click", 1, 1); ReikaSoundHelper.playClientSound(ChromaSounds.GUICLICK, player, 1, 1); clickDelay = 90; ReikaPacketHelper.sendStringPacket( ChromatiCraft.packetChannel, ChromaPackets.ASPECT.ordinal(), this.getActive().getTag(), tile); } } }