public void drawForeground(int x, int y) { if (stat.maxLevel() > 1 && level > 0) { String levelInfo = Integer.toString(level); ClientProxy.holoIcons.renderIcon("black_circle", posX + 14, posY + 14, 10, 10); getFontRenderer().drawString(levelInfo, posX + 16, posY + 16, 0xFFFFFF); } }
@Override public boolean isEnabled() { if (stat.canBeUnlocked(player, level)) { if (player.getUnlockedLevel(stat) < stat.maxLevel()) { return true; } } return false; }
@Override public void onAction(int mouseX, int mouseY, int mouseButton) { if (super.intersectsWith(mouseX, mouseY)) { if (stat.canBeUnlocked(player, level + 1) && level < stat.maxLevel()) { GuiBase.playSound(Reference.MOD_ID + ":" + "gui.biotic_stat_unlock", 1, 1); MatterOverdrive.packetPipeline.sendToServer( new PacketUnlockBioticStat(stat.getUnlocalizedName(), ++level)); } } super.onAction(mouseX, mouseY, mouseButton); }