Make a Sign Be In The Ground

Discussion in 'Plugin Development' started by azoundria, Jan 22, 2011.

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

    azoundria

    Okay, so I need to have my mod create a sign with the name of a town at the center of the town.

    The sign creation works, and I figured out how to give the sign content. This is my current code:

    Block b = w.getBlockAt(x, y, z);
    b.setTypeId(68);
    Sign s = (Sign) b.getState();
    s.setLine(0, this.name);
    s.setLine(2, "Population: 1");

    However, the sign appears like it's against a wall. I need to change some kind of setting in the block so the sign is sticking into the ground instead.

    Does anyone know how I could do this?
     
  2. Offline

    Archelaus

    Because that's literally a "wall sign".

    Try

    Code:
    b.setType(Material.SIGN_POST);
     
Thread Status:
Not open for further replies.

Share This Page