bigbang87 / deadly-monsters

Mod for Minecraft. New unique monsters, terrible and dangerous creatures. Use the new fortification blocks to defend yourself against them.
MIT License
4 stars 14 forks source link

Mutant Steve Can Break Bedrock #11

Closed TeetoKaziim closed 6 years ago

TeetoKaziim commented 6 years ago

I think this is because Bedrock (And other "unbreakable" blocks like it) uses a hardness level of -1, and it seems like block hardness is what steve is looking for to decide if he can break things?

bigbang87 commented 6 years ago

You're right, code for breaking blocks:

if (hardness < hardnessTreshold) { randomChance = random.nextFloat(); if (randomChance < destroyChance) { this.attacker.world.destroyBlock(blockToDestroyPos, true); destroyedBlock = true; } }

so i need to fix it.