Search in sources :

Example 1 with IMagicState

use of uk.co.wehavecookies56.kk.common.capability.MagicStateCapability.IMagicState in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class SyncMagicData method process.

@Override
public void process(EntityPlayer player, Side side) {
    final IMagicState state = player.getCapability(ModCapabilities.MAGIC_STATE, null);
    final PlayerStatsCapability.IPlayerStats stats = player.getCapability(ModCapabilities.PLAYER_STATS, null);
    state.setMagicLevel(Strings.Spell_Fire, fireLevel);
    state.setMagicLevel(Strings.Spell_Blizzard, blizzardLevel);
    state.setMagicLevel(Strings.Spell_Thunder, thunderLevel);
    state.setMagicLevel(Strings.Spell_Cure, cureLevel);
    state.setMagicLevel(Strings.Spell_Aero, aeroLevel);
    state.setMagicLevel(Strings.Spell_Stop, stopLevel);
    stats.setMP(mp);
}
Also used : IMagicState(uk.co.wehavecookies56.kk.common.capability.MagicStateCapability.IMagicState) PlayerStatsCapability(uk.co.wehavecookies56.kk.common.capability.PlayerStatsCapability)

Example 2 with IMagicState

use of uk.co.wehavecookies56.kk.common.capability.MagicStateCapability.IMagicState in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class CapabilityEvents method onEntityConstructing.

