How do I make a custom block with Minecraft Addons? [closed]
How can I add an entirely new block to Minecraft with addons, like mods on Java Edition?
81 Answer
Requirements
- Windows 10
- Minecraft Windows 10 Edition
- I also recommend getting a new text editor other than notepad, I use Notepad++
Before We Begin
- This answer assumes you know how to create a proper manifest, pack icon, and pack dependency linking.
- A rule of thumb for naming is use only no cap
a-z,_, and0-9where the first character is not a number.
Creating the Block File
Create a folder in your behavior pack called blocks. Then go into it. Create a .json file and call it what you want the ID for your block to be (Should use underscores _ instead of spaces, also no caps). I have made a file called beige_brick.json.
{ "format_version":"1.16.0", "minecraft:block":{ "description":{ "identifier":"msab:beige_brick", "is_experimental":false, "register_to_creative_menu":true }, "components":{ "minecraft:destroy_time":1 } }
}Open it in your editor and paste that. What did we do?
"identifier":"msab:beige_brick"- I made a block with IDmsab:beige_brick. The thing before the colon:is your prefix. This will be the unique prefix for everything new your addon creates. Make it whatever you want, as long as it is notminecraft:. The part after that is what our item's unique ID is. The block's ID must be the same as the file name or it will not work."minecraft:destroy_time:1"- We have a destroy time of one. In the latest full release, tools cannot affect destruction time at all. This is one of many components.
Adding & Registering a New Texture
In your resource pack, make a folder called textures. Then inside a new folder called blocks. Inside that put your PNG that you want your block to look like. Name it beige_brick (or whatever you made your ID)
- Default Minecraft Blocks are 16x16, although you can use any square size.
Go back to your
texturesfolder and make a JSON file calledterrain_textures.json. This is where we will actually register our textures. In it paste:
{ "num_mip_levels":4, "padding":8, "resource_pack_name":"msab", "texture_data":{ "msab:beige_brick":{ "textures":"textures/blocks/beige_brick" } }, "texture_name":"atlas.terrain"
}All that matters here is that msab is our prefix and blocks/beige_brick is our file path. Obviously if you used a different ID/prefix, change these.
Resource Pack Texture Assignment
In your resource pack create a file called blocks.json. In it paste:
"format_version":[1,1,0], "msab:beige_brick":{ "sound":"stone", "textures":"msab:beige_brick" }
}We apply a sound and texture to our Beige Bricks. I set the sound to stone, but there are many others such as metal, and you can even add your own new sound, although I will not go over that right now. I also use the texture msab:beige_brick, which we registered before.
Language Files
Language files is how we name our item, for example, a lit pumpkin is called a Jack O' Lantern.
Make a folder called texts in your resource pack, and in that a file called en_US.lang. In that put this:
block.msab:beige_brick.name=Beige BrickWe do block.<prefix:ID>.name=<Block Name>. Pretty easy.
I also like to copy this file and have a second called en_GB for UK English.
We're Done
Try compressing and putting this into Minecraft!
3