That's what I want to do, like a custom buy system but with a different UI. I think you can look at the villagers code and see what function launches it's UI and just override the code from the entity
I'm trying to make a mod that allows you to apply poisons to blades. I'm trying to display the amount of hits you have left without opening any screens. Where should I look to try and display that info constantly without opening a new GUI window? Thank you for the help and your tutorials
You probably can't use LibGui for this. What I would do is look into the source code and find out how Minecraft displays for example the hotbar. You could also try to find a mod that already exists and displays something on screen. I'm thinking of a map mod or something like that. :)
@@ErnieBernie10 thank you for the help. I found that there aren't a lot of tutorials for fabric just yet. I hope your channel does well and you continue to make amazing tutorials.
does this work in 1.19.4 also, are there any plugins that can show the UI in the IDE? [this does work (kinda) in 1.19.4, just need to adjust some things]
i have a problem, i'm on a lower end computer and it lags when my client sided screen is showing edit: that can be fixed by changing the background painter to draw a simple rectangle
Hey! just watched this tutorial. I am having a problem though: I correctly added the dependency and repository, but for some reason it is not recognized at all. Do I have to add something to the fabric.mod.json file? Any help? Thanks (FYI I DMed you this)
@@ErnieBernie10 One more question: How do I access the player's coordinates(x, y, and z seperately)? One person said MinecraftClient.getInstance().player.getPos(), but that returns the vec3d format which i don't know how to deal with. Another said vector.getX(), but that didn't work either. Any help? Thanks
Ok now I need help with a different problem. I have a GUI, but I need to make it so that when I click a button, it removes an item from my inventory and gives me a different one? Is this possible?
@@ErnieBernie10 I did keybind part,it's working but I don't know how to display a text on screen And I can't understand how to get matrixstack BTW thanks for help
It comes down to the same thing as in this video. Instead of executing the code to open the gui in the right click handler, just put that code where the onKeyIsPressed handler is. Can I also refer to the discord where we can help you more easily. There is a LibGui channel here: discord.gg/gr2hU5XZ
Nice tutorial! It's good to see more of these "advanced" tutorials, especially working with common libraries in the fabric ecosystem.
Heya, for those working in 1.19 or so,
use setScreen() instead of openScreen() when adding it to the item. openScreen was renamed or something
thank youuu!!!
setScreenAndRender() seems to work
It kinda worked but then crashed? how to fix?
@@ButterKing-28 yea.. I got they same problem.. Do you remember if you fixed it or not? (I presume not since its been a year..)
@@A_Aphid I believe I did but tbh its been forever I kinda don't remember
@@ButterKing-28 Oh don't worry abt it. I asked the discord server and they helped me get LibGUI working.
please keep it up, it's very informative! as of right now, I can't find any advance modding tutorial with fabric
thanks men, i'm french and i want to create my own mod and your tutorial help me, Thanks
Thanks! so much please keep up the videos!
Why does your voice remind me of john wick randomly
I have no idea my friend :D
amazing.
Dammit these nice comments are making it hard to resist coming back to yt.. :D
@@ErnieBernie10 You left yt??
Can continue with the GUI tutorials?
I will. I'll make the container gui tutorial soon
New GUI tutorial is up you can check it out here: ua-cam.com/video/Ca769FY4pOg/v-deo.html
Is there any way you could assign the GUI to an entity? For example, right-clicking a villager to receive a quest from them?
That's what I want to do, like a custom buy system but with a different UI. I think you can look at the villagers code and see what function launches it's UI and just override the code from the entity
Thanks! Its really helpful. Are you develop some mods right now?
Not really. I was working on Bestiary, but I kind of put that on hold and started helping with LibGui itself.
How about HUD system? e.g. creating a thirst system.
Pretty epic. Ty
I'm trying to make a mod that allows you to apply poisons to blades. I'm trying to display the amount of hits you have left without opening any screens. Where should I look to try and display that info constantly without opening a new GUI window? Thank you for the help and your tutorials
You probably can't use LibGui for this. What I would do is look into the source code and find out how Minecraft displays for example the hotbar. You could also try to find a mod that already exists and displays something on screen. I'm thinking of a map mod or something like that. :)
@@ErnieBernie10 thank you for the help. I found that there aren't a lot of tutorials for fabric just yet. I hope your channel does well and you continue to make amazing tutorials.
does this work in 1.19.4 also, are there any plugins that can show the UI in the IDE?
[this does work (kinda) in 1.19.4, just need to adjust some things]
Double no probably
@@ErnieBernie10 yee sad
@ErnieBernie hey can you make a tutorial or explain how to do this without an item like a potion hud or item durability hud
i have a problem, i'm on a lower end computer and it lags when my client sided screen is showing
edit: that can be fixed by changing the background painter to draw a simple rectangle
i want to see a clickgui can you make that?
Hey! just watched this tutorial. I am having a problem though: I correctly added the dependency and repository, but for some reason it is not recognized at all. Do I have to add something to the fabric.mod.json file? Any help? Thanks
(FYI I DMed you this)
No the only problem I can imagine is that you added the dependency into the wrong Gradle file
Nvm, fixed
@@ErnieBernie10 One more question: How do I access the player's coordinates(x, y, and z seperately)? One person said MinecraftClient.getInstance().player.getPos(), but that returns the vec3d format which i don't know how to deal with. Another said vector.getX(), but that didn't work either. Any help? Thanks
nevermind; MinecraftClient.getInstance().player.getX() hahahha I'm so dumb lol
@@Bvngee im having the same issue. how did you fix it?
really helpful, i love'it
I love how I'm following what this man is typing (not the erniebernie) yet I'm still getting errors that don't even make sense to me.
These videos are probably outdated and are no longer relevant.
i can't install cotton it won't launch mc after-
I need some help. Is there a way to make a button that when clicked opens a new GUI?
Never mind I figured it out.
Ok now I need help with a different problem. I have a GUI, but I need to make it so that when I click a button, it removes an item from my inventory and gives me a different one? Is this possible?
When I open the GUI the second time, it gives me this error: net.minecraft.client.MinecraftClient.getNarratorManager()" because "this.client" is null
Can you make it without using an item?
Why can’t I download LibGui in the step of genSources
You need to add the dependency and then click the Gradle import button
ErnieBernie Not this problem, I even cannot download the lib for the API.
@@imxiaoanag It could be a lot of things I suggest you go over to the CottonMC discord and talk to me there. discord.gg/wKQSzf
@@ErnieBernie10 Ohh my god. I completely forgot to press the reload button. Thank you so much!!!
What intellij theme are you using?
How to display a text on screen when a key is pressed??
Please help
fabricmc.net/wiki/tutorial:keybinds
@@ErnieBernie10 I did keybind part,it's working but I don't know how to display a text on screen
And I can't understand how to get matrixstack
BTW thanks for help
It comes down to the same thing as in this video. Instead of executing the code to open the gui in the right click handler, just put that code where the onKeyIsPressed handler is. Can I also refer to the discord where we can help you more easily. There is a LibGui channel here: discord.gg/gr2hU5XZ
@@ErnieBernie10 thanks but I figured it out
I used the hud event instead of tick event
Awesome
first line of code and i already have 3 errors :)
but how to get that item?
do /give (in-game) or it would be in the creative menu
can u make a discord so people can ask questions
There is already a discord channel. Take a look in the other comments I link a discord server there.
@@ErnieBernie10 cant find it u should put that in video description
discord.gg/ctBTfWZPZs
There will be a LibGui channel that you can ask questions in
It no work in 1.17.1
That would be because this tutorial is for 1.15. I won't make any updated tutorials. Hopefully someone else can step in.
I am watching this to make hacks
You're so cool 😎