Hills gone engaged 30 works here and welcome back to another minecraft modding tutorial video for one point twelve point two and in this video we’re going to be going over overriding vanilla crafting recipes or removing them in this one we’re just going to go over removing them because then go ahead And replacing them is just a very easy thing to do and there’s no point in me going over because all you need to do is just create a recipe so it’s quite simple so let’s get started in our events package we want to go ahead and Create a new event so a new class and we’re just going to pull this and override the recipes all right just like that and in here we need to do a at subscribe subscribe event and they need public avoid register recipes just like that and import subscribe um now inside Of our parameters we want a registry event this free event and in here you want to perks you want to put dots register and in here we’re just going to put recipe and on the outside if I have done this way out i recipe I mean and just import That get a save inside of inside of here no one’s going to put I Forge recipe registry modifiable mod registry now why does it keep doing these we don’t want that mod a registry is equal to open brackets and put inside these brackets I forward to registry modifiable and on The outside the event dot gets registry just like that give that safe then you would go ahead and create a void so we want public static Boyd remove recipe and in the parameters you want i forward registry modifiable and we’re gonna call that mod registry we want resource location recipe and we want String mod ID import resource location in here we want to put a recipe and we’re just going to call that P is equal to in brackets I recipe on the outside put mod registry don’t get its value of recipe just like that and then put mod registry dot remove recipe and then mod Recipe mod registry dot register dummy a recipe or we’re just going to call this test a recipe dark from pee now obviously we don’t have tests recipe so we need to go and create that so in our recipe class we’re going to create recipes package we need to create a Class called test recipe this needs to go ahead and it extends I Forge registry I Forge registry entry dot i m PL implements i recipe and implements a recipe and just pimple all of those in here we want to put private final item items stack and call that output then we Want to create be constructor so test recipe and in the parameters we want to put our items tech outputs and we want to do this dot output is equal to output then we need to go and create a public static eye recipe from and in the parameters per eye recipe Other and and return a new test recipe of other dot gets recipe outputs and then the outside put dot set registry name to other don’t get registry name that save then we need to we need to do matches matches yep just like that and we need to return bowls we need get Crafting results and in here we just need to return item stack empty then we need to do can fit and in here we need to go ahead and return false then we need finally get recipe output and in here you need to return output give that save now we need to go and Call our remove recipe so let’s just import this class and then yet we need to call test recipe dot what so you need to call a remove recipe just like this so you just type in remove recipe and also remove recipe and it’s that one right there this is just wanna put mod Recipe and for the recipe you want to put new resource location new resource location and this is the recipe or the the location of the recipe you want to remove so if you’re going to reference libraries food source assets minecraft recipes you can see all the recipes here So let’s see what what can we remove Blue wall no no that’s kind complete no it’s not actually ok so we’ll put in here for example minecraft blue underscore what that’s it now for the mod ID you want to go ahead and put a reference don’t mod I I can give that save obviously we need To go ahead and we need to cool this so if we go over to so just collapse all of the reference libraries yeah so we need to cool I believe we need cool remove recipe no we don’t need to I think maybe we need to make this a subscribe event So I’m just going to run the game and I’m going to check that that’s what we need to call it base a guy’s house going to the game Oh bums it didn’t work because it’s like that so that’s probably because it hasn’t been registered and so let’s not make this a Subscriber and the we actually shouldn’t affect ok this is my bad so this doesn’t need to be in this class so let me just get rid of that well it can be in this class actually because it’s static yeah that’s fine that can be in this class so Let’s go to our registry handler I think it needs the registries going post in it let’s see I think they do they might go in in it actually not post we look at our head loose it’s not impre– I was in in it okay so at the bottom of in it’s Actually no before you’re smelting recipes but after your register ring up the GUI handler you want to put see where’s our event handler because we actually need to put it in the event handler right so let’s call death override recipes and pull the recipe event equals a new over I recipes okay And before these we need to put minecraft forge dot event bus dot register recipe event just like that and actually you probably want to put the loot event and a for example event okay it just like that and then inside of in it’s just after here we want to put over Ride recipes dots remove recipe I know it has arguments We didn’t set this as static right to be set anything static no okay the best way to do this then actually be to go ahead and put this method inside of our registry handler like that therefore we can do this dots and then we can’t be done we can do registry handler dots Remove recipe we still can’t do like set has prompt I feel like we should just be able to make this a subscriber hood apparently that doesn’t work all right let’s try that let’s try as a subscriber then and just keep this in here and then obviously because we are cooling this in Our event handler now it should have fixed so I’ll see you guys back in the game oh we have errors huh you mean what in it registries go where you go I got rid of it apparently I meant just get rid of this lightly oh my Bad okay yeah I’ll see you guys back in the game hey so I think that I was very stupid and you guys probably realized this but this can’t be a subscriber been the cause it has no event parameter yeah so we have to get rid of that but we Somehow have to call this so what I’m thinking is we get rid of that we go to override recipes and we put it in override recipes we need to tell it what the recipe is so we can have for example it should be at our resource location Recipe that allows for the recipe to be there wait if we I think I’m being stupid wait once happened if I do this get rid of that from that okay okay I just realized how stupid I’ve been get rid of that that’s what I you guys Can officially class me a stupid and I will happily take it because okay okay so basically the issue we had is we needed to call this method but the thing that I did wrong was I tried to put this line of code in our remove recipe hit Method which meant that this never got called this whole method never got called and we had errors with these variables not being you couldn’t access them and honestly we can’t make this a subscribe event because it has three parameters and none of them are an event parameter can’t actually have three Parameters for an event so I did many absolutely stupid things but now I believe they should work if my stupidity has kicked itself out so I’ll see you guys in the game for the 98 million billion trillion time all right skies we just got in the game and if we hadn’t Opened the crafting table and we put this like that we see it doesn’t want but like that doesn’t work if you just wait for this to scroll through or wait for it to go back to lime you should see that blue is not on there gray cyan Black yellow red poop pink should be getting to the end lime and yeah blue wasn’t on there and so we have successfully removed the blue recipe now you officer you can go ahead and actually replace this recipe with whatever you want and that will work Fine so if you guys did enjoy this video please do be sure to smash your face on tube onto into that like button and subscribe if you really enjoyed please do be sure to share it and I will see you guys in the next video so good bye guys Video Information
This video, titled ‘Minecraft Modding Tutorial 1.12.2 – Episode 31 – Overriding Recipes’, was uploaded by TurtyWurty on 2019-05-20 19:38:01. It has garnered 1806 views and 25 likes. The duration of the video is 00:19:20 or 1160 seconds.
Hey guys, TurtyWurty here! In this tutorial, we go over overriding vanilla crafting recipes. Remember, if you guys have an issues/problems or need support, or just want to chat, join my discord server via the link below. Also below is a form that you can fill out for what videos you want to see next and in the future. If you want your suggestion to be taken into consideration, make sure you put it in the form and nowhere else. Also if the code is not working or there is a piece of code which I have said to copy, you can find all the code from the GitHub below. Hope you guys enjoy!
My Discord Server: https://discord.gg/d5cGhKQ My Personal Mod: https://minecraft.curseforge.com/projects/minecraft-madness-mod/ GitHub: https://github.com/darealturtywurty The form on Video Requests: https://forms.gle/9RyzCgjEvmGpGjrE8 Also, this song is great(Pegi 16): https://open.spotify.com/track/2S1LebN6AXXQqJolBxlWgO?si=zVjDpcstRy-tvb6qrRJz3w