Adding ladders

Discussion in 'Plugin Development' started by TechGuard, Jun 17, 2011.

Thread Status:
Not open for further replies.
  1. Everytime I'm adding ladders with getBlock().setTypeId() it automaticly drops them..
    Anyone knows a quick fix?
     
  2. Offline

    wwsean08

    What are you trying to add ladders to? Are you trying to add them to the inventory or place them?
     
  3. Offline

    Mak

    you must set the Data of the ladder:
    yourData is a byte can be 2,3,4 or 5. each data stands for one side of a block where the ladder can be placed
    make it like this:
    block.setType(Material.LADDER);
    block.setData(yourData);
    I hope you uderstood what i mean...
     
  4. Offline

    captainawesome7

    @TechGuard What he said, you need to get the relative face of the block (the ladders have to have their data to be set so that the ladder is on a block, not setting the value just drops it). I'm sure you can find out which data bytes mean which directions on the internet somewhere.
     
  5. Offline

    Mak

    just test it with the datas 2,3,4 and 5. these are the possible datas...
    thanks captainawesome7 for your good explanation
     
  6. Ah, I thought it had to do something with that.
    I'll just play around with it :) Tnx!
     
Thread Status:
Not open for further replies.

Share This Page