Custom Stuff 1
Information presented below this line is outdated syntax or information used for Custom Stuff 1. It will not work with Custom Stuff 2. |
Resistance, in terms of Minecraft, is how well a block holds up against explosions. When creating Custom Stuff blocks, it's important to set the resistance at the correct level so that the block you create will hold up as well as players expect it to. Failing to do this will often result in a nasty shock the first time a creeper comes around.
The syntax for this is fairly straight forward. Add a line similar to the following to your .block file, changing the variable (number) to another valid integer to suit your creation.
resistance=2;
Resistances in the Vanilla Game[]
Because it's difficult to guess at resistances of existing blocks, the table below shows many of the common blocks in the game and their resistances.[1] You don't need to use these values, but may instead use them to gauge how resistant you want your block to be. For example, if you want it more blast resistant than stone, but less so than End Stone you will want to choose a number between 30 and 45. Naturally some testing will be required to find the balance you feel is perfect.
|
|
|
- ↑ Information for the table above was copied from the Explosion entry on minecraftwiki.net.
- ↑ http://www.minecraftwiki.net/wiki/Vines
IMPORTANT ISSUE: Each of these values has to be divided by 3 to work as intended. If anyone wants to check just look at the source code of the class net.minecraft.server.block and look for durability, you will find this: this.durability = (f * 3.0F); with f being the value you input.