What is up all my geeks and gamers techy 10:19 here coming at you with another Forge modding tutorial now last time we left off we created our custom chests but I forgot to show you guys how to actually do the textures now the textures fit a large chest I’m gonna Do strings dot my d + : textures / blocks / I think I called it this I’m gonna use the texture from my other mods so large public chests and we’re just gonna copy this one over and paste it here and then do just public chest textures okay that’s one thing now we Had to fix another thing we had to fix is in the tile entity let’s see we’re just looking for any other thing oh yeah okay in the tile entity let’s just do this I guess at the bottom we have a few lines of code that I actually forgot to Do and this is required otherwise if you put an item in the chest and then you log out and then you log back in it won’t save what was in there so we’re gonna go public item items stack yet stack in slot int par 1 and don’t mind My dogs if you heard them return this dot chest contents which it should be already there and par one okay there we go outside of that we’ll have public itemstack again Dieker stack.size inte R 1 R 1 into part 2 and in here we’re gonna have if this chest contents Par 1 does not equal null this dot chest contents R 1 equals no and this dot mark dirty and we’re gonna return items Jack I am stuck and I forgot in here where’s in here oh whoa I just I’m sorry well I just skipped an entire thing If this chest contents par 1 does not equal null then we’ll return item stack oops stack item stack there we go and then we’ll have under here yeah right oh no no take these let me just take those inside of here we’re gonna have if this dot chest contents power 1 Dot stack size is less than or equal to part two then what we had before and return I don’t stack I can stack what’s up here oh no I’m doing that later okay then we’re gonna have an else item stack equals this dot just contents are one dot split stack part two There you go underneath that we’re gonna have another if if this dot chest contents are one dot stack size equals equal to zero then we’ll return this the chest contents are one equals null and then under here we’ll have this dot mark dirty and return itemstack and then we’re gonna have Underneath I believe under it down on this one right yep else return no there we go why doesn’t it like itemstack why doesn’t it like itemstack let’s see I didn’t change anything what’s different about that if just just more spread out oops what did I what did I do That’s different than that after it declared the itemstack I had dead that turn I know stack else I am stack use this such as consciousness that’s what stack equals null can I mark dirty and I’m not returning I up stack what the hell I don’t change anything when I’m pasting That you know when I paste that it’s not changing anything like at all oops wrong thing what the heck what’s different than I’m cop when I’m pasting here this justice contents Harlan does not equal null itemstack itemstack if this judge has contents that stack size and Stack I don’t know but you could just basically you get the point here um this is what its gonna be basically I don’t know why that didn’t work anyway and that’s basically it for the chest so let’s just make sure that that worked I didn’t put the thing in though let’s Just throw that torch in there save him quick and open it back up look inside the torch is not there great I think I also need yeah there’s a couple more actually yeah there’s two more lines of code actually so let’s do that right now public itemstack get slot nope nope get Stack in slot on closing inte r 1 if this dot chest contents one does not God does not equal null then items stack item stack equals this dot chest contents are 1 this chest contents are 1 equals no harlan equals null return item stack and then we’re gonna have an else Return no there’s that one and then the last one is public void set set inventory slot contents into par 1 items deck item stack and that went up this chest contents per hour equals itemstack then if itemstack does not equal null and itemstack dot stack size is greater than not question mark Greater than this dot get inventory stack limit then we’re gonna return item stack that stack size equals this dot get inventory stack limit um this mark dirty there we go now it should work yeah it still be gone so let’s go into game mode creative and we’ll just take some laughter just right There take it log off oops wrong file that one again and the lapis is still there there we go okay finally done with that Oh righty okay now we can get to the main point of today’s tutorial even though that part was like 15 minutes Because we had to add a lot of code there also basically what that code was just saying is that it was asking if it was asking you to get the stack that was in there and decrease the sack size when you take something out of it and Basically get the stack that’s in each slot there so yeah that’s basically what all that was saying so now in the main package we’re gonna create a new class called crafting manager yeah now I’m sure a lot of you guys are very excited about this since I’ve been asked you know you Haven’t added the crafting or the smelting or whatever I said I was gonna get to it and I’m getting to it today so let’s do this public static void main class by the way if you’re not doing the setup like I am once again this would go In your main class all of this other than what I’m just typing right now the crafting recipes and the smelting recipes would be in your load method of your main registry so again here after you register all of the items and stuff okay so public static void addict Void and we’re just gonna do that crafting recipes boom boom boom and we’re gonna go game registry dot add shaped sippy I guess yeah cuz pickaxe is shaped we’re gonna start with the pickaxe and the output is gonna be a new item stack since it’s an item stack and This is going to be sapphire ie Tom’s dot we need pickaxe sapphire Shh yeah there yeah and then after the comma and I just import item stack they’re the parameters so here’s what it’s gonna do okay so we’re gonna do a quote a comma a quote a comma a quote a Comma and then a single quote and that comma and yeah well fill this in okay so in here what these quotes are it’s the positions on the crafting table so for a pick X we want on the top we want three ingots across so we’re gonna go SSS let’s do that okay actually let’s do III because we’re gonna use s per stick so for something in the middle of the crafting table we want to type of space and a little s and a space and same thing through the bottom space s space And then the single quote is gonna be what okay so we’re gonna do I and this is gonna be what I equals so it’s gonna equal sapphire items dot we need the ingot sapphire ingot and then this s is going to equal items dot stick and we’re Gonna go like that and we’re gonna close it and that’s basically how you add all the crafting recipes so but for something like a sword where it’s actually not shaped like you could put a sword down the side or down the you know in the middle or whatever we’re gonna do Dot add shapeless recipe and this is gonna be a new item stack and this is gonna be use anything so far items dot sword and this time we’re just gonna go like this the parameter is gonna be you’re gonna have an ingot and ingot and A stick on the bottom and I believe this should work hopefully arcs and then we’re gonna declare what I in get and the S is going to be um that’s dick yep let me make sure that actually worked so I mean just this second it’s not gonna Be in there what let’s figure you just make sure that’s not like you can put it anywhere on the thing oh my god my dogs are so annoying they never stop barking Jesus Christ all right let’s get out of crafting table let’s go into our tab Let’s take one of these and actually we need two of those and a stick my chest boom buy-in that work what happened weird why isn’t it working oh I know why because in my mind I just you have to be like this crafting manager dot in class there you Now we can open it up and let me make sure that it works but what happened what happened why is it giving me an error crafting manager at shapeless recipe invalid shapeless recipe what does that work how’s that I’ve done this before with boots and I had to do a shapeless recipe Otherwise it was gonna give me like it still gave me an error how do you do a shapeless recipe hmm shapeless recipe okay why can’t I go into gameregistry uh let me figure this out and I’ll be right back alright guys so I’m back and I figured it out now you don’t actually Have to make it a shapeless recipe it can be a shaped recipe um but you all you have to do is just don’t put any spaces and it’ll allow you to put it anywhere that you want so registry and you know what I’m just going to speed up this part really quick Just so that you guys don’t have to watch me just enter all the things cuz it’s basically the same exact thing for everything you know the recipes and then I’ll come back to you guys later and I’ll show you how to do smelting recipes and just Like I’m glad you get us to look at all the recipes so I’ll see you guys alright guys so we are done with our crafting recipes and as you can see when I went to my boots as well as my helmet I only did two and that’s because the Helmet can go three on the top row and two in the middle or three in the middle and two on the bottom and same thing with the boots it could go two in the top two in the middle or two in the middle two on the Bottom so that just tells it that I could go any row now I had smelting recipe you would only need this if you’re or could be smelted but I’m gonna add this so that just in case you have a silk touch pick that you can you can Smell ear or down into ingots and this is very simple it’s just game read history registry dots and smelting and this is gonna be the input sapphire blocks dots so if I or oops dot sapphire or output will be new items item stack public items dot not public damn it Sapphire what am i doing I can just paste it dot sapphire ingot and this is going to be uh and this is good one because it’s gonna return one of them and the XP and we’re gonna do ten experience not like experience experience but like you’d experience You get the point and there we go so let’s run our let’s run our client here there you come on – ha and let’s just grab a bunch of ingots and we can throw them in helmet boots once again the boots will switch as well as the Helmet we can do our chest plate everything is yah and now let’s go get a friends and we’ll get some coal let’s just get a block of coal and we’ll get some sapphire or here and let’s just throw that down throw it of those and Throw it of those in let it smelt down there and as you will now see we will get our ingot and there we go so that’s just about gonna do it for this episode thank you guys for watching don’t forget to hit that like button if it helped you Subscribe for more tutorials and I’ll see you guys next time peace Video Information
This video, titled ‘[1.7.2]Minecraft Forge Modding Tutorial #8 – Chest Fixes, and Crafting/Smelting!’, was uploaded by techgeek1019 on 2014-05-02 00:29:57. It has garnered 4001 views and 23 likes. The duration of the video is 00:29:18 or 1758 seconds.
Check out the other tutorials here: http://bit.ly/TechgeekTuts
Don’t forget to Subscribe: ►►►http://bit.ly/SubToTechgeek1019◄◄
src code: http://bit.ly/ModdingFiles
Social Media ● Twitter: https://twitter.com/techgeek1019 ● Facebook: https://www.facebook.com/techgeek1019youtube ● Instagram: http://instagram.com/techgeek1019
Intro template supplied by GoldSolace: http://www.youtube.com/user/GoldSolace
Intro Music by Approaching Nirvana : http://youtube.com/user/approachingnirvana Song: Tracer Buy it here: http://bit.ly/1223eap
Song used during video: Sugar High by: Approaching Nirvana
Thanks for watching all my geeks and gamers! Remember to rate, like and subscribe if you haven’t already!