Minecraft Blogs / Tutorial

Add custom mobs and entities to Bedrock Minecraft Tutorial - Blockbench, Resource Pack & Behaviour Pack Guide - Including all code you need to get started

  • 8,118 views, 17 today
  • 14
  • 10
  • 6
ArtsByKev's Avatar ArtsByKev
Level 37 : Artisan Blockhead
59
In this tutorial blog post you will learn how to add an animated Blockbench 3D model into Minecraft BE / PE.

Further below you can find .json code and more that you can quickly copy and edit to work for your own resource and behaviour packs. We will first begin to look at Blockbench exporting, then locate the com.mojang folder where you will put your custom mob files, and then we will look at the setup needed to create a mob that can idle and walk around in your world.


If you rather want to watch a video format you can look at the video in this post, or visit the link to the video here: https://youtu.be/K0O3H0q0S74





Let us begin with Blockbench. This is a free 3D modelling software made by Jannis ( https://www.twitter.com/jannisx11 ) . You can download the Blockbench software here: https://www.blockbench.net


Once you have gone through the stages of modelling your own 3D creation you save and export the model as a .geo.json file. Be sure to tag the file with a relevant “Model Identifier”. I’ve made an entire series of Blockbench tutorials for you here: https://www.youtube.com/playlist?list=PLvULVkjBtg2SezfUA8kHcPUGpxIS26uJR


To export your files in Blockbench go to the “file” tab at the top left menu of the program, scroll down to “export” and choose “export bedrock geometry”. Save this .json file of your 3D model somewhere on your computer.


To export your animations from Blockbench go to the “animate” tab to the top right of the program, then go to the animation tab in the top left menu. Scroll down to “save all animations” and save the .json file somewhere on your computer.


To export textures from Blockbench simply click on the save icon next to your texture file and save the .png somewhere on your computer.





Time to look at how we find the com.mojang folder in your PC.



Step 1: Open up your file browser



Step 2: Type %appdata%



Step 3: Locate the folder named:
a) “Local”
b) Local/”Packages”
c) Local/Packages/”Microsoft.MinecraftUWP_xxxxxxx…”
d) Local/Packages/Microsoft.MinecraftUWP_xxxxxxx…/”LocalState”
e) Local/Packages/Microsoft.MinecraftUWP_xxxxxxx…/LocalState/games
f) Local/Packages/Microsoft.MinecraftUWP_xxxxxxx…/LocalState/games/com.mojang



Once you have located com.mojang then open the file folder. In the folder you should find a folder named “behaviour_packs” and a folder named “resource_packs”.



First we are going to create a resource pack for your custom made Minecraft mob. This is done in the /resource_packs folder in /com.mojang.



Step 1: Make a new folder. This is going to be your resource pack.



Step 2: Create a new text document using for example notepad or notepad++. Save the file as manifest.json



Step 3: Open your manifest.json and add the following:
{


"format_version": 2,

"header": {

"name": "Your Pack Name",

"description": "Your Pack Description",

"version": [0, 0, 1],

"uuid": "go tho this page and generate a Version 4 UUID: uuidgenerator.net/ then paste it where this text is",

"min_engine_version": [1, 14, 0]

},

"modules": [

{

"version": [0, 0, 1],

"type": "resources",

"uuid": " go tho this page and generate a Version 4 UUID: uuidgenerator.net/ then paste it where this text is "

}

],

"metadata" : {

"authors" : [ "The Creator’s Name" ]

}

}



Step 4: Create 6 folders in your resourcepacks:
a) animation_controllers
b) animations
c) entity
d) models
e) render_controllers
f) textures



Step 5: In /animation_controllers you create a new text document that you save as “your_creation”.animation_controllers.json



Step 6: Open “your_creation”.animation_controllers.json and paste the following:

{

"format_version" : "1.10.0",

"animation_controllers" : {



"controller.animation.general.move" : {

"initial_state": "idle",

"states" : {

"idle" : {

"animations" : [ "idle" ],

"transitions": [ { "walk": "query.ground_speed" } ]

},

"walk" : {

"animations" : [ "walk" ],

"transitions": [ { "idle": "!query.ground_speed" } ],

"blend_transition": 0.25
}

}

}

}

}



