[Solved] Question Regarding Metadata of Tiles

I am trying to get the metadata of a wall sign in order to get the direction it is facing. I found the DirectionalData interface, but cannot find any classes that implement it. Do I need to implement my own or is there a simpler method?

1 Like

Maybe try doing this?

Direction dir = Direction.getClosestHorizonal(signBlock.getLocation().getPosition());

This is incorrect.

The correct way is:

DirectionalData data = sign.getData(DirectionalData.class).get();

as per the DataHolder interface.

3 Likes

Thank you very much.