MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / setHardness

Method setHardness

src/main/java/net/minecraft/block/Block.java:397–407  ·  view source on GitHub ↗

Sets how many hits it takes to break a block.

(float hardness)

Source from the content-addressed store, hash-verified

395 * Sets how many hits it takes to break a block.
396 */
397 protected Block setHardness(float hardness)
398 {
399 this.blockHardness = hardness;
400
401 if (this.blockResistance < hardness * 5.0F)
402 {
403 this.blockResistance = hardness * 5.0F;
404 }
405
406 return this;
407 }
408
409 protected Block setBlockUnbreakable()
410 {

Callers 14

setBlockUnbreakableMethod · 0.95
registerBlocksMethod · 0.80
BlockSilverfishMethod · 0.80
BlockWallMethod · 0.80
BlockCropsMethod · 0.80
BlockPistonBaseMethod · 0.80
BlockBeaconMethod · 0.80
BlockPistonMovingMethod · 0.80
BlockDoublePlantMethod · 0.80
BlockStairsMethod · 0.80
BlockLeavesMethod · 0.80
BlockLogMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected