I can certainly help you get started with creating a Minecraft datapack that adds a super zombie with special abilities in version 1.16. Here's a simple outline of how to create this datapack using Visual Studio Code:
- First, create a folder for your datapack:
Name it something like super_zombie_datapack. Inside that folder, create the following basic structure:
super_zombie_datapack
│
└───data
└───(namespace)
├───functions
│ └───super_zombie
│
└───loot_tables
└───entities
Replace (namespace) with a unique name of your choosing, such as your username, to avoid conflicts with other datapacks.
- Next, create a new file in Visual Studio Code named
pack.mcmeta inside your super_zombie_datapack folder. Paste the following code inside:
{
"pack": {
"pack_format": 5,
"description": "A datapack that adds a super zombie with special abilities."
}
}
- Now, let's create a function file to summon the super zombie itself. Inside the
super_zombie folder, create a file named summon_super_zombie.mcfunction and enter the following commands:
summon minecraft:zombie ~ ~1 ~ {CustomName:'{"text":"Super Zombie"}', Attributes:[{Name:generic.maxHealth, Base:100}, {Name:generic.attackDamage, Base:8}, {Name:generic.movementSpeed, Base:0.3}], Health:100f, IsBaby:0b, HandItems:[{id:"minecraft:diamond_sword", Count:1}, {}], HandDropChances:[2.0F, 0.085F], ArmorItems:[{},{},{id:"minecraft:diamond_chestplate", Count:1}, {}], ArmorDropChances:[0.085F, 0.085F, 2.0F, 0.085F]}
This command will summon a zombie named "Super Zombie" with increased health, attack damage, and movement speed, holding a diamond sword and wearing a diamond chestplate. Adjust the attributes as desired for your super zombie.
- Optionally, if you want to add a custom loot table for the super zombie, create a new file in the
entities folder under loot_tables, named super_zombie.json, and copy the following example code:
{
"type": "minecraft:entity",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:diamond",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 1,
"max": 3
}
}
],
"conditions": [
{
"condition": "minecraft:killed_by_player"
},
{
"condition": "minecraft:random_chance_with_looting",
"chance": 0.3,
"looting_multiplier": 0.1
}
]
}
]
}
]
}
This loot table will cause the super zombie to drop 1-3 diamonds when killed by a player, with a 30% chance, affected by the Looting enchantment.
- Finally, you'll need to create and set a custom loot table for the super zombie. Edit your
summon_super_zombie.mcfunction file and add the following line to the end:
data merge entity @e[type=minecraft:zombie,limit=1,sort=nearest,name="Super Zombie",distance=0..1] {DeathLootTable: "(namespace):entities/super_zombie"}
Make sure to replace (namespace) with the namespace you used in step 1.
-
To use the datapack, compress the super_zombie_datapack folder into a .zip file and place it in the datapacks folder of your Minecraft world. Reload the datapacks using /reload.
-
To summon the super zombie, run the following command in-game:
/function (namespace):super_zombie/summon_super_zombie
Again, replace (namespace) with your chosen namespace.
Of course, you can expand upon these fundamentals to add more abilities and features to your super zombie. Good luck and happy coding!