@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()) { gui.playSound(Reference.MOD_ID + ":" + "gui.biotic_stat_unlock", 1, 1); MatterOverdrive.packetPipeline.sendToServer( new PacketUnlockBioticStat(stat.getUnlocalizedName(), ++level)); } } super.onAction(mouseX, mouseY, mouseButton); }
protected void ApplyColor() { if (stat.canBeUnlocked(player, level) || player.isUnlocked(stat, level)) { if (level <= 0) { RenderUtils.applyColorWithMultipy(Reference.COLOR_HOLO, 0.5f); } else { RenderUtils.applyColor(Reference.COLOR_HOLO); } } else { RenderUtils.applyColorWithMultipy(Reference.COLOR_HOLO_RED, 0.5f); } }