Spawn a zombie skull in the word

Discussion in 'Plugin Development' started by Badeye, Apr 18, 2014.

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



    i need to create a zombie skull at Location loc.

    Here is what i have so far, but the only thing that changes is the offset of the skull / if it is on the wall or on the floor. I need to change it to a zombie head, but what i've tried failed :/

    1. Block replaceBlock = loc.getBlock();
    2. replaceBlock.setType(Material.SKULL);
    3. replaceBlock.setData((byte) 1);
    4. p.sendBlockChange(loc, Material.SKULL, (byte) 1);
    5. ((Skull) replaceBlock.getState()).setSkullType(SkullType.ZOMBIE);
    6. ((Skull) replaceBlock.getState()).update();
  2. Offline


  3. Offline


    Do you get any errors?
  4. Offline


    sadly, no. The skull gets placed, everything works. The skull is just always facing to the north and it is always a skeleton skull :/ The event gets fired, the code executed there is no problem with that.
    I read about Tile Entitys and that these Tile Entitys store the extra data for each block, in the case of the Skull it would be the type of the skull. Problem is, that i have no idea how to acces the data of it, i haven't found a documentation or tutorial about it :(
Thread Status:
Not open for further replies.

Share This Page