Let’s bundle some items together and let’s talk about tags new topics added to the fortune fabric courses such as table and writable entities projectiles throwable projectiles and boats as well as first steps to biomes and dimensions courses Linked In the description below oh right we found a suspect intelligence More and in this tutorial we’re gonna be adding a custom tag to Minecraft and of course we’re going to talk about what are tags how can you use them how can you make custom ones and I mean let’s just jump in we’ve previously seen the block tags under Minecraft over here That is the needs Diamond Tool needs iron tool and need Stone tool as well as the minable ones those were needed for adding drops to our blocks in this case and we are going to well actually add custom tags as well now there’s two steps to this number one making a Json File right so like these Json files and then also making a key instead of the code that we can then reference in the code these are two separate steps in theory you can also only make the Json file now the only thing there then is that you can’t really reference it Anywhere in the code and for our purposes over here here we’re going to reference it in the metal detector item over here right now here the is valuable block method is hard coded to only look for iron ore and diamond ore and what we’re going to do is we’re going to make It so that it’s going to look for a custom tag instead and then say hey is this block tag actually inside of our custom tag and if it is then it is a valuable block so for this in the tutorial mode package we’re going to right click new package and I’m going to Call this util I personally prefer to put this in the YouTube package you could also make a tag package or something like that but I think YouTube is gonna be fine instead of there there’s going to be a custom class called the mod tags class inside of here We’ll make two aesthetic classes that’s going to be a public static class called blocks and we’re going to make another static class and that’s going to be a public static class so basically the blocks class is going to represent block tags and the items class is going to Represent item tax and for this we’re going to need a helper method that’s going to be a private static tag key of type block here in this case there we go and it’s going to be called tag with a string name from and is going to return Block tags dot create passing in a new resource location tutorial mode and mod ID and then the name right here as well and that is basically how we’re going to create the tag so let’s just create the block tag here in this case that’s going to be a public static final tag key Again of type block and this is going to be the metal underscore detector underscore valuables and this is equal to the tag method that we’ve created with the metal underscore detector underscore valuables as a name given here there we go and that basically creates a key that we can then use Inside of the code so for example if we go into the metal detector item class over here down here instead of saying the state is a block or another block we can now say state DOT is and you can see you can pass an attack key over here so If we now say mod tags dot blocks that metal detector valuables it’s now going to say hey is this particular block State inside of the plus some tag that we’re referencing here and just for the sake of completion let’s actually duplicate or copy over the tag key Method over here and we’re going to change this to item and then instead of the block tags this is item tags now in this instance we’re not actually going to create any item tag because in this example we don’t need any but this is a thing that could be useful in the future So do keep that in mind and now we still need to create the Json file so for this I’m just going to copy over the name here just so that I’m sure that it’s named correctly and then under data tutorial mod we’re going to make a new directory called Tags and then very Important in the text directory we’re going to make another new directory called blocks if you make a block tag it has to be in tags blocks otherwise it will not work so in the blocks folder now we can make a new file we’re going to call this the metal underscore Detector underscore valuables.json and the contents of this well basically are a normal tag so let’s just copy over the basic tag over here and another one here is fine but we’re just going to use the normal Sapphire or and I’m going to add another one and that is hashtag Forge Force and the reason why we’re adding this is because this basically refers to all of the ores this is under the forge namespace and the hashtag here says that this is a another tag so we’re basically referring to another tag namely the oars tag which basically contains all of the Ores that are added via vanilla and usually if you want to be proper then your custom tags should also all be added to the ores tag but in this case we’re just going to do it like this and that should be basically fine and now When I use my metal detector I should be able to not only find Sapphire ore but I should also be able to find all of the other ores that are in vanilla and that is actually all of the steps that we need to do so let’s jump into the game And see if it works alright fans was back in Minecraft and let’s just right click over here and see if we can find some valuables there we go we got some Redstone or deep State redstone ore to be exact we got some coal ore iron ore And if I were to take out and get some Sapphire over here and just to you know just like dig down a little bit over here and oh are we gonna find it and of course we’re also going to find the sapphire ore so that is absolutely Freaking awesome and that is custom tags added to Minecraft will no longer have to deal with Json files because we’re gonna do what datagen seen in this video hope to see you there so yeah Video Information
This video, titled ‘Forge Modding Tutorial – Minecraft 1.20: Custom Tags | #11’, was uploaded by Modding by Kaupenjoe on 2023-08-07 14:59:58. It has garnered 849 views and 38 likes. The duration of the video is 00:05:16 or 316 seconds.
In this Minecraft Modding Tutorial for Forge, we are adding custom tags to Minecraft 1.20
== MODDING COURSES == FORGE ▶️ https://url.kaupenjoe.net/CourseForge120X FABRIC ▶️ https://url.kaupenjoe.net/CourseFabric120X
== COMPATIBILITY == ▶️ Compatible with 1.20 & 1.20.1
== ASSETS & DOWNLOAD LINKS == GitHub Repo: https://github.com/Tutorials-By-Kaupenjoe/Forge-Tutorial-1.20.X/tree/11-tags
== SUPPORT ME ON PATREON == ▶️ https://url.kaupenjoe.net/patreon
== 25% OFF FOR GAMING SERVERS == ▶️ https://www.bisecthosting.com/Kaupenjoe
== TAKE A LOOK AT MY COURSES WITH COUPON CODES == ▶️ NEW Forge Modding with Minecraft 1.20.X: https://url.kaupenjoe.net/CourseForge120X ▶️ Learn Forge Modding with Minecraft 1.18: https://url.kaupenjoe.net/CourseForge118 * ▶️ Learn Fabric Modding with Minecraft 1.18: https://url.kaupenjoe.net/CourseFabric118 * ▶️ Complete and Roblox Lua Game Development: https://url.kaupenjoe.net/RobloxCoupon *
== SUPPORT ME ON PATREON == ▶️ https://url.kaupenjoe.net/patreon
== SOCIALS == Discord: https://discord.com/invite/yqxykanpWf Personal Twitter: https://twitter.com/Kaupenjoe
Instagram: https://url.kaupenjoe.net/tutorials/instagram Facebook: https://url.kaupenjoe.net/tutorials/facebook Twitter: https://url.kaupenjoe.net/tutorials/twitter TikTok: https://url.kaupenjoe.net/tutorials/tiktok Written Tutorials: https://url.kaupenjoe.net/tutorials/blog
== LICENSE == Source Code is distributed under the MIT License. Additional Licenses for other assets can be seen below or in the accompanying CREDITS.txt on download.
== ADDITIONAL CREDITS ==
== AFFILIATE DISCLAIMER == * Some of the links and other products that appear in the video description are from companies which I will earn an affiliate commission or referral bonus from or are my own products. This means that if you click on one of the product links, I’ll receive a small commission or additional kickback without any additional cost for you. This helps support the channel and allows me to continue to make videos. Thank you for the support!
== HASHTAGS == #Minecraft #MinecraftModding #MinecraftTutorial #Kaupenjoe