How can I add an entirely new block to Minecraft with addons, like mods on Java Edition?
- 1I don't think you just saying this doesn't relate to Game Development is sufficient argumentation - why doesn't it relate to it? Your own answer seems to disprove it.Joachim– Joachim2020-10-16 17:53:18 +00:00Commented Oct 16, 2020 at 17:53
- 3@Joachim okay I will try to explain. What do you think of when you think of game development. Someone using some quick copy-paste JSON for Minecraft Bedrock? No, if I called myself a game developer because I used a JSON API that would be just wrong. Same goes here. Game development is its own independent thing, whereas making a Minecraft block is in no way related to game development. There is not a single line of code that runs in this, so it has no code and no game. Also it shouldn’t be up to me to prove why something is not something, it should be up to the person labeling somethingPenguin– Penguin2020-10-17 03:45:43 +00:00Commented Oct 17, 2020 at 3:45
- @Joachim do you have a response? Its still getting voted to close even though the only argument is that “my own answer seems ti disprove it.” I am completely fine if this is closed I just want to know why so me and others know for the future. Please?Penguin– Penguin2020-10-18 20:56:06 +00:00Commented Oct 18, 2020 at 20:56
- 1Game development is not only about writing code. Doing game development-related tasks doesn't mean someone is a game developer (not only photographers post on Photography.SE, not only artists post on Arts & Crafts, &c.). It should be up to you to make a case for your question when a majority of (likely more experienced) users interprets it otherwise. Adding new content to a game is usually part of game development, even if it means only copying an asset and changing its properties and/or texture. ↴Joachim– Joachim2020-10-19 10:48:34 +00:00Commented Oct 19, 2020 at 10:48
- Just compare our Help section to theirs, and see what would be a better fit. I hope this is helpful :)Joachim– Joachim2020-10-19 10:49:33 +00:00Commented Oct 19, 2020 at 10:49
1 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 Brick We 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!