Texture Packs Themed Packs

UPDATED Custom Tool Template for Bedrock 1.21

  • Items
  • 4,498 views • 1 today
  • 485 downloads • 0 today
  • 12
  • 9
  • 5
Bedrock Edition
NeonNinja3
Level 44 : Master Modder Birb
60
ABOUT THIS PACK:

* pack format & min engine version: 1.20.50

* @minecraft/server version: 1.11.0 (Stable)

* NO EXPERIMENTAL FEATURES REQUIRED!

This resource is intended as a tutorial/reference for other developers of addons for Minecraft Bedrock Edition. Unlike the previous version of this pack, it does not require enabling any experimental toggles, so it should be compatible with addons intended for the Minecraft Marketplace. It should work for both singleplayer and multiplayer worlds.


This is a template addon: feel free to use part or all of this pack in your own projects! :)


CONTENTS:

If you're new to making your own resource packs, and are looking to add custom tools to the game, you can find everything you need to get started here.

If you have previously made an addon containing custom tools, but have experienced problems due to changes made in a recent update, this should also help you get your pack working again.

The pack contains two full sets of custom tools: one which can be crafted using only vanilla materials, and one which is crafted from a custom block. Both sets of tools attempt to recreate all functionality from the vanilla tools. The addon should be compatible with both singleplayer and multiplayer worlds.

You can find the new tools in the "Equipment" tab of the Creative Inventory, and the new blocks under the "Nature" tab. The custom log variety is grouped with the other logs, while the custom stone variety is by itself. The crafting recipes for the custom tools follow the same patterns as the corresponding vanilla tools.

For simpler testing in Survival Mode, chickens will also drop the new wood and stone blocks, in addition to their regular loot :D


Issues:

* In order for the custom pickaxes to be able to speed up mining/obtain the same drops as the vanilla tools of the same tier, it is necessary to manually add a list of all relevant blocks to the item .json files. This is still a work in progress, so there are currently some stone- and metal-type blocks which the custom tools cannot yet mine effectively. I will be adding the full list of blocks for each tool tier (wood, stone, iron and diamond) soon in a future update.



The problem with the inventory menu tabs not loading HAS BEEN FIXED: you can now create a new world with this addon enabled without experiencing any issues!

To install this pack, drag and drop the behavior pack into Minecraft's development_behavior_packs folder, and the resource pack into development_resource_packs. If you're not sure where to find these, there are instructions here: https://learn.microsoft.com/en-us/minecraft/creator/documents/gettingstarted
CreditThanks to everyone who made the vanilla RP/BP available, as well as the updated documentation and the Minecraft Wiki!
Progress95% complete
Game VersionMinecraft Bedrock
Tags

1 Update Logs

Update #1 : by NeonNinja3 06/19/2024 3:28:49 pmJune 19, 2024 @ 7:28 pm UTC

Updated @minecraft/server module to latest stable version (1.11.0), to take advantage of the new player.selectedSlotIndex and player.getGameMode() functionality. Now, tools do not take damage when the player is in Creative Mode, and it is guaranteed that the correct item will take durability damage when used in Survival Mode.
Curated in their collections
Templates
3 collected by NeonNinja3
Custom Door Template
Food Effects (a demo addon for Bedrock Edition comparing different item format versions)
UPDATED Custom Tool Template for Bedrock 1.21

  Have something to say?

MrRamos8408
01/08/2025 1:57 am
Level 1 : New Miner
Could you please further explain how the const customToolDurabilities segment works? Thank you!
2
NeonNinja3
01/20/2025 6:45 pm
She/Her • Level 44 : Master Modder Birb
history
Sure! This is actually something that's outdated, since if you use script version 1.15 you'll be able to access the tools' max durability directly instead of using this workaround. The tools in my Wintertools and Additions2 projects use the newer format; I just haven't gotten around to updating this project yet, but will sometime this week!

What it does is store the maximum durability for custom tools made out of each material. This is because the "durability" component of a tool item is an object, not a number, and has separate properties for 'max durability' and 'durability damage.' The tool will break when damage = max durability. At the time (v. 1.11), there didn't seem to be a way of accessing the tools' max durability values defined in the tool .json files, so I had to manually re-specify each one within the main.js script, in that "const customToolDurabilities" object. Then, inside the "decrementToolDurability" function, it compares those numbers with the current amount of damage (which is directly accessible) to see whether the tool should decrease its durability bar or get replaced with an empty slot.
1
NeonNinja3
06/24/2024 12:39 pm
She/Her • Level 44 : Master Modder Birb
TODO: Have custom axes be able to strip off oxidation and wax from copper block variants. I'll update this again once that's added :)
1
Retromania91
06/24/2024 2:07 am
Level 1 : New Miner
Is there anything like this for armor durability damage?
2
NeonNinja3
01/20/2025 6:55 pm
She/Her • Level 44 : Master Modder Birb
Custom armor is now fully supported, and you can find a few sets (copper, emerald, amethyst, rose gold, and echo shard) in this addon: https://www.planetminecraft.com/mod/additions-2/. You can just specify the durability each piece should have within its own .json file; there's no need to do anything in the script since the game now handles that automatically for armor.

Let me know if this answers your question! If you convert the .mcaddon to a .zip and extract it, you'll be able to copy the individual files into your own project if you're looking for a template to start from. Be sure to pay attention to where the armor texture files are stored within the resource pack; multiple pieces of armor all reference shared image files instead of each having its own .png.
1

Welcome