Hey everyone this is Neil coming back with another episode coming back with a wicked cases of plague my apologies for not answering YouTube comments and putting out videos lately but I’ve had a really shitty few days and it has just not been easy fighting off this crud Whole house has just been afflicted with it but I’m feeling pretty good tonight so I figured I’d jump on here and we get some get some work hammered out here on this dual input furnace so where did we leave off I think we just got it to the Point where we could get into our furnace in the real world when we could drop stuff in but nothing happens of course because nothing’s in our tile entity so we’re gonna need to tune that up a bit this is something else I was helping out look and I’m sorry brother I just cannot figure that out for the life of me but I haven’t given up yet I’m gonna go through method by method and work it out so let’s see here tile entity we don’t need that container there is something that we need to do on The container and this is again gonna be something that we just copied directly out of the excuse me no what the is that called out of the container class for our furnace so we’ll go into reference libraries and I did this I did this for the last furnace as well this is the Transfer snackage slot really what this allows you to do is to shift-click items in and out of inventory slots without crashing it right it automatically knows hey I better move this down to inventory it so on and so forth but I’ll kind of show you what’s not supposed to happen What the am i doing up here on this that’s weird your subside shine up a disk so there we go we can put stuff in right but as soon as we shift-click the implosion and really we’re just gonna running into all kinds of trouble with our slots and our containers so we’ve Got to that up and like I said what we’re gonna do is we’re gonna copy this method straight out of Compton no straight out of the furnace glass looks pretty familiar right so public items stack transfer stacking slot we’re gonna take this method we’re gonna move a right over here sugar let’s say That let’s run it let’s test it out see what happens what if I lost that entire stack as well so to do with that if I’d out I surely did so now we should be able to yep click out still doesn’t know exactly where to go because we really haven’t Specified what these different slots are right we’ll do that we’ll do that we’ll get that worked out don’t you worry about that another thing is is actually if I do this until we exit the game right so I’m leaving that in the slot if I exit the Game and they come back in it’s gonna be Cod that’s because we haven’t done our read or write to NB T’s yet and I’ll entity but we’ll do those you’ll probably actually do those right now get that out the way so our container is coming right along We got that treads for stacking slot we’ve got to add crafters to crafting there’s a couple of things left to do it here but we’re not going to do those right now because that actually pertains to updating furnace states and stuff like that so we’re gonna hold off on That let’s actually head over to our tile entity and get rolling on that so when we added our unimplemented methods we added a whole bunch of stuff in here and we need to really kind of go through and tune a lot of those up we’ve actually done quite a few of them Already we need to do to get stack and slaughter clothes like we’ve done this we’ve done this we’ve done this you’ve done this oh well we actually I’ve done quite a bit adhere heavily well sweet we need to get I to power we did the has item power so we actually have indicated What our fuel is going to be in this so that’s cool let’s do this let’s work out this method to get stacking slotted closing and dudududu – where is that method where’s it at there we go there we go I know where we’re going here so we are Gonna return though eventually but we got to do some stuff first so really what we’re gonna say is we’re gonna start out with an if statement so if slots of I is not equal excuse me is not equal to null then what we want to do is We’re gonna specify an item stack and we’ll just name an item stack that’s pretty easy is going to equal slots of I just gonna give us error because it’s looking for VAR what’s will just change that to I and then we’re going to say that slots of I is going to equal though No whoa I put it extra set of brackets there it’s going to equal no and we are going to return item stack else return null there we go that method is done let’s do our NB T’s let’s get those out of the way we’re Gonna do our right to NB t and our read from NB T so we’ve talked a little bit about NB t in the past and so really what we’re gonna do is we need to go through a reading to find out hey what is in each and every slot in here and we Want to make sure that that is preserved in those slots we want to make sure that’s preserved in our slots in case we exit the world when we come back to it stuff like that most common examples that your guys are used to of seeing mb T in action is a chest right you that’s where you put all your right you save it for later right if you ever look at my chest like in games for those of you who played on the server when I could actually get the thing to Stay up and running you know if you ever looked at my chest you’re like dude this week on hoarders I just got tons of in there us I digress public void read from enmity Christ on a cracker I cannot spell for read from Ed bTW And this is going to be EDT tag comp out it’s gonna be the type that we’re working with and we’re just gonna call it a BT because we lazy we lazy like that what some imports and we are going to say super dot read from Ed BT and we are Going to read NBT in so this is us actually reading in the stuff that’s been saved right what we’re gonna do is we go to specify ed BT tag list like so and we’re just gonna call it a list and so we’re gonna say NBT what we declared Up above dot get tagged list we’re gonna say items ed Ted like so and then we’re gonna say slots is going to equal a new item stack and what we want to do here is get size inventory the method like so have we not done that Yet why does it not like that Oh cuz we want to do item stack that’s why that’s why let’s import that get that out the way so what we need to do now is we need to go through we need to check each and every slot right let’s go in and grab All the stuff out of those slots let’s put the read about or go through and read everything out of them bTW I’m thinking of right already let’s go through and read everything at our NBT tag list and let’s pull it out and put it into the slots so to start this out We’re gonna do a for loop as we pretty much always do when we’re iterating three through things so we’re gonna say I is less than n BT tag list no that’s not how I named it list tag count tag count and that I plus plus I pissed my operator here so there we go it likes that move this down so what are we gonna do we’re gonna do EDB T tag cop-out Cobb how’d that we are going to call this we already opened up one of these right here we’re gonna actually be Opening up another one so we do want to actually need this something different how by spelling this wrong compound and BT tag compound maybe it’s because I haven’t specified anything on here so what we’ll actually do is we’re just going to call this V t1 because I said So we’re gonna put this in a cast and our cast it and we’re gonna say NB t tag compound list dot yet compound tag at and that’s good to be I like so we’re going to do we need to take out this extra guy right there we are going to do A bite type bite and we’re just going to call this B 0 and we are going to say add BT 1 dot get bite and it’s going to be the slot because that’s what we’re Navy it we’re maybe slots that items that are in slots We do a little if statement so if B 0 is greater than or equal to 0 and it is also less dad slots dot length slots dot length it would help if I did this slots dot all slots not lengths thank you then we want to say slots b0 this is Going to be items stack dot load item stack from NBT and this is going to be our NBT one right here boom do that do that ting we’re gonna move down to curly braces so one right there – right there and we’re going to specify That dual power is going to be Ed BT dot get short what do we did this did we dave this yet oh no we did because this is we we will actually name it would we write to Ed BT so we’re just caught power tab we came At hammer time if you wanted to all in favor the nays have it sorry dual cook time is going to be let’s dab this cooked hide alright so let’s see here and that pretty much does it fro or read for bed bTW so this is Where we get all the stuff out I really should do the right first I did that last time and I really should do that I should do the right first so that way you’re understanding how this data gets put into ed BT so we’re gonna do NB t Tag compound to get and we could still do NB t because it’s a different method right so that’s not a big deal so what are we doing we’re putting stuff in super dot right to NVT what are we writing into NB t we were gonna be ready Add BT pretty easy it helps when you spell it right you if if you’re just now joining us before warning it really really shitty typing skills is that short power time so we’re specifying hey what is this NB t we’re calling it power time and it is Going to be we’re gonna cast it as a short shotty a short and it is going to be dual power so this is a variable that we specified up here up top right our dual power it’s really just our power what is our power add right So we’re saying hey we’re going to put in these values into ed BT we’re gonna debit power type over it’s going to be the value of that easy squeazy ed BT dot set short short and this is going to be our cook tab right so when we’re when We’re looking at our GUI right here what are we putting in there we’re putting in this info you can’t see that we’re putting in this info right here right this is our cook type and then we’re also putting in this info here this is our power time right so that’s what We’re putting in this is well we are going to cast as a short and this is going to be dual cook time I believe is what we named it yeah dual cook time let’s just do this since I’m having trouble here sorry for the excessive use Of grossest ed BT tag list and we’re just gonna did this one list is going to be equal to du + BT tag list you’d call that right there so we are going to say 4 and this is essentially where we’re going through we’re doing our slots We’re putting all over the stuff that’s in our four slots into ed BT I have straight hair on my face for it I equals zero as long as I is less than slots dot length so we’re gonna go each and every we’re gonna go through each and every Slot we’re gonna iterate right there so what are we gonna do while we’re doing this well we are going to say that if our slots are dull we’re not going to do anything right we’re just gonna skip past this so we’ll say if slots of I is dull or no we’re gonna say If it does not equal null if it does not equal null that what we’re gonna do is we are going to say NBT tag compound and we’re going to use the same thing as before NBT 1 right and bt 1 is going to be equal to a new ed BT tag cop-out Compound and so we are going to say NB t 1 dot set bite is going to be slot and it is going to be cast as a byte whatever is in I just like so whoa I like that get rid of that so we’re going through we’re looping through We’re gonna hit the first slot which is going to be slot 0 which will be this guy we’re gonna put it in we’re gonna say is a slot and then it’s this right and we’re essentially going to do that on slot 2 on slot 3 well on slot 3 and Then over here on slot too far slot 4 right there USB sweet and that we are going to say list dot append tag and then whatever and me is in NB t1 just like so that’s it so if that slot is null it’s just gonna skip this it’s Not actually gonna say hey this is an empty slot it’s just gonna move past that right we’re gonna move down to braces like so and we are going to say that NB T dot set tag is going to be items and it is going to be our list Like so that is our right to NBT method so this shows how it puts all of that data in this is how it pulls all of that data out so we’re go through and we’re grabbing the information or getting whatever is in slots and then we’re actually say That that slot is going to equal to that byte as we just go through and loop through this this for loop whatever’s at slot 0 gets in slot 0 1 1 2 2 3 at 3 sweet right I think I said 4 Over here 0 1 2 3 for a total of 4 yeah that’s how it’s gonna work because arrays always start with 0 I’m gonna go ahead and leave it there and I’m gonna get this bad boy uploaded for you this is veal sorry it took me so long Hopefully tomorrow I’ll have some time to get through and check all your comments get caught up on my email and all that chess like comment subscribe it I’ll see you next time Video Information
This video, titled ‘Minecraft Modding Tutorial 1.7.2 #31.6 – Dual Input Furnace’, was uploaded by Neale Gaming on 2014-06-11 16:09:06. It has garnered 957 views and 17 likes. The duration of the video is 00:22:06 or 1326 seconds.