Check if Chest BlockState is part of Double Chest?

Discussion in 'Plugin Development' started by InfiniteMinecraft, Jul 5, 2013.

Thread Status:
Not open for further replies.
  1. If I am looking through the BlockStates in a loaded chunk, how can I tell if one chest blockstate is a part of a double chest? and if it is, get the doublechestinventory?
     
  2. Offline

    adam753

    I guess you could do chest.getContents() on it and then check the size of the list. If it's 54, it's a double. Or would BlockState not capture the chest contents? I'm not really familiar with it, but it captures metadata according to the documentation so you should be good.
     
  3. Offline

    ZeusAllMighty11

    Code:
    if(someState instanceof DoubleChest){ // double chest }
     
  4. Offline

    dunbaratu

    Do DoubleChest states exist as a member of the BLOCK though? I thought they only existed temporarily while a player has opened the chest.
     
Thread Status:
Not open for further replies.

Share This Page