Hello guys and welcome back to the Minecraft Montori all in tears episode I’m going to show you how to create custom sounds for your entity as well as your blocks and other things in your game they can have sounds firstly we are going to go and create a sounds handler So go array until you tell handlers and create a new class called sounds handler call it sounds handle into the sound handler to avoid confusion with the original minecraft class the first thing you want to do is create some sound events so public static sound event Then the name of your sound event I’m gonna be in my Center once today so entity as an entity sound the name of the entity Center and the sound follower entity is gonna be ambience put a semicolon end control shift serves import sound event you want the net Don’t mind after you till one I’m gonna make two more copies of this one of them is going to be entity sent or hurt and the other is going to be entity sent or death we are then going to want the function public static void register sounds and our private function Private a static sound event register sound with the string name in between parenthesis this wants to return the sound event so firstly we need to create a resource location resource location called location so where the sound is located in your assets folder equals new resource location you want referenced Ahmadi followed by name So whatever wherever the sound is located this will always first look for your my ID it will then look for the sounds package and then it will look for the name inside of the sounds package nix sound event the actual sound event event is equal to a new sound event in the location Then we have to set the registry name event does that reduce your name to the name then register it with Ford registries Ford registries sound events register event and then return the event then in here you put and two-cent or ambient is equal to register sound entity owned in quotation marks entity Dots at the center dot ambient so what this is saying is in the sounds package it’ll be the entity package which will contain the center package will uncontained the ambient sound so give us a save we are then going on to go into our registry handler and Then register it in in it to registry that we don’t have yet so probably satisfied in it registries so this is going to be a sound handler so sounds handle dot register sounds then back in your main class you it put it inside in it registry handler dot innit registries that’s everything For the actual code now in the resources inside of assets TM you’re going to want to create a new package assets TM dot sounds and then also dot entity dot Center obviously you can put the sounds dot and then the other things but you’ll need to Put that where you register the sound as a different name such as block dot copper or dots break some inside up and then you’ll put this in sounds blocks dot copper but for now it sounds enter Center and I’m going to drag in my own sounds that I’ve created Using something like audacity these specifically need to be OGG files OGG so when you’re saving the file do file save as and save it as an orc means create an untitled text file which is going to firstly save it or write something random in it first save it as sounds decent and Just put it in your assets TM package on its own sounds Jason you want to close it and reopen it so you get the formatting from our JSON editor you’re going to firstly want to put the name of the sound so in quotes entity dot Center . ambient We have you remember is what we registered as whole after that then two more curly braces the category is entity the subtitle is entity dot center dot ambient come after that and then sounds : then you are important right on your brackets curly brackets quotation marks with the word name : then in quotation marks again hm : entity center ambience comma stream : true close curly bracket and close right angle bracket and that’s is a sound so we have the name of our sound we have the categories in its subtitle it just is name that you refer to in Minecraft if you everyone to play the sound and then the actual location of the sound file which hm it automatically looks for the sounds folder then entity sent our ambient we’re going to put dog here this is this minecraft nerves ambient dog and stream basically means that it will load Cricket into the game it’s quite technical if you want to research it just have a look of look it up it’s a million matter it’ll just make your game run a bit better now if you’re under the sound put a comma and copy everything here so entity dot center dot hurt Where will be entered Dustin table hurt in the subtitle and end Zoo Center hurts its location one more paste in remove the color from the last curly brace here change in antecedent or death until scent of death and ends descent or death and that’s all your sounds done So once you’ve created all your sounds put them in there and referred to them in the sound stop Jason you can now go into your entity center you find this sound event to get ambient sound and you actually just return sounds handle dot entity tent or ambient sounds handler Dot intent or hurt and sounds handler dots enter sent all death maybe I was semicolon each of them and now your Center should make these sounds sorry because made a mistake you pay shouldn’t have made this mistake but if you have go into your sounds Jason this Needs to be in your correct mode ID it’s a simple error that I made quite often since I have two different modules to do from mod Ivy’s what it wasn’t the best idea to be honest so make sure you have the correct mod ID referring to Your sound I won’t be able to find it in the next episode I’m going to be showing you how to create loop tables so your ends tea and other things such as blocks can drop run different and items randomly at different times so that we’re really cool if you’re excited for That leave a like down below I will be uploading the videos three days early on my patreon so if you’re interested in seeing them a few days early awesome other exclusive content you can check it out on the link down below if you want see any of the code once again you can Check out my github just Auto link down below and also thank you for watching this video if you enjoyed leave a like down below and subscribe for more content I have been Harry thanks for watching and goodbye you Video Information
This video, titled ‘Sounds – Minecraft Modding Tutorial 1.12.2 – Episode 12’, was uploaded by Harry Talks on 2017-12-13 16:07:04. It has garnered 10732 views and 158 likes. The duration of the video is 00:10:27 or 627 seconds.
Thanks For Watching the sounds tutorial. I may go back to entities later on but I would like to keep things moving along.
Links Patreon: https://www.patreon.com/harrytech GitHub: https://github.com/HarryTechRevs/MinecraftModding/tree/HarryTechRevs-1.12.2-Tutorials Discord: https://discordapp.com/invite/xwg8zQJ Playlist: https://www.youtube.com/playlist?list=PLiDUvCGH5WEUEV9nc0Ll2pzUFmSFc21uR Subscribe: http://tiny.cc/sub2harrytech Twitter: https://twitter.com/harrystechrevs