Step 7: Move your “your_file”.animation.json into the /animations folder in your resource pack in the com.mojang folder.



Step 8: Move your “your_file”.geo.json into the /models folder in your resource pack in the com.mojang folder.



Step 9: Move your “your_file”.png into the /textures folder in your resource pack in the com.mojang folder.



Step 10: Create a new text document that will become our renderer controller file in the /renderer_controllers folder and then name it “your_renderer”.render_controllers.json



Step 11: Paste the following script on your renderer_controllers.json file:

{

"format_version": "1.10.0",

"render_controllers": {

"controller.render.”your_renderer”": {

"geometry": "Geometry.default",

"materials": [ { "*": "Material.default" } ],

"textures": [ "Texture.default" ]

}

}

}



Step 12: Create a new text document that will become your Minecraft Bedrock entity in the /entity folder and then name it “your_entity”.entity.json



Step 13: Paste the following script into your entity.json file:

{

"format_version": "1.10.0",

"minecraft:client_entity": {

"description": {

"identifier": "Your identifier name from Blockbench is written here",

"materials": { "default": "entity_alphatest" },

"textures": { "default": "textures/”your_file".png” },

"geometry": { "default": "geometry.”your_model”" },

"render_controllers": [ "controller.render.”your_renderer”" ],

"spawn_egg": {

"base_color": "#ffffff (this code means white) ( this uses an HTML color code, generate one here: https://htmlcolorcodes.com/ )",

"overlay_color": "# ffffff (this code means white) ( this uses an HTML color code, generate one here: https://htmlcolorcodes.com/ )"

},

"scripts": {

"animate": [

"look_at_target",

"controller_move"

]

},

"animations": {

"look_at_target": "animation."your_animation_controller".general.look_at_target",

"controller_move": "controller.animation.general.move",

"idle": "animation.”your_animation_1” (the animation name is what you name them when you create your animations in Blockbench)",

"walk": "animation.”your_animation_2” (the animation name is what you name them when you create your animations in Blockbench)"

}

}

}

}



Next we are going to create a behaviour pack for the new Minecraft entity. This is done in the /resource_packs folder in /com.mojang.



Step 1: Make a new folder. This is going to be your behaviour pack.



Step 2: Create a new text document using for example notepad or notepad++. Save the file as manifest.json



Step 3: Open your manifest.json and add the following:

{
"format_version": 2,

"header": {

"name": "Your Pack Name",

"description": "Your Pack Description",

"version": [0, 0, 1],

"uuid": "go tho this page and generate a Version 4 UUID: uuidgenerator.net/ then paste it where this text is",

"min_engine_version": [1, 14, 0]

},

"modules": [

{

"version": [0, 0, 1],

"type": "data",

"uuid": " go tho this page and generate a Version 4 UUID: uuidgenerator.net/ then paste it where this text is "

}

],

"dependencies": [

{

"version": [0, 0, 1],

"uuid": " go tho this page and generate a Version 4 UUID: uuidgenerator.net/ then paste it where this text is "

}

],

"metadata" : {

"authors" : [ "The Creator’s Name" ]

}

}



Step 4: Create 1 folder in your behaviour pack named “entities”



Step 5: Create a new text document in the /entities folder in your behaviour pack that is found in com.mojang and save it as “your_entity”.json



Step 6: Paste the following code into the new entity .json file:

