# How can I change the hardness and blast resistance of Minecraft blocks?

I want to make the strength of the iron block and obsidian switch places, along with other changes to block strength and blast resistance. I am not allowed to swap the textures or anything like that. I need to actually change the values of each block.

To do this, I need to know where Minecraft stores the blast resistance and hardness.

Is decompilation required? If so, which class file do I need to look into?

• Is it not easier to just retexture the two blocks? – Bálint Jul 31 '19 at 10:47
• @Bálint there are other changes to blast resistance and hardness I want to make, so retexturing them won't do the trick – user124114 Jul 31 '19 at 15:26
• Please do not make vacuous edits to bump questions. The Community user will auto-bump questions periodically, so there's no need to vandalize posts to get that effect. If you want to make a quality edit that will actually help attract answers, try adding new information to the question, like some background about what you're trying to do, or samples of how you've tried implementing it thus far. – DMGregory Sep 20 '19 at 10:54
• @DMGregory I really need a fruitful answer, how else will I get one – user124114 Sep 25 '19 at 2:55
• Once again, bump edits do not help you get answers. Neither does cursing. Making improvements, as described in the comment above, does help attract answers. I won't repeat this again - if you want answers, I recommend following the advice you've been given. – DMGregory Sep 25 '19 at 3:01

Info: You gave no information how you are making your mod so I assume you are using forge.

All Blocks can be accessed via the Block class.

The attributes you want to change are called:

• Hardness: This defines how often you have to mine the block for it to break
• Resistance: This defines the Blast resistance

To set these you can use the provided setter functions, e.g.:

Block.obsidian.setHardness(2.5);

or

Block.obsidian.setResistance (25);

See the documentation for full explanation.