Check if the block/material has a MaterialData for facing direction

Discussion in 'Plugin Development' started by CoderMusgrove, Feb 24, 2014.

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

    CoderMusgrove

    I am trying perform a function that allows me to check if a block has the ability to have its facing direction stored, as well as getting its faced direction and storing it.

    So from my research, it has to extend MaterialData, which is what gives it the ability to have a facing direction.

    My problem is the casting a Block to have MaterialData, and have the code be able do to getData().getFacing();

    How would I do this?
     
  2. Offline

    xTrollxDudex

    CoderMusgrove
    Get block's state, cast to wrapper class. Some blocks are directional, some aren't.
     
Thread Status:
Not open for further replies.

Share This Page