I guess your material kingdom minecraft monitoring and teach you how to add Gy to your talent e so we’re going to make a new package now it’s going to called client gy now we’re going to have a handler in here called add Gy handler this must implement igy handler control shift Oh Add the unimplemented methods like so we now need to register this let’s go over to a proxy it’s a client proxy do it in the init of a client proxy and all it is network registry dot instant dot register GUI Handler and mod it’s just a bit of everything dot and it’s that Instant thing right here this bit right here use of GUI stuff and handler is just a new GUI handler like so now that is our py handler registered the client the server – UI element is basically the container and client side Seattle GUI so we want a public static final int and We’re going to have an ID for our block break so I’m going to call it rock on school breaker and that’s going to have the ID of 0 now what we’re going to do here is if the idea is given is the block breaker ID then we’re going to return a new Container khon kaen block breaker the playing through is player dot injury and that’s just our talent T so that’s world get tile entity at new block cars X like that and I’ll get us a cast this one and like so and that’s I contain and now Registered and now we need to do vgy need to actually make a DUI though so let’s go into here and I call it GUI block breaker we’re going to make this extend DUI container control shift code import UI container now go GI container acts can make us out Of constructor that’s got the container in we don’t want this here what we’re going to do is going to get the eye inventory the player inventory was going to get the child entity fatale entity block breaker te here we’re going to make a new container so new container Block breaker with a play in three and it’s silent T going to also store the talent she said private and tile entity book private car entity block breaker te one thing I forgot last time this T equals T E and like so this is going to Make us want to add a method drill contain background layer we also need to store the players in torus of private I inventory layer in I’m just going to set that so this stop playing player ins now I need to set the X&Y size of a DUI so go to exercise Let’s bring this up so the exercise is whatever value is right here so it’s 175 and the Y size is thing is actually hundred times six and I think these are supposed to even let’s just do one more in this one we’re going to just make sure have that great background thing so GL state manager dot color we’re going to do 1.0 1.0 1.0 and 1.0 s which will make a transparent background we’re now going to bind the texture of a GUI so so I’m now going to get our block breaker PNG file we need a new folder you’re Going to call it qi inside to you why you’re going to have another new folder called container and this is inside of our textures folder by the way so that should add that we’re now going to do this MC dot get texture manda dot find texture new resource location reference Mod ID and all it is textures and GUI container block unschooled breaker dot PNG within now going across this dot draw textured model rect believe it this one so the x-coordinate is this GUI left this GUI top the menu zero zero this the exercise and I’m going list up why size Like so okay so we’re now going to draw the foreground layer so we’ve just drawn background now we’re going to draw some strings on top which actually are the front of it and so you and now this wouldn’t actually do anything until we add a method called Arms lock activated so that’s when you right-click it we’re going to do if the world in that is remote with an exclamation mark so it’s not we’re going to do failure in that open GUI the mod is just bit of everything dot did I spell something wrong Oh Biff bit of errand dot instance the gy ID is going to be Gy handler dot clock breaker the world is world in the X Y Zed is parsed get X class let’s get Y path of get there and like so that will now open a GUI this is great guys Great so now in here we just have to do one final thing do a check if the ideas of block breakers ID then I’m going to return a new GUI block breaker which has a player so player dot inventory plan and T we can copy it from up here and Like so that is now add GUI done a case of the game is loaded up so if you go inside of our test world we should be able to see that the GUI is going to work now I am actually recording this like a couple weeks after the Eclipse Bit and that’s because I have in fact updated the GUI bit so you can put in chanted books there’s not much of a change here but as you can see the Gy now entirely works she’s really good I’ve added some stuff so if you want to braaap see all The stuff that i’ve added it’s on my github which is in the description so here we have the interaction with the ante which that foot the trying to stuck in slot this allows us to shift-click stuff out so I did that and I will also show you that this works so I’m just Going to get rid of this so if I turn this on you’ll now see that this block will break and go inside here a future plan is to make it so you actually see that it’s breaking not just get rid of it so you can see that the items are Insert it into the tile entity which is really good and cool thing is this when you if you look at my github you’ll see everything that I’ve done and the really cool stuff about this is that you can actually put different enchantments in it so if we get ourselves a fortune and I’ll grab myself a rock breaker here let’s just turn this one off so we’ve got a block breaker here and what we can do is you can actually immediately shift click in to these these can go in here but no other item can go in here but an Enchanted book which is useful so I ought to show you with a lattice or a diamond door and also glowstone and glass I’ll show you that if I put in efficiency it will now break a whole lot faster as you can see it gets the drops In correctly it will break glass but you won’t get any drops so if we fish it out to a silk touch you break the glass you get the glass break goes on you get the glowstone to rate the diamond you get Diamond Road at lapis get lapis which is Great efficiency speeds it up fortune well you can guess fortune so you get more out of it so this should give us about four diamonds yeah high percentages so it basically does it as if you’re breaking it with fortune now you can’t lay it on these Effects that might be added I don’t know depends on you your guys’s thoughts but it’s really cool something that you might find useful if you give yourself an enchanted book sword enchantment and then you put in one ID 32 level and I believe it’s level 7 that’s fortune 7 this is an instant Break which is actually really useful so it’s literally an instant break so if I just grab out this don’t forget you can break it like that if I just put in this efficiency here and switch it on literally everything Wakaba so in terms it gets placed as you can see it’s an Instant break but you can only get this with command so if you want some for that instant break something there you go so that that’s only instant break with an advanced version of the block breaker I’ve made it so that with a basic version of the block breaker It isn’t as fast but yes it still does pretty fast breaking so if I just put this on top it breaks faster than normal and so yeah thank you guys for watching the real like client I subscribe I am out Video Information
This video, titled ‘Minecraft Modding Tutorial | GUI (1.10.2,1.11.2)’, was uploaded by CJMinecraft on 2017-01-19 17:30:00. It has garnered 16692 views and 115 likes. The duration of the video is 00:13:49 or 829 seconds.
Today we add our GUI to our block so that we can finally access our inventory!
Files – https://goo.gl/mctM4S
Please support me if you can – https://www.patreon.com/cjminecraft Discord – https://discord.gg/ZvhUKkd
Don’t forget to like, comment and subscribe!
Music by Ninety9Lives Elektronomia – Imagination Video Link: http://99l.tv/Imagination Channel: http://99l.tv/Subscribe Album Download Link: http://99l.tv/GoldenGun
Links: ►GitHub – https://goo.gl/c4JlXe ►My Website – http://cjminecraft.theclever.me/ ►Modding Tutorial Playlist – https://goo.gl/bq6sgx ►Facebook – https://www.facebook.com/CJMinecraft01/ ►Google Plus – https://goo.gl/3n1umj ►SoundCloud – https://soundcloud.com/speed2-pc/ ►MCAmino – http://goo.gl/LzwZ9W ►Votable – http://www.votable.com/CJMinecraft
For modding help or if you want to contact me, email me at [email protected]
My Schedule: Monday or Thursday: ►Modding Tutorial