{

"format_version": "1.16.0",
"minecraft:entity": {

"description": {

"identifier": "your_identifier",

"is_spawnable": true (can be spawned with an egg),

"is_summonable": true (can be spawned with a command),

"is_experimental": false

},

"components": {

//TRAITS

"minecraft:scale": {

"value": 1.00 (here you can adjust the mobs ingame scale to be bigger/smaller than it was originally made)

},

"minecraft:collision_box": {

"width": 0.7 (how wide is the hitbox? 1 = one full block),

"height": 0.7 (how high is the hitbox? 1 = one full block)

},

"minecraft:health": {

"value": 16 (health when spawned),

"max": 16 (how much health can it have in total when fully healed)

},

"minecraft:movement": {

"value": 0.23

},

//BASICS

"minecraft:movement.basic": {

},

"minecraft:navigation.walk": {

"is_amphibious": true (can swim),

"can_pass_doors": true (can walk through an open door),

"can_walk": true (can move around),

"can_break_doors": true (can damage doors to get through them)

},

"minecraft:jump.static": {

},

"minecraft:can_climb": {

},

"minecraft:hurt_on_condition": {

"damage_conditions": [

{

"filters": { "test": "in_lava", "subject": "self", "operator": "==", "value": true },

"cause": "lava",

"damage_per_tick": 4

}

]

},

"minecraft:breathable": {

"total_supply": 15 (how many bubbles of air),

"suffocate_time": 0,

"breathes_air": true (can breathe on land),

"breathes_water": true (can breathe in water)

},

"minecraft:physics": {

},

"minecraft:pushable": {

},

//BEHAVIOR

"minecraft:behavior.float": {

"priority": 0

},

"minecraft:behavior.random_stroll": {

"priority": 1,

"interval": 100,

"speed_multiplier": 1

},

"minecraft:behavior.look_at_player": {

"priority": 2,

"look_distance": 14,

"probability": 0.2

},

"minecraft:behavior.random_look_around": {

"priority": 3

}

}

}

}



Now you are all set to go!


Open Minecraft BE / PE / Windows version and create a new world. In the settings you activate your custom resource pack and custom behaviour pack. If you have named all files and things correctly and made sure the files are in the right folders, then the packs should show up and you can now have your very own friendly pet mob walk around in your game world.

If you encounter issues, then visit www.bedrock.dev to read more on all cool addon content you can make and create for Minecraft Bedrock / Pocket edition. Enjoy!



I'd love to see your mobs ingame, so tweet me your cool pictures to @artsbykev - https://www.twitter.com/arstbykev ! Follow for more tutorials and guides. If you found this tutorial for Minecraft Bedrock Editon helpful, then be sure to share it with other creators too, the more creators the more fun!






This guide is suited for patch 1.16 and all later versions. Works from Minecraft 1.14 and higher.
Creditshanewolf38
Tags

Create an account or sign in to comment.

1
07/09/2021 1:54 am
Level 8 : Apprentice Explorer
CommunicaPea
CommunicaPea's Avatar
What about on mobile since there's the BB web app?
1
07/09/2021 2:15 am
Level 37 : Artisan Blockhead
ArtsByKev
ArtsByKev's Avatar
Hey!



Havn't dug into Mobile, as it's a fairly different setup to work with, due to its limitaitons and lack of documentation.
2
01/31/2021 8:34 pm
Level 31 : Artisan Modder
Lofi_Monk
Lofi_Monk's Avatar
I would be lost without some of your tutorials. Thank you.
2
02/01/2021 3:52 am
Level 37 : Artisan Blockhead
ArtsByKev
ArtsByKev's Avatar
No worries! It's a joy to be of help - If I ever lack the skill to asset the situation, you can still expect efforts to be made :D
2
01/29/2021 5:41 am
Level 32 : Artisan Fox
Pixus
Pixus's Avatar
I don't really use Bedrock that much but this seems like a pretty in-depth and detailed tutorial about how to do what the title says. I'll have to watch the video as well, but you have put a lot of effort into this and it shows!
1
01/29/2021 5:49 am
Level 37 : Artisan Blockhead
ArtsByKev
ArtsByKev's Avatar
Thank you Pixus! I hope this will find its way to creative people who have been struggling to get started with their projects because the knowledge has been lacking in an easy-to-pick-up format. I cannot say that this is the best way to do things, by any stretch of the imagination. But if it can get people off the ground and try it out and/or to unlock the next stage in their journey as content creators, then I will count that as a success! :D
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome