Started by
unmushinminecr…
on
Topic category: Help with Minecraft modding (Java Edition)
Hi, I want to make a block with a GUI that has a charging bar, that use seeds to transforms it into other modded seeds. It uses energy system. But so I don't know how to make it. I've already made the gui, the charging bar but i didn't implemented the logic behind everything.
Edited by unmushinminecraftiens on Thu, 02/20/2025 - 15:35
So, I have made Procedures but the block doesn't work.
https://imgur.com/a/xVWOL9u
The first procedure is the block tick update
The second procedure is when the block is placed
The third procedure is to implement the logic of the progress
The fourth screen is the code for the gui
And i forgot to implement the logic of the energy.
Soooooooooo, I've been able to make the seeds into the modded seeds and then when i ported all of the procedure into the gui procedures (when this gui is opened, while this gui is tick open, when this gui is closed) everything stopped working. The logic was implemented in the update tick in the block but i wanted to keep working even if the gui is closed and now it doesn't work. Yes, i used the world time and made a nbt but it doesn't work. Maybe it's because i have used twice the same name for the nbt, i dont really know.
Hello again, if you're still struggling just let me know what with. Can't work for a couple days so I'm bored and you ask fun tricky questions.
Yep, still struggling on this, can you help me ? Since that last message, it works but there's a real problem. The issue is that when the block is placed, it stills generate seeds without having any seeds in the machine.
And there is another bug, when a random selection of seeds is chosen and there was seeds in it before is overrights it. But I know how to fix, just by adding another slot the last type of seeds to stop the bug and there's an issue that generate the same number of seeds placed + 1 it's because of multiple lines that are duplicated but it's needed to made the modded seeds stack.
Could you send me the current procedure as the last images you posted should only do the purifying stuff if seeds are in slot 0.
Here it is ! :
https://imgur.com/a/uVG1YPw
Why is that running on player tick update?
Because, when I tried to move the code from the player tick update to the gui tick, It didn't work so i made like this...
And so I thought it was the right trigger
It's a very weird procedure especially as you're having problems with triggers, I would recommend breaking it down into it's components and testing each part separately and on different triggers.
Okay, I'll do this. I'll make a update if something is changing.
Quick question: Do I move the procedure into the gui tick update or what ?