This data pack was created to allow Villagers to harvest crops, and Snow Golems to place snow layers, while also retaining the desirable features of gamerule mobGriefing = false. Note that this data pack sets the mobGriefing gamerule to true.
This data pack disables block destruction done by the following hostile mobs;
This data pack also prevents the following hostile mobs from picking up items;
- Zombie Pigman
- Zombie Villager
Other hostile mobs that destroy blocks, such as the Wither Boss (and its flying skulls), and Ender Dragon do not have their explosion or block destruction abilities stored in their entity data, so they cannot (currently) have their griefing disabled via data pack in a way that does not have other undesirable effects.
Please note that render distance must be greater than, or equal to, 8 to avoid lag, due to the way creeper explosions are detected by this data pack. For versions 11 or below, a minimum render distance of 12 is required to avoid lag.
By default, all of the above listed griefing is prevented. If you'd like to change that, you can find the configuration file at "data\dhg\functions\config.mcfunction" within the zip file of Version 10+ of the data pack. Please note that due to the way Enderman grief prevention works, it cannot be disabled/enabled in the same manner; therefore Enderman griefing will always be prevented while the data pack is enabled.
More information about data packs and how to use them can be found on the official Minecraft Wiki.