Let’s add an advanced block to Minecraft Minecraft modding courses with close to 100 topics ranging from Custom tools and armor to custom block entities all the way to custom mobs Linked In the description below oh right we finish this back into the other ones more in this tutorial we’re gonna be adding a Custom Advanced block to Minecraft which is going to be a block that has its own separate block class so this is very similar to the advanced item in the block package we’re going to right click new package called custom once again this is just for organizational purposes Only and inside of that we’ll make a new Java class and we’ll call this the sound block once again the convention is to end this with a block over here the name of the class highly recommended and then this will extends the block class right here from net Minecraft block we’ll Hover over this create Constructor matching super and with this a custom block class has been created however of course no functionality that’s not going to stay this way because what kind of functionality can we add well a block actually offers us an insane amount of Stuff and we can see this all in the block class itself so the middle Mouse one click on this you can see all sorts of methods that we are able to overwrite over here including for example in the abstract block class as well where there are even more methods to overwrite which Is absolutely freaking spectacular macular and the unused method is the exact method that we are going to use because this is called when used by the player that means that when you right click on this particular block I also highly recommend checking out the Java dock over here because that’s just Really useful to know what the different methods do and mean and we are going to override this the strikethrough here can be safely ignored because in this case the method is marked as deprecated however that only means that you cannot call this method you can override it to Your heart’s content we are going to return the action result of success right here and then we will play a sound when the player right clicks this particular block and for this we’re going to say World dot play sound passing in the player over here then the Position we want to call the sound events Dot let’s call block underscore node and let’s how about we do the xylophone over here data value that’s very important that we call this and the sound category is going to be blocks and then in theory we could keep it like This or we can add two more floats and that’s going to be the volume as well as the pitch so you can change those as well in Minecraft sometimes the pitch is changed randomly so it gives a random number between 0 and 1 to well get the Illusion that the actual sound is a little bit different and that is the sound block pretty much done of course we still need to add it to the modblocks class registering it properly so let’s just copy over the raw Ruby block over here and we’ll call this the sound Underscore block of course changing the name here as well sound underscore block and very important changing the new block to a new sound block right here otherwise it will not work and then hear the sounds I will just keep the normal sounds from the iron block and that is Pretty much what we need to do of course adding it to the item group and then all the Json files there we go added the block States Json file the translation the block model Json file and the item model Json file they are all the standard ones so no worries at all and Of course the texture will be copied over as well that is going to be available to you in the description below for download as well and those are all the steps that we need for the advanced Block in this case as is a fairly simple and straightforward block Class over here so let’s jump into the game and here are some block all right fans back in Minecraft and as you can see the sound block has been successfully added to the game and if I right click it that is the xylophone absolutely Works No worries at all and that is a custom Advanced block added to Minecraft all of the code is of course available to you in the description really in the GitHub repository but that’s gonna be it for this tutorial right here next time in this video we will make a custom and Yummy food item hope to see you there so yeah Video Information
This video, titled ‘Fabric Modding Tutorial – Minecraft 1.20: Advanced Block | #7’, was uploaded by Modding by Kaupenjoe on 2023-07-25 14:59:53. It has garnered 1418 views and 54 likes. The duration of the video is 00:03:38 or 218 seconds.
In this Minecraft Modding Tutorial for Fabric, we are adding custom Advanced Block to Minecraft 1.20. Which is getting its own custom Block Class allowing us to add incredible functionality to it such as right-clicking :O
== 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/Fabric-Tutorial-1.20.X/tree/7-advancedBlock Assets: https://url.kaupenjoe.net/mbkj59/assets
== SUPPORT ME ON PATREON == ▶️ https://www.patreon.com/Kaupenjoe
== 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 ▶️ NEW Fabric Modding with Minecraft 1.20.X: https://url.kaupenjoe.net/CourseFabric120X ▶️ Complete and Roblox Lua Game Development: https://url.kaupenjoe.net/RobloxCoupon * ▶️ Learn Forge Modding with Minecraft 1.18: https://url.kaupenjoe.net/CourseForge118 * ▶️ Learn Fabric Modding with Minecraft 1.18: https://url.kaupenjoe.net/CourseFabric118 *
== SUPPORT ME ON PATREON == ▶️ https://www.patreon.com/Kaupenjoe
== 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.
== 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