back to projects

No griefing, creepers!

Minecraft Datapack

disables creeper griefing without disabling mobGriefing

category

code experiments

date

13 April 2024

links
talk about how great it is

A little more about the project

this datapack stops creepers from destroying surrounding blocks when they explode, without disabling the mobGriefing gamerule. this means your villagers can stillf arm, sheep can still eat grass, and other mobs can behave normally; but your builds won't get into a crater because a creeper decided to ruin your afternoon

A closer look at how it works

the datapack checks for creepers that haven't been processed yet and sets their ExplosionRadius to 0, which prevents their explosions from destroying blocks. after that, it tags those creepers so they won't be processed repeatedly

a function is scheduled to run again one second later, repeating the process to catch newly spawned creepers. by targeting creepers individually instead of disabling mobGriefing, the datapack prevents creeper damage to builds while keeping other mechanics intact

Some images from this project

talk about how great it is

You may also want to check this out...