Set behavior of any block to chest without changing appearance

Discussion in 'Plugin Development' started by greenvb-user, Aug 18, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    greenvb-user

    Hey, can I somehow modify any block to work like a chest without touching any other properties of the block (like texture, etc.)??? I tried to change the Material (block.setType(Material.CHEST)) but that did make the entire block an actual chest...

    thanks in advance ;)
     
  2. Offline

    dark navi

    To my knowledge, it's not possible to just set a property on a block to make it act like a chest. I assume you'd have to keep track of all of the block-chest inventories internally.
     
  3. Offline

    xxMOxMOxx

    I think that block.setData() can change what a block appears to be without actually changing it.
     
  4. Offline

    Saposhiente

    There is no direct way to implement this; instead, set metadata on the block to be the chest's contents, and then detect PlayerClickEvent on this block and manually display the contents to the player.
     
  5. Offline

    greenvb-user

    That sounds good. But how do I keep track of the Click-Event of single blocks???
     
Thread Status:
Not open for further replies.

Share This Page