Directional blocks showing as items rather than blocks

Discussion in 'Plugin Development' started by kralv, May 10, 2012.

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


    I'm currently saving blocks in an area and then loading them back later. I am using this to load blocks into the world...
    location.getBlock().setTypeIdAndData(id, data, true);
    The problem is that when using this, special blocks like ladders, torches, doors, or anything with a directional value sometimes just loads in as an item on the ground, rather than a block. The weird thing is that this works about 70% of the time, but about 3 out of every 10 of these kinds of blocks show up as items. I also checked to make sure that the material data being passed into setTypeIdAndData was correct, and it was passing in the correct direction byte for each block. Is there any way to stop them spawning as items?
  2. I think this depends on the order the block are spawned in, for example if you "load" the ladder before the block behind it, the ladder will spawn as a item since theres no block behind the ladder at the time of creating the ladder.

    Try putting blocks that depend on other blocks aside, and then generate all non-dependive blocks first, then all depending blocks.
    Doors depend on the block UNDER the door
    ladders depend on the block BEHIND the ladder
    redstone items depend on the block its attached to.
    Rails depend on block under the rail.
    Same with flowers and such.
Thread Status:
Not open for further replies.

Share This Page