@SubscribeEvent
public void onEntityConstructing(AttachCapabilitiesEvent<Entity> event) {
    if (event.getObject() instanceof EntityPlayer) {
        event.addCapability(new ResourceLocation(Reference.MODID, "IOrganizationXIII"), new ICapabilitySerializable<NBTTagCompound>() {

            OrganizationXIIICapability.IOrganizationXIII inst = ModCapabilities.ORGANIZATION_XIII.getDefaultInstance();

            @Override
            public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing) {
                return capability == ModCapabilities.ORGANIZATION_XIII;
            }

            @Override
            public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing) {
                return capability == ModCapabilities.ORGANIZATION_XIII ? (T) inst : null;
            }

            @Override
            public NBTTagCompound serializeNBT() {
                return (NBTTagCompound) ModCapabilities.ORGANIZATION_XIII.getStorage().writeNBT(ModCapabilities.ORGANIZATION_XIII, inst, null);
            }

            @Override
            public void deserializeNBT(NBTTagCompound nbt) {
                ModCapabilities.ORGANIZATION_XIII.getStorage().readNBT(ModCapabilities.ORGANIZATION_XIII, inst, null, nbt);
            }
        });
        event.addCapability(new ResourceLocation(Reference.MODID, "IMunny"), new ICapabilitySerializable<NBTPrimitive>() {

            MunnyCapability.IMunny inst = ModCapabilities.MUNNY.getDefaultInstance();

            @Override
            public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
                return capability == ModCapabilities.MUNNY;
            }

            @SuppressWarnings("unchecked")
            @Override
            public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
                return capability == ModCapabilities.MUNNY ? (T) inst : null;
            }

            @Override
            public NBTPrimitive serializeNBT() {
                return (NBTPrimitive) ModCapabilities.MUNNY.getStorage().writeNBT(ModCapabilities.MUNNY, inst, null);
            }

            @Override
            public void deserializeNBT(NBTPrimitive nbt) {
                ModCapabilities.MUNNY.getStorage().readNBT(ModCapabilities.MUNNY, inst, null, nbt);
            }
        });
        event.addCapability(new ResourceLocation(Reference.MODID, "ICheatMode"), new ICapabilitySerializable<NBTPrimitive>() {

            CheatModeCapability.ICheatMode inst = ModCapabilities.CHEAT_MODE.getDefaultInstance();

            @Override
            public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
                return capability == ModCapabilities.CHEAT_MODE;
            }

            @SuppressWarnings("unchecked")
            @Override
            public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
                return capability == ModCapabilities.CHEAT_MODE ? (T) inst : null;
            }

            @Override
            public NBTPrimitive serializeNBT() {
                return (NBTPrimitive) ModCapabilities.CHEAT_MODE.getStorage().writeNBT(ModCapabilities.CHEAT_MODE, inst, null);
            }

            @Override
            public void deserializeNBT(NBTPrimitive nbt) {
                ModCapabilities.CHEAT_MODE.getStorage().readNBT(ModCapabilities.CHEAT_MODE, inst, null, nbt);
            }
        });
        event.addCapability(new ResourceLocation(Reference.MODID, "IPlayerStats"), new ICapabilitySerializable<NBTTagCompound>() {

            PlayerStatsCapability.IPlayerStats inst = ModCapabilities.PLAYER_STATS.getDefaultInstance();

            @Override
            public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
                return capability == ModCapabilities.PLAYER_STATS;
            }

            @SuppressWarnings("unchecked")
            @Override
            public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
                return capability == ModCapabilities.PLAYER_STATS ? (T) inst : null;
            }

            @Override
            public NBTTagCompound serializeNBT() {
                return (NBTTagCompound) ModCapabilities.PLAYER_STATS.getStorage().writeNBT(ModCapabilities.PLAYER_STATS, inst, null);
            }

            @Override
            public void deserializeNBT(NBTTagCompound nbt) {
                ModCapabilities.PLAYER_STATS.getStorage().readNBT(ModCapabilities.PLAYER_STATS, inst, null, nbt);
            }
        });
        event.addCapability(new ResourceLocation(Reference.MODID, "ISummonKeyblade"), new ICapabilitySerializable<NBTTagCompound>() {

            SummonKeybladeCapability.ISummonKeyblade inst = ModCapabilities.SUMMON_KEYBLADE.getDefaultInstance();

            @Override
            public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
                return capability == ModCapabilities.SUMMON_KEYBLADE;
            }

            @SuppressWarnings("unchecked")
            @Override
            public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
                return capability == ModCapabilities.SUMMON_KEYBLADE ? (T) inst : null;
            }

            @Override
            public NBTTagCompound serializeNBT() {
                return (NBTTagCompound) ModCapabilities.SUMMON_KEYBLADE.getStorage().writeNBT(ModCapabilities.SUMMON_KEYBLADE, inst, null);
            }

            @Override
            public void deserializeNBT(NBTTagCompound nbt) {
                ModCapabilities.SUMMON_KEYBLADE.getStorage().readNBT(ModCapabilities.SUMMON_KEYBLADE, inst, null, nbt);
            }
        });
        event.addCapability(new ResourceLocation(Reference.MODID, "IMagicState"), new ICapabilitySerializable<NBTTagCompound>() {

            MagicStateCapability.IMagicState inst = ModCapabilities.MAGIC_STATE.getDefaultInstance();

            @Override
            public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
                return capability == ModCapabilities.MAGIC_STATE;
            }

            @SuppressWarnings("unchecked")
            @Override
            public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
                return capability == ModCapabilities.MAGIC_STATE ? (T) inst : null;
            }

            @Override
            public NBTTagCompound serializeNBT() {
                return (NBTTagCompound) ModCapabilities.MAGIC_STATE.getStorage().writeNBT(ModCapabilities.MAGIC_STATE, inst, null);
            }

            @Override
            public void deserializeNBT(NBTTagCompound nbt) {
                ModCapabilities.MAGIC_STATE.getStorage().readNBT(ModCapabilities.MAGIC_STATE, inst, null, nbt);
            }
        });
        event.addCapability(new ResourceLocation(Reference.MODID, "IDriveState"), new ICapabilitySerializable<NBTTagCompound>() {

            DriveStateCapability.IDriveState inst = ModCapabilities.DRIVE_STATE.getDefaultInstance();

            @Override
            public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
                return capability == ModCapabilities.DRIVE_STATE;
            }

            @SuppressWarnings("unchecked")
            @Override
            public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
                return capability == ModCapabilities.DRIVE_STATE ? (T) inst : null;
            }

            @Override
            public NBTTagCompound serializeNBT() {
                return (NBTTagCompound) ModCapabilities.DRIVE_STATE.getStorage().writeNBT(ModCapabilities.DRIVE_STATE, inst, null);
            }

            @Override
            public void deserializeNBT(NBTTagCompound nbt) {
                ModCapabilities.DRIVE_STATE.getStorage().readNBT(ModCapabilities.DRIVE_STATE, inst, null, nbt);
            }
        });
        event.addCapability(new ResourceLocation(Reference.MODID, "IFirstTimeJoin"), new ICapabilitySerializable<NBTTagCompound>() {

            FirstTimeJoinCapability.IFirstTimeJoin inst = ModCapabilities.FIRST_TIME_JOIN.getDefaultInstance();

            @Override
            public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
                return capability == ModCapabilities.FIRST_TIME_JOIN;
            }

            @SuppressWarnings("unchecked")
            @Override
            public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
                return capability == ModCapabilities.FIRST_TIME_JOIN ? (T) inst : null;
            }

            @Override
            public NBTTagCompound serializeNBT() {
                return (NBTTagCompound) ModCapabilities.FIRST_TIME_JOIN.getStorage().writeNBT(ModCapabilities.FIRST_TIME_JOIN, inst, null);
            }

            @Override
            public void deserializeNBT(NBTTagCompound nbt) {
                ModCapabilities.FIRST_TIME_JOIN.getStorage().readNBT(ModCapabilities.FIRST_TIME_JOIN, inst, null, nbt);
            }
        });
        event.addCapability(new ResourceLocation(Reference.MODID, "ISynthesisRecipe"), new ICapabilitySerializable<NBTTagCompound>() {

            SynthesisRecipeCapability.ISynthesisRecipe inst = ModCapabilities.SYNTHESIS_RECIPES.getDefaultInstance();

            @Override
            public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
                return capability == ModCapabilities.SYNTHESIS_RECIPES;
            }

            @SuppressWarnings("unchecked")
            @Override
            public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
                return capability == ModCapabilities.SYNTHESIS_RECIPES ? (T) inst : null;
            }

            @Override
            public NBTTagCompound serializeNBT() {
                return (NBTTagCompound) ModCapabilities.SYNTHESIS_RECIPES.getStorage().writeNBT(ModCapabilities.SYNTHESIS_RECIPES, inst, null);
            }

            @Override
            public void deserializeNBT(NBTTagCompound nbt) {
                ModCapabilities.SYNTHESIS_RECIPES.getStorage().readNBT(ModCapabilities.SYNTHESIS_RECIPES, inst, null, nbt);
            }
        });
        event.addCapability(new ResourceLocation(Reference.MODID, "ISynthesisMaterial"), new ICapabilitySerializable<NBTTagCompound>() {

            SynthesisMaterialCapability.ISynthesisMaterial inst = ModCapabilities.SYNTHESIS_MATERIALS.getDefaultInstance();

            @Override
            public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
                return capability == ModCapabilities.SYNTHESIS_MATERIALS;
            }

            @SuppressWarnings("unchecked")
            @Override
            public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
                return capability == ModCapabilities.SYNTHESIS_MATERIALS ? (T) inst : null;
            }

            @Override
            public NBTTagCompound serializeNBT() {
                return (NBTTagCompound) ModCapabilities.SYNTHESIS_MATERIALS.getStorage().writeNBT(ModCapabilities.SYNTHESIS_MATERIALS, inst, null);
            }

            @Override
            public void deserializeNBT(NBTTagCompound nbt) {
                ModCapabilities.SYNTHESIS_MATERIALS.getStorage().readNBT(ModCapabilities.SYNTHESIS_MATERIALS, inst, null, nbt);
            }
        });
    }
}
Also used : EnumFacing(net.minecraft.util.EnumFacing) NBTTagCompound(net.minecraft.nbt.NBTTagCompound) SynthesisRecipeCapability(uk.co.wehavecookies56.kk.common.capability.SynthesisRecipeCapability) ResourceLocation(net.minecraft.util.ResourceLocation) DriveStateCapability(uk.co.wehavecookies56.kk.common.capability.DriveStateCapability) MunnyCapability(uk.co.wehavecookies56.kk.common.capability.MunnyCapability) MagicStateCapability(uk.co.wehavecookies56.kk.common.capability.MagicStateCapability) OrganizationXIIICapability(uk.co.wehavecookies56.kk.common.capability.OrganizationXIIICapability) NBTPrimitive(net.minecraft.nbt.NBTPrimitive) SynthesisMaterialCapability(uk.co.wehavecookies56.kk.common.capability.SynthesisMaterialCapability) SummonKeybladeCapability(uk.co.wehavecookies56.kk.common.capability.SummonKeybladeCapability) FirstTimeJoinCapability(uk.co.wehavecookies56.kk.common.capability.FirstTimeJoinCapability) PlayerStatsCapability(uk.co.wehavecookies56.kk.common.capability.PlayerStatsCapability) EntityPlayer(net.minecraft.entity.player.EntityPlayer) CheatModeCapability(uk.co.wehavecookies56.kk.common.capability.CheatModeCapability) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Example 3 with IMagicState

use of uk.co.wehavecookies56.kk.common.capability.MagicStateCapability.IMagicState in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class GuiMenu_Status method drawScreen.

@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
    super.drawScreen(mouseX, mouseY, partialTicks);
    final PlayerStatsCapability.IPlayerStats STATS = mc.player.getCapability(ModCapabilities.PLAYER_STATS, null);
    IMagicState MAGIC = mc.player.getCapability(ModCapabilities.MAGIC_STATE, null);
    IDriveState DRIVE = mc.player.getCapability(ModCapabilities.DRIVE_STATE, null);
    // System.out.println(ds.getDriveLevel(Strings.Form_Valor)+" "+ds.getDriveLevel(Strings.Form_Wisdom)+" "+ds.getDriveLevel(Strings.Form_Limit)+" "+ds.getDriveLevel(Strings.Form_Master)+" "+ds.getDriveLevel(Strings.Form_Final));
    int[] valorCosts = DriveFormRegistry.get(Strings.Form_Valor).getExpCosts();
    int[] wisdomCosts = DriveFormRegistry.get(Strings.Form_Wisdom).getExpCosts();
    int[] limitCosts = DriveFormRegistry.get(Strings.Form_Limit).getExpCosts();
    int[] masterCosts = DriveFormRegistry.get(Strings.Form_Master).getExpCosts();
    int[] finalCosts = DriveFormRegistry.get(Strings.Form_Final).getExpCosts();
    int remainingExp;
    switch(selected) {
        case STATS_PLAYER:
            drawRect(125, ((-140 / 16) + 75) + 10, 200, ((-140 / 16) + 75) + 20, 0xFFFFFF);
            drawString(fontRenderer, "Level", 125, ((-140 / 16) + 75) + 10, 0xFFFFFF);
            drawString(fontRenderer, "Total Experience", 125, ((-140 / 16) + 75) + 22, 0xFFFFFF);
            drawString(fontRenderer, "Next Level", 125, ((-140 / 16) + 75) + 34, 0xFFFFFF);
            drawString(fontRenderer, "HP", 125, ((-140 / 16) + 75) + 46, 0xFFFFFF);
            drawString(fontRenderer, "MP", 125, ((-140 / 16) + 75) + 58, 0xFFFFFF);
            drawString(fontRenderer, "AP", 125, ((-140 / 16) + 75) + 70, 0xFFFFFF);
            drawString(fontRenderer, "Drive Gauge", 125, ((-140 / 16) + 75) + 82, 0xFFFFFF);
            drawString(fontRenderer, "Bonus Level", 125, ((-140 / 16) + 75) + 94, 0xFFFFFF);
            drawString(fontRenderer, "Strength", 125, ((-140 / 16) + 75) + 106, 0xFFFFFF);
            drawString(fontRenderer, "Magic", 125, ((-140 / 16) + 75) + 118, 0xFFFFFF);
            drawString(fontRenderer, "Defense", 125, ((-140 / 16) + 75) + 130, 0xFFFFFF);
            drawString(fontRenderer, "Fire Resistance", 125, ((-140 / 16) + 75) + 142, 0xFFFFFF);
            drawString(fontRenderer, "Blizzard Resistance", 125, ((-140 / 16) + 75) + 154, 0xFFFFFF);
            drawString(fontRenderer, "Thunder Resistance", 125, ((-140 / 16) + 75) + 166, 0xFFFFFF);
            drawString(fontRenderer, "Dark Resistance", 125, ((-140 / 16) + 75) + 178, 0xFFFFFF);
            drawString(fontRenderer, "Fire level", 270, ((-140 / 16) + 75) + 10, 0xFFFFFF);
            drawString(fontRenderer, "Blizzard level", 270, ((-140 / 16) + 75) + 22, 0xFFFFFF);
            drawString(fontRenderer, "Thunder level", 270, ((-140 / 16) + 75) + 34, 0xFFFFFF);
            drawString(fontRenderer, "Cure level", 270, ((-140 / 16) + 75) + 46, 0xFFFFFF);
            drawString(fontRenderer, "Gravity level", 270, ((-140 / 16) + 75) + 58, 0xFFFFFF);
            drawString(fontRenderer, "Aero level", 270, ((-140 / 16) + 75) + 70, 0xFFFFFF);
            drawString(fontRenderer, "Stop level", 270, ((-140 / 16) + 75) + 82, 0xFFFFFF);
            drawString(fontRenderer, "" + STATS.getLevel(), 230, ((-140 / 16) + 75) + 10, 0xFFD900);
            drawString(fontRenderer, "" + STATS.getExperience(), 230, ((-140 / 16) + 75) + 22, 0xFFD900);
            drawString(fontRenderer, "" + (STATS.getExpNeeded(STATS.getLevel(), STATS.getExperience())), 230, ((-140 / 16) + 75) + 34, 0xFFD900);
            drawString(fontRenderer, "" + (int) mc.player.getMaxHealth(), 230, ((-140 / 16) + 75) + 46, 0xFFD900);
            drawString(fontRenderer, "" + (int) STATS.getMaxMP(), 230, ((-140 / 16) + 75) + 58, 0xFFD900);
            drawString(fontRenderer, "N/A", 230, ((-140 / 16) + 75) + 70, 0xFFD900);
            drawString(fontRenderer, "" + DRIVE.getDriveGaugeLevel(), 230, ((-140 / 16) + 75) + 82, 0xFFD900);
            drawString(fontRenderer, "N/A", 230, ((-140 / 16) + 75) + 94, 0xFFD900);
            drawString(fontRenderer, "" + STATS.getStrength(), 230, ((-140 / 16) + 75) + 106, 0xFFD900);
            drawString(fontRenderer, "" + STATS.getMagic(), 230, ((-140 / 16) + 75) + 118, 0xFFD900);
            drawString(fontRenderer, "" + STATS.getDefense(), 230, ((-140 / 16) + 75) + 130, 0xFFD900);
            drawString(fontRenderer, "0%", 230, ((-140 / 16) + 75) + 142, 0xFFD900);
            drawString(fontRenderer, "0%", 230, ((-140 / 16) + 75) + 154, 0xFFD900);
            drawString(fontRenderer, "0%", 230, ((-140 / 16) + 75) + 166, 0xFFD900);
            drawString(fontRenderer, "0%", 230, ((-140 / 16) + 75) + 178, 0xFFD900);
            drawString(fontRenderer, "" + MAGIC.getMagicLevel(Strings.Spell_Fire), 370, ((-140 / 16) + 75) + 10, 0xFFD900);
            drawString(fontRenderer, "" + MAGIC.getMagicLevel(Strings.Spell_Blizzard), 370, ((-140 / 16) + 75) + 22, 0xFFD900);
            drawString(fontRenderer, "" + MAGIC.getMagicLevel(Strings.Spell_Thunder), 370, ((-140 / 16) + 75) + 34, 0xFFD900);
            drawString(fontRenderer, "" + MAGIC.getMagicLevel(Strings.Spell_Cure), 370, ((-140 / 16) + 75) + 46, 0xFFD900);
            drawString(fontRenderer, "" + MAGIC.getMagicLevel(Strings.Spell_Gravity), 370, ((-140 / 16) + 75) + 58, 0xFFD900);
            drawString(fontRenderer, "" + MAGIC.getMagicLevel(Strings.Spell_Aero), 370, ((-140 / 16) + 75) + 70, 0xFFD900);
            drawString(fontRenderer, "" + MAGIC.getMagicLevel(Strings.Spell_Stop), 370, ((-140 / 16) + 75) + 82, 0xFFD900);
            break;
        case STATS_VALOR:
            remainingExp = DRIVE.getDriveLevel(Strings.Form_Valor) == 7 ? 0 : valorCosts[DRIVE.getDriveLevel(Strings.Form_Valor)] - DRIVE.getDriveExp(Strings.Form_Valor);
            drawRect(125, ((-140 / 16) + 75) + 10, 200, ((-140 / 16) + 75) + 20, 0xFFFFFF);
            drawString(fontRenderer, "Level", 125, ((-140 / 16) + 75) + 10, 0xFFFFFF);
            drawString(fontRenderer, "Experience", 125, ((-140 / 16) + 75) + 22, 0xFFFFFF);
            drawString(fontRenderer, "Next Level", 125, ((-140 / 16) + 75) + 34, 0xFFFFFF);
            drawString(fontRenderer, "Form Gauge", 125, ((-140 / 16) + 75) + 46, 0xFFFFFF);
            drawString(fontRenderer, "" + DRIVE.getDriveLevel(Strings.Form_Valor), 230, ((-140 / 16) + 75) + 10, 0xFFD900);
            drawString(fontRenderer, "" + DRIVE.getDriveExp(Strings.Form_Valor), 230, ((-140 / 16) + 75) + 22, 0xFFD900);
            drawString(fontRenderer, "" + remainingExp, 230, ((-140 / 16) + 75) + 34, 0xFFD900);
            drawString(fontRenderer, "" + DRIVE.getFormGaugeLevel(Strings.Form_Valor), 230, ((-140 / 16) + 75) + 46, 0xFFD900);
            break;
        case STATS_WISDOM:
            remainingExp = DRIVE.getDriveLevel(Strings.Form_Wisdom) == 7 ? 0 : valorCosts[DRIVE.getDriveLevel(Strings.Form_Wisdom)] - DRIVE.getDriveExp(Strings.Form_Wisdom);
            drawRect(125, ((-140 / 16) + 75) + 10, 200, ((-140 / 16) + 75) + 20, 0xFFFFFF);
            drawString(fontRenderer, "Level", 125, ((-140 / 16) + 75) + 10, 0xFFFFFF);
            drawString(fontRenderer, "Experience", 125, ((-140 / 16) + 75) + 22, 0xFFFFFF);
            drawString(fontRenderer, "Next Level", 125, ((-140 / 16) + 75) + 34, 0xFFFFFF);
            drawString(fontRenderer, "Form Gauge", 125, ((-140 / 16) + 75) + 46, 0xFFFFFF);
            drawString(fontRenderer, "" + DRIVE.getDriveLevel(Strings.Form_Wisdom), 230, ((-140 / 16) + 75) + 10, 0xFFD900);
            drawString(fontRenderer, "" + DRIVE.getDriveExp(Strings.Form_Wisdom), 230, ((-140 / 16) + 75) + 22, 0xFFD900);
            drawString(fontRenderer, "" + remainingExp, 230, ((-140 / 16) + 75) + 34, 0xFFD900);
            drawString(fontRenderer, "" + DRIVE.getFormGaugeLevel(Strings.Form_Wisdom), 230, ((-140 / 16) + 75) + 46, 0xFFD900);
            break;
        case STATS_LIMIT:
            remainingExp = DRIVE.getDriveLevel(Strings.Form_Limit) == 7 ? 0 : valorCosts[DRIVE.getDriveLevel(Strings.Form_Limit)] - DRIVE.getDriveExp(Strings.Form_Limit);
            drawRect(125, ((-140 / 16) + 75) + 10, 200, ((-140 / 16) + 75) + 20, 0xFFFFFF);
            drawString(fontRenderer, "Level", 125, ((-140 / 16) + 75) + 10, 0xFFFFFF);
            drawString(fontRenderer, "Experience", 125, ((-140 / 16) + 75) + 22, 0xFFFFFF);
            drawString(fontRenderer, "Next Level", 125, ((-140 / 16) + 75) + 34, 0xFFFFFF);
            drawString(fontRenderer, "From Gauge", 125, ((-140 / 16) + 75) + 46, 0xFFFFFF);
            drawString(fontRenderer, "" + DRIVE.getDriveLevel(Strings.Form_Limit), 230, ((-140 / 16) + 75) + 10, 0xFFD900);
            drawString(fontRenderer, "" + DRIVE.getDriveExp(Strings.Form_Limit), 230, ((-140 / 16) + 75) + 22, 0xFFD900);
            drawString(fontRenderer, "" + remainingExp, 230, ((-140 / 16) + 75) + 34, 0xFFD900);
            drawString(fontRenderer, "" + DRIVE.getFormGaugeLevel(Strings.Form_Limit), 230, ((-140 / 16) + 75) + 46, 0xFFD900);
            break;
        case STATS_MASTER:
            remainingExp = DRIVE.getDriveLevel(Strings.Form_Master) == 7 ? 0 : valorCosts[DRIVE.getDriveLevel(Strings.Form_Master)] - DRIVE.getDriveExp(Strings.Form_Master);
            drawRect(125, ((-140 / 16) + 75) + 10, 200, ((-140 / 16) + 75) + 20, 0xFFFFFF);
            drawString(fontRenderer, "Level", 125, ((-140 / 16) + 75) + 10, 0xFFFFFF);
            drawString(fontRenderer, "Experience", 125, ((-140 / 16) + 75) + 22, 0xFFFFFF);
            drawString(fontRenderer, "Next Level", 125, ((-140 / 16) + 75) + 34, 0xFFFFFF);
            drawString(fontRenderer, "From Gauge", 125, ((-140 / 16) + 75) + 46, 0xFFFFFF);
            drawString(fontRenderer, "" + DRIVE.getDriveLevel(Strings.Form_Master), 230, ((-140 / 16) + 75) + 10, 0xFFD900);
            drawString(fontRenderer, "" + DRIVE.getDriveExp(Strings.Form_Master), 230, ((-140 / 16) + 75) + 22, 0xFFD900);
            drawString(fontRenderer, "" + remainingExp, 230, ((-140 / 16) + 75) + 34, 0xFFD900);
            drawString(fontRenderer, "" + DRIVE.getFormGaugeLevel(Strings.Form_Master), 230, ((-140 / 16) + 75) + 46, 0xFFD900);
            break;
        case STATS_FINAL:
            remainingExp = DRIVE.getDriveLevel(Strings.Form_Final) == 7 ? 0 : valorCosts[DRIVE.getDriveLevel(Strings.Form_Final)] - DRIVE.getDriveExp(Strings.Form_Final);
            drawRect(125, ((-140 / 16) + 75) + 10, 200, ((-140 / 16) + 75) + 20, 0xFFFFFF);
            drawString(fontRenderer, "Level", 125, ((-140 / 16) + 75) + 10, 0xFFFFFF);
            drawString(fontRenderer, "Experience", 125, ((-140 / 16) + 75) + 22, 0xFFFFFF);
            drawString(fontRenderer, "Next Level", 125, ((-140 / 16) + 75) + 34, 0xFFFFFF);
            drawString(fontRenderer, "From Gauge", 125, ((-140 / 16) + 75) + 46, 0xFFFFFF);
            drawString(fontRenderer, "" + DRIVE.getDriveLevel(Strings.Form_Final), 230, ((-140 / 16) + 75) + 10, 0xFFD900);
            drawString(fontRenderer, "" + DRIVE.getDriveExp(Strings.Form_Final), 230, ((-140 / 16) + 75) + 22, 0xFFD900);
            drawString(fontRenderer, "" + remainingExp, 230, ((-140 / 16) + 75) + 34, 0xFFD900);
            drawString(fontRenderer, "" + DRIVE.getFormGaugeLevel(Strings.Form_Final), 230, ((-140 / 16) + 75) + 46, 0xFFD900);
            break;
    }
}
Also used : IMagicState(uk.co.wehavecookies56.kk.common.capability.MagicStateCapability.IMagicState) PlayerStatsCapability(uk.co.wehavecookies56.kk.common.capability.PlayerStatsCapability) IDriveState(uk.co.wehavecookies56.kk.common.capability.DriveStateCapability.IDriveState)

Aggregations

PlayerStatsCapability (uk.co.wehavecookies56.kk.common.capability.PlayerStatsCapability)3 IMagicState (uk.co.wehavecookies56.kk.common.capability.MagicStateCapability.IMagicState)2 EntityPlayer (net.minecraft.entity.player.EntityPlayer)1 NBTPrimitive (net.minecraft.nbt.NBTPrimitive)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 EnumFacing (net.minecraft.util.EnumFacing)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1 CheatModeCapability (uk.co.wehavecookies56.kk.common.capability.CheatModeCapability)1 DriveStateCapability (uk.co.wehavecookies56.kk.common.capability.DriveStateCapability)1 IDriveState (uk.co.wehavecookies56.kk.common.capability.DriveStateCapability.IDriveState)1 FirstTimeJoinCapability (uk.co.wehavecookies56.kk.common.capability.FirstTimeJoinCapability)1 MagicStateCapability (uk.co.wehavecookies56.kk.common.capability.MagicStateCapability)1 MunnyCapability (uk.co.wehavecookies56.kk.common.capability.MunnyCapability)1 OrganizationXIIICapability (uk.co.wehavecookies56.kk.common.capability.OrganizationXIIICapability)1 SummonKeybladeCapability (uk.co.wehavecookies56.kk.common.capability.SummonKeybladeCapability)1 SynthesisMaterialCapability (uk.co.wehavecookies56.kk.common.capability.SynthesisMaterialCapability)1 SynthesisRecipeCapability (uk.co.wehavecookies56.kk.common.capability.SynthesisRecipeCapability)1