With 1.5, I noticed how they got rid of all the seperate setBlock and setBlockMetadata functions and just put them into two seperate functions now. But now they have an extra argument. You may be wondering what that last int argument does? Let me help.
The sixth (or fifth if just setting metadata) argument determines what you want to do after you set the block/metadata to the given value. Do you want to update the block after you set the designated value? And do you want to notify the block's neighbors of the change?
Basically, here's what you should pass in for whichever operations you are wanting to be done alongside the block/metadata change:
1 - Notifies neighbors of block change
2 - Marks the block to be updated
3 - Marks the block to be updated AND Notifies neighbors of block change
4 - Just sets the block ID or metadata
NOTE: Minecraft will only notify the block's neighbors of the changes if the code is called server-side and not client-side.
I haven't seen anywhere in the minecraft code where it uses any other values besides these, so just stick with these values for passing into the functions.
The sixth (or fifth if just setting metadata) argument determines what you want to do after you set the block/metadata to the given value. Do you want to update the block after you set the designated value? And do you want to notify the block's neighbors of the change?
Basically, here's what you should pass in for whichever operations you are wanting to be done alongside the block/metadata change:
1 - Notifies neighbors of block change
2 - Marks the block to be updated
3 - Marks the block to be updated AND Notifies neighbors of block change
4 - Just sets the block ID or metadata
NOTE: Minecraft will only notify the block's neighbors of the changes if the code is called server-side and not client-side.
I haven't seen anywhere in the minecraft code where it uses any other values besides these, so just stick with these values for passing into the functions.
I hope this helps all of you to be less confused.