Placing armour idea

Discussion in 'Mod Development' started by SourC00lguy, Apr 5, 2015.

  1. SourC00lguy

    SourC00lguy New Member

    So what would people think about a mod that adds a chest piece or item that would deploy blocks or even better pipes at eye level, but behind the player. This would allow players to dig straight lines and lay cabling down easily at one time.
    mattp_12 and SatanicSanta like this.
  2. Darkhax

    Darkhax New Member

    This would be an interesting idea, and would probably be helpful to many users. It would also be extremely easy to implement, just subscribe to the player tick event, and check their equipment inventory for this new equipment item. The only issue would be handling how the tile being set is selected, would you want to give this item an inventory which could hold stacks of the block, or would you make it use certain slots of the inventory?
  3. SourC00lguy

    SourC00lguy New Member

    I'd want it to have its own inventory, can armour pieces ha e inventories?
  4. lenscas

    lenscas Over-Achiever

    if an item can then I see no reason why an armor piece can't. I also believe there is an backpack mod that gives a wearable backpack.
  5. SourC00lguy

    SourC00lguy New Member

    Hmm Yea I wondered about that, because I just don't ever remember having a chest piece or something with an inventory, considering you'd think a mod like industrial craft would do that for the scuba helmet and air cells
  6. Darkhax

    Darkhax New Member

    Literally anything in the game could be given an inventory, even things which don't exist in the world can be given an inventory (baubles is a good example of this). All you need is somewhere to store the data, which can be an item, a "fake" entity, or even the world itself. That being said, I don't think I have ever seen something like this done before. If you have no plans to code this mod yourself, perhaps we could work together on it. If you would like to, send me a PM on the forums, or message me on, I use the same screen name on both sites.
    SatanicSanta likes this.
  7. CoolSquid

    CoolSquid New Member

    Or override Item.onUpdate(ItemStack i, World w, Entity e, int a, boolean b) instead of doing all the checking :p
    SatanicSanta likes this.
  8. Darkhax

    Darkhax New Member

    The issue with that would be making sure the player is wearing the armor. There is an existing method in ItemArmor which behaves like this method, however it's only triggered when the item is worn as armor.

    onArmorTick (World world, EntityPlayer player, ItemStack stack)
    SatanicSanta likes this.

Share This Page