Hello this is etched in today I’m back in minecraft forge one point when I’m morning tutorial today I’m going to be starting like a series of tutorials with in this series which is something that I’ve kind of wanted to do for a while and it kind of follows on from last Week’s tutorial it’s making like a proper structure GUI like rather than just doing these like things that aren’t really joined together or following on from each other I want to actually go into making something with this and so what I want to do is like create a like For example you create laptops computers gaming devices and those different things with gon minecraft and what I want to do is to create something cool what I’m going to do first is go through all those I’m really just going to be going through all the things and then You can put them into something but to do this I’m going to use the formatting of like creating a laptop because that’s something I have done before in a mod that was I did quite a while ago and I wasn’t really very experienced at a time And it wasn’t very good but i’m just going to use that because it’s a it’s an easy way to lay things out so i’m just going to create a block block lap we’re just going to call it out of its not even going to look like a laptop and not Even gonna text grips don’t really need to extend block or something you can do with these blocks to make it a lot easier to make them is to create a like a base he is shut shut up shut up shop computer make noise and like a base Block to like follow from like a class to just extend from to automatically have all the stuff that you need actually we need also needed to implement implements I tile entity provider because obviously it all need to be a tile entity I try a little provider at the end of ended message and Here we go we can’t really do anything here yet because we haven’t entered to create the tile entity so in here we want to create a toilet for your laptop tile entity and City laptop this this is just very like a drill with not like names for each one I guess like just Parts of each one so it’s all going to be part of like creating a laptop it’s basically gonna be this one because I’m gonna basically record it all and then split it in two different things different parts because all one tutorial and at the same time is not yeah this I I don’t know what I’m on about so this one wants to extent I’ll actually extends tile tactile and see what we’ll see if the layout of these tutorials and this noise is getting annoying on my Amir and then we can just leave that there for a second and make this return New tile ok ty tile entity laptop and then we actually create gy for it we don’t need these so let’s just call it jus I a laptop and this one is not going to extend to you I container like say we had here we were extending GOI container And here n container what we’re doing is extending it extends GUI screen because it’s not a container it’s just a basic GUI and these do is basically they’ve got loads of different functions you can have like a button which isn’t just about an it can be a button but it can Also be sliders and all that stuff check boxes and first GI screen we are going to have to override the init method in a Jew I first and what this method is is as you can see here if I offer a bit ask the buttons and other controls to the Screen in questions call with G wife displayed and when the wind with window resizes the button list is cleared beforehand because each one is help with a button list which is a list of all the like the components this this is the whole system for like months like mr. Crayfish device API dip device mod which we see in my device a pair of tutorials and it’s yeah you can see those and see how that kind of works and yeah and so we also want to override the render method which way we’re going to be doing All of our rendering actually what is it render do I know I know it’s dross draw something something like draw your screen there we go this is basically just the rendering method as you see here goes the screen all the other components in it the metals Exmouth y and render partial tix so what we’re going to do to start with is to just render like a tangle on the screen and you can also look through here the actual GUI screen class which you could open by control clicking on the GOI screen here and look through this see The kind of things that you can actually do with this stage or screen here just basically just look through it and see what you can actually understand because it’s not really it’s not really very um comprehendible if you if you don’t know what you’re looking at but yeah we can Just we can use gl11 to let change colors and stuff which pub opengl which is the psychographic is a java graphic system a i think is also yes it also instance like c++ and stuff but it’s a graphics asst graphics library that you can install actually so graphics and Audio library it’s also got open l which is open audio library yeah gl11 is the main thing you can so like g11 got OG we’d we don’t do our value yeah we can draw texted no we can draw mode we don’t need the texture so like we can draw a Modal rent with custom size texture to a scale custom size metal rack and then these texts rebuttal rent which are textured with using whatever actual texture you’ve got bound at the moment over we’re just going to draw a basic rectangle and we’re going to draw it at 0-0 oh wait yeah hold on yeah this one this one does also have texted you can’t actually just draw a flat rectangle and see how that’s George George textured textured but wrecked we’re going to do waste that’s a texture rectangle just drop jaws a text / as XY text right Height width x y UV UV we you can choose any of these but the one I’m going to use is different we’re going to put a 0 0 I’m going to make a text before it eventually but for now let’s put random numbers in here and Also like we can draw likes a text so font renderer bj dot your string so we can say drawstring at let’s a laptop we can draw a laptop at 0 0 and we can go color dot let’s just say black actually no that won’t be the best color let’s Join blue like a blue color and oh that’s that’s the wrong yeah we we we have done it all I’ve used the wrong class just get rid of that impulse you don’t wanna get rid of all of our imports just get rid of that import and We want to make sure using the right color plus which is colored blue so we want this one I think nope we want this is this something i always get wrong I think it’s all gal wjl util and that has to be kept alive Oh admit what I don’t Why why doesn’t this like the car that’s your thing I mean I told him if we just like add wait can we draw it without know hmm that’s actually really annoying because I’m not actually sure which class eaters so I want to do it in blue Buff on which okay go away right so import oh please work so we’ve done that one we’ve done that one we’ve done that one we haven’t done this one nope what about we’ve done that when I wrote it yeah it’s on nope always meant to be an int oh right i Just put one so i thought that meant to be color some color class um we should put one there i’m pretty sure that will / black i’m not sure but just put one because why not and we can also use the font renderer font renderer ovj to draw Many strings you can draw a split string string string string with shadow yeah but we don’t need to draw any more texts what we can the way that you actually bind something to the texture thing fine Oh is to find a texture what was it was It called texture oh god I had it there so it’s the texture manager I think text your manager yeah doc bind I’d way now we need to crane instance of it texture manager TM equals new texture manager and then we want to just stop get riddles manager no that’s annoying resor resource manager Wait notes I riedel’s furniture I wait the rioters there that should I i’m pretty sure i should actually be able to get us mere way autumn if we go up to here rizal onek private wait hold on we can can we get this from here actually call their resource this is something That’s actually kind of useful for these no recon what about the texture yeah oh okay it’s this dot MC okay don’t get see this this is something that’s such kind of useful to know this don’t MC get texture manager oh yeah I remember this am and then we can create a new resource Location and then we can just go to 60 m co lan sau brief to here and then we want textures /g y TN textures / DUI /a shape back grant back ground background dot PNG you can’t create an intricate texture but i’m just gonna pimp internet and create like some plain thing Actually what is the size of women too um where’s the open i wanna i wanna i want to just open this in its position actually no just joking and paid on it and just see the size of this image canvas size 256 x 256 okay wait no That’s yeah file you do 565 a t56 I man just ctrl + that we can expand our brush by holding what button I’ve forgotten so much this all the shortcut keys that okay did it did it did it do that’s that’s doing nothing all right wait hold all right Can hold ctrl show you increase by five okay and then we just about the background and create a little actually what’s the size of the Geo if this GUI I’m pretty sure you’re not actually meant to fill in the whole face the sizing of this one pixel off so that’s Pixel is 176 x 1 66 okay i want i want to be similar sized to this what you get when you’re opening in only venturi so 176 1765 166 so go and then i’ll just like fill this in with a grayish color and likes a border it with it oh geez no Don’t do that good quite a light gray and then we can border it with can do this and it won’t feel right oh oh yeah let’s just in color and border it is black I’m just going to turn off the filling on this so that it doesn’t draw shape Outline my hold on white why are you drawing the inside always it look is so one actually let’s go with three I think thrill dawgg nicer oh and then just move that along slightly oh and that all and there we go I just shove this to desktop for 20 Tutorial slc main wheels assets TM textures GUI and call it back background dot PNG you can make something intricate and cool but I’m just going to go with something simple like that because I don’t need it to be intricate and cool and stuff and then we are going to want Yeah that’ll draw the background of that so we want it to be from so the minimum is 0 0 0 a walls assigning of that I’m going to zoom in so I can get to a very bottom pixel so the very bottom pixel is A 176 and 166 okay Oh 176 Reggie and 166 there we go shut up and then if we run it will be able to see that we will have just a background rendered with hopefully a string on top of it actually we might not be able to sit spring I Should window know something sounds kind of useful in creating things like this run in debug mode we got to make sure you selected the actual this rather than this otherwise you’ll get that error you’re also going to have to make sure that you initialize your GUI properly so I’ve done that here you should got to add to your get serve GOI element you want to check if I DD equal equal to 1 return you GOI laptop and do the exact same down here and you get client GOI element make sure you set up the block To attach to you why to register the tile and the block tile entity here also make sure you make blocked I’ll entity everything’s fine in here oh you don’t want to put anything in here as I’ve done for and should make sure that’s all doing that open GOI here and here There’s nothing else we need to do in here and I think no there’s no and that’s good to go so as you be able to see in game if now right click on your block and you’ll have a little GUI here it will be all crushed up in the Top corner and it will be it will look like this if you use the like you can use any texture but like i’ll probably put those download link to this one in the description but like really you don’t need download link for this which I won’t put download link in the Description you don’t you can make this and paint now no not paid on it into work was made in painter you can make this in ms paint or something like that yeah as you can see it pauses our game you open it with something we don’t want This to you want and also it like it’s not into and it is like this in on but that’s just because we haven’t recited light moves that and it’s like the background is not all grayed out like you get in a normal GUI so for example if I open this backgrounds grayed out The games still running you can tell that it’s paused as well because our hand pauses and like this still running the game’s not fit for and you’ve got the background all right now it’s in the center so now we are going to make it centered and pledge work better Basically we’re going to make it work so we’re going to want to draw this halfway across the screen and the way that we’re going to do that if we look in a for example i just want to show an example for a sec so go to the GOI container Show you the GOI container class that’s what I want to do right yes no we can see it yeah we can see the background I’ve been drawn here we can actually can we copy this I think we can actually only probably good but this is slightly Different to this one too what I doing here because as you see here which binding texture and then just range or text actually that is exactly the same but yeah we’re just going to take these to hear these two variables here just because i want the actually I’ll just copy this here Because you want the width minus the natural size / 2 that’s just something that you would use all the time for for the GI positioning so where’s the Expos that’s the first one actually we don’t have reference to the excise of our yeah we don’t have reference to the X of this So we don’t have food you are now and so public let’s call it fro private prep private int X mg exercise private int Y sighs or you can call it width and height I’m just going to call it what oh right yeah it’s just wait what well it Where where is the stunning here um hold on ah IC IC IC way just this hello hello clips plus this dot X okay wait oh wait is there are you can you can get the wit night okay wait no because that’s getting the width hold on okay I don’t Know work I had a complete mind blank there and just completely full adages what we need to do is to create I’m just going to close off a few of these so jeez so what you need to do is to create two variables with the X&Y size of our Actual gy which is what ever sighs we made it so we’ll be equivalent to these values here 176 x 16 x is our sizing and then just do this top width which is something from the GOI screen class which will get you the width of the screen and minuses to exercise which get You this and divide that by two and just don’t hi my sisterwife’s i divided a picture and also you want to put good drawer default background here just believe it how it is to draw a as you can see here it draws the either gradient over the background or flat Grating over background up PNG something else you want to override is the does do i post game and here we just want to return false so that it does not pull da game if you do want your GUI to pause the game then obviously just don’t Change this or if you do change it just make it return true um yeah then we’ll have a screen drawing with the gy not pausing it and a background at bottom this is actually recorded quite a quite a bit after the it before in this video was recorded so I’m just going to Quickly say that this video is able Scott because i’m using premium for my entire i’ll show you this now actually here you can see that when i download install things i did a bunch of other stuff in store back to uninstall and when trying to fix it when i install Things is by now because some reason it’s not registering my license on this computer and i’m working on fixing that so for now i’m just using a trial version of premiere pro which i am able to access I can’t do that photoshop so yes sorry thumbnail this video is weird Hopefully it’s not because i think i will still be able to get that sorted with something like bo it probably won’t be as good and i won’t be able to make me new thumbnails if i do anything else until I’ve got photoshop working again but I should be able to get Working eventually yeah that’s basically it I know this oh yeah we can also what you can do is actually run this in debug mode and fiddle about with these if they’re wrong or anything and fiddle around with this to hear the sizing on this which I actually shown answer yeah We’ve got thing rendering in the middle of some reason and also it doesn’t force again you can see some reason that yeah still in the corner of summaries in the background like it thing and yet as you can see here we I’ll just feel around either what white and does this so That’s like say 100 on the X and then when it refreshes feel that way so 120 ish at all ok sorry press f5 on clicking your project and half life 0 1 30 or so I’m just going to move this down to like 100 I probably 25 yes party fun and 50 Ish should be good here nope little less say about 4040 should be good yeah that’s that’s ok i’ll mention me that’s why it’s not a little bit of padding bigger and then she said laptop me that around play around with it a little but pint this so the first thing we want to Do is actually not do this we want to do this dot MC know this don’t yeah i thought we could draw see down here Jordi for background Jordi fall back I’m pretty sure that’s problem that might not be I see here now it’s drawing the things About round I have to have that if you don’t want you but I think him just to look because I like it both you on the ad review itself because if day I I don’t want to over like the layout and stuff in this first tutorial and yeah I Think you very much more difficult matters with more so bogus and I will see you next time goodbye Video Information
This video, titled ‘Minecraft Forge 1.8.9 Modding Tutorial #15 – GUI pt1 | Setup & Design’, was uploaded by TheXnator on 2016-11-03 15:56:29. It has garnered 1972 views and 21 likes. The duration of the video is 00:24:41 or 1481 seconds.
Today I start a new sub-series within the series on creating a cool Laptop using the GUI functions! Managed to get Adobe Premier Pro working on a Trial and I should have it all working again by the time that trial runs out! ————————————————————————- Social Media Links: Twitter: https://twitter.com/TheXnator ———————————————————————— Channel Banner by SeaFox: https://youtube.com/c/SeaFox Buy GFX by SeaFox @ https://sellfy.com/SeaFox ————————————————————————