Suggestion: [Right-click equiping for chest pieces]

  • Just something I added to my copy of IC2 which I find handy is being able to right-click a chest item in my hand and have it swap out with my current chest item.


    Bat-pack equipped, Jet-pack in hand.
    When I right-click with the Jet-pack it should swap with my Bat-pack leaving me with the Bat-pack in hand and Jet-pack equipped.

    Items to be swapped:
    -Jet-packs, both.
    -Perhaps Nano/Quantum chest armors.

    Bound to be something wrong with this since I coded it while sober >.>

    1. public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer){
    2. ItemStack tmp = entityplayer.inventory.armorInventory[2];
    3. entityplayer.inventory.mainInventory[entityplayer.inventory.currentItem] = tmp;
    4. entityplayer.inventory.armorInventory[2] = itemstack;
    5. return itemstack;
    6. }