How to give charged items for player

  • Hello everyone.


    I have run 1.7.10 Bukkit server with IC2 Experimental installed on it. I tried to configure kits for players, that contains IC2 items (tools/armor/crystals), but all items I give that way has 0 Eu charge.
    SudID in items/tools seems related only to tool/armor charge bar, but do not affect actually stored Eu in item.
    I googled hard, and found that IC2 stores information about Eu accumulated in item into NTB tag "charge" but i can't find how to set this tag with command or configure it for kit.
    It must be possible, because NEI/creative menu provide charged items correctly (charge bar is full and stored Eu is on maximum level)

  • I use Essentials kits to give kits to the players, It supports various NBT tags (but I not sure it supports "not official" NBT tags such "charge")
    The question is how to configure NBT charge tag with Essentials. All my attempts to configure charge tag for item - changes nothing, items still has 0Eu stored in them.
    This question probably should be asked from Essentals dev, but I think there are people in IC2 community who solved this question and can share the solution.

  • I have contacted with Essentilas dev team, and the answer to topic question is - Essentials cannot see modded NBT tags
    That is why it's impossible to make charged IC2 items with essentials kits.

  • what about itemDamage (or displayDamage) if you can detect itemDamage then you would be able to see the charge based of their damage.
    If IC2Exp still supports damage = chargeLevel feature.

    • Official Post

    Fundamentally the item damage is detached from the charge, it's only used for drawing the damage bars. So you could spawn in an electric thing with any damage, it would still really be empty.

    145 Mods isn't too many. 9 types of copper and 8 types of tin aren't too many. 3 types of coffee though?

    I know that you believe that you understood what you think I said, but I am not sure you realise that what you read was not what I meant.


    ---- Minecraft Crash Report ----
    // I just don't know what went wrong :(


    I see this too much.

  • The key moment - item damage relate only to charge bar, shown on item not on actually stored in item Eu.
    I can make item with damage (i.e. 4571:1 or 4571:20) and this items will be shown with different status bar levels on them, but both will store 0 Eu.
    At the moment I can see two ways - give discharged items and some possibility to charge them for free and change Essentials code so it can recognize and operate with NBT tags.

    • Official Post

    Essentials cannot see modded NBT tags

    There is no difference between modded and vanilla nbt tags, but from what you're saying is, that they can't deal with nbt tags at all.
    Setting the item damage only changes their "damage bar", but not the charge. Making it detect the charge from the damage is impossible to do in any feasible way.

    • Official Post

    There is no difference between modded and vanilla nbt tags, but from what you're saying is, that they can't deal with nbt tags at all.

    Each vanilla tag is likely hardcoded syntax wise, so ours wouldn't be recognized.

    145 Mods isn't too many. 9 types of copper and 8 types of tin aren't too many. 3 types of coffee though?

    I know that you believe that you understood what you think I said, but I am not sure you realise that what you read was not what I meant.


    ---- Minecraft Crash Report ----
    // I just don't know what went wrong :(


    I see this too much.

  • from what i readed was he wanted to detect when a EU item is empty or full. Since he can not see the NBTTag but the ItemDamage i throught that would be a way of detecting the chargelevel (not acurate but still relyable) of an EU Item.

    • Official Post

    from what i readed was he wanted to detect when a EU item is empty or full. Since he can not see the NBTTag but the ItemDamage i throught that would be a way of detecting the chargelevel (not acurate but still relyable) of an EU Item.

    You're reading it completely wrong, he wants a way to spawn in items that have charge via a Bukkit plugin's command.

    145 Mods isn't too many. 9 types of copper and 8 types of tin aren't too many. 3 types of coffee though?

    I know that you believe that you understood what you think I said, but I am not sure you realise that what you read was not what I meant.


    ---- Minecraft Crash Report ----
    // I just don't know what went wrong :(


    I see this too much.

  • ok here is a idea since a players spawn could be defined when they join the first time why dont you make a teleporter system?
    Since you give people the same items when they join you could let them land on a command block that gives them items & then teleport them away.


    Or let them teleport to that position when they join the first time.


    And with command blocks you can even define every item + meta + nbtTagCompounds that is no issue.


    Just to point out i am brainstorming.

  • I tried a lot of various commands (console/ingame chat/command block) and no one allows me to get charged item.
    It seems that Bukkit understands tagged items and allow to work with tags if it was included in item somehow, but it can not set NBT tags itself

  • the thing is its the data after: /give player, itemId, count, metadata
    The problem is you have to make it properly else it would not work. But with commands you can give items nbtTags like swords to be unbreakable etc.
    Best thing you would need is a mod that prints the current held item in the chat + proper nbtdata for command blocks.