looking at venus from the first space station ever created in Advanced Rocketry 1.21.1
https://redd.it/1rhh2c5
@MinecraftModded
https://redd.it/1rhh2c5
@MinecraftModded
Reddit
From the feedthebeast community on Reddit: looking at venus from the first space station ever created in Advanced Rocketry 1.21.1
Explore this post and more from the feedthebeast community
Minecraft GUI code is the final boss of technical debt
Holy fucking shit, working with minecrafts ui in any way is just SO ASS. I just spent 6 hours in a void trying to do basic asf layout in 1.21.1. Why is it that THE MOST SUCCESSFULL GAME EVER has me manually bookkeeping Y-offsets like its 1995? There are no Elements, there is no hierarchy. Its just "render this shit now and forget it". I dont even know how tall my GUI is.
Dont even get me started on the GUI Scale setting. I spend time getting a button to be in the center, only to change my scale to Auto and suddenly my oh so centered button is at X=21,520
I decided to look at my own C# engine to remind myself what sanity looks like.
Minecraft:
//inside render()
int x = this.width / 2 - 360; //Hardcoded
int y = this.height / 2 - 240; //Hardcoded
drawTexture(stack, x, y, 0, 0, 720, 480); //just pixels on a screen. will be gone next frame
//30 lines later in mouseClicked()
if (mouseX >= this.width / 2 - 360 && mouseX <= this.width / 2 + 360...) {
// REPEAT THE MATH PERFECTLY OR THE BUTTON DOESN'T WORK
}
My Engine:
uiRenderer.Add(
new Window()
.SetName("Window")
.SetAnchor(new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f)) //NO ABSOLUTE PIXEL BULLSHIT HERE BTW
.SetSize(720, 480)
.CenterInParent(720, 480) // The engine does the math, not me
.Create()
);
Minecraft GUI has no retained state, no hierarchy, no layout helpers, no relative coordinates unless calculated manually.
Even the vanilla creative menu doesnt actually scroll, instead its just a fixed 9x5 grid that replaces the ItemStack's inside those slots.
https://redd.it/1rhmyc6
@MinecraftModded
Holy fucking shit, working with minecrafts ui in any way is just SO ASS. I just spent 6 hours in a void trying to do basic asf layout in 1.21.1. Why is it that THE MOST SUCCESSFULL GAME EVER has me manually bookkeeping Y-offsets like its 1995? There are no Elements, there is no hierarchy. Its just "render this shit now and forget it". I dont even know how tall my GUI is.
Dont even get me started on the GUI Scale setting. I spend time getting a button to be in the center, only to change my scale to Auto and suddenly my oh so centered button is at X=21,520
I decided to look at my own C# engine to remind myself what sanity looks like.
Minecraft:
//inside render()
int x = this.width / 2 - 360; //Hardcoded
int y = this.height / 2 - 240; //Hardcoded
drawTexture(stack, x, y, 0, 0, 720, 480); //just pixels on a screen. will be gone next frame
//30 lines later in mouseClicked()
if (mouseX >= this.width / 2 - 360 && mouseX <= this.width / 2 + 360...) {
// REPEAT THE MATH PERFECTLY OR THE BUTTON DOESN'T WORK
}
My Engine:
uiRenderer.Add(
new Window()
.SetName("Window")
.SetAnchor(new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f)) //NO ABSOLUTE PIXEL BULLSHIT HERE BTW
.SetSize(720, 480)
.CenterInParent(720, 480) // The engine does the math, not me
.Create()
);
Minecraft GUI has no retained state, no hierarchy, no layout helpers, no relative coordinates unless calculated manually.
Even the vanilla creative menu doesnt actually scroll, instead its just a fixed 9x5 grid that replaces the ItemStack's inside those slots.
https://redd.it/1rhmyc6
@MinecraftModded
Reddit
From the feedthebeast community on Reddit
Explore this post and more from the feedthebeast community