Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container label still inside block(s) above #196

Open
ash-development opened this issue Aug 14, 2024 · 9 comments · May be fixed by #206
Open

Container label still inside block(s) above #196

ash-development opened this issue Aug 14, 2024 · 9 comments · May be fixed by #206
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@ash-development
Copy link

Hi! I found that the commit that was made referencing #44 didn't exactly solve the issue of chest labels still being inside blocks above it. In the screenshot below, the label is still inside of the chest above it.
image
I also find this happens with 100% solid blocks (tested with dirt & birch planks)

@JackFred2 JackFred2 added bug Something isn't working mod related Issue is related to another mod enhancement New feature or request and removed mod related Issue is related to another mod labels Aug 14, 2024
@JackFred2
Copy link
Owner

Misread the screenshot; that commit was for a very old version. Rendering isn't my forte so I'll have a proper look at this after some other issues, but I'll see if I can bring that back.

@ash-development
Copy link
Author

ah understood. i know this may sound simpler than it actually is, but i believe all that is needed is to check what direction the block is facing, and then place the label accordingly. and then put that inside logic that detects blocks on top

im taking a crack at it right now, ill lyk how it works out :)

@ash-development
Copy link
Author

update: i got the labels in front of the chests. now i have to write the logic for blocks above 🫡

@ash-development
Copy link
Author

aaaaaand done :3
image

@ash-development ash-development linked a pull request Aug 16, 2024 that will close this issue
@aswheaton
Copy link

Surely it is best to just make the position configurable? a slider in the config for y-offset of the label would basically solve this problem.

@ash-development
Copy link
Author

ash-development commented Sep 14, 2024

@aswheaton i mean a y-offset wouldn't necessarily fix it? if i had a stack of 3 chests it wouldn't make much sense, where would the labels then go?

@ash-development
Copy link
Author

after some testing with the latest updates, it appears that the chest label now highlights when you hover over the chest, but doesn't seem ideal. i have to re-do my PR to incorporate new changes, but maybe in that process i will make that an option in the menu.

@ash-development
Copy link
Author

ash-development commented Sep 14, 2024

@JackFred2 any chance i could get some help over in my fork? i have the beginnings of the setting implementation but i can't seem to figure out what this crash is about - happens when i click the setting to change the state. (here are the changes ive made btw, im sure i just missed something)

[23:57:21] [Render thread/ERROR] (Minecraft) Reported exception thrown!
 net.minecraft.ReportedException: Rendering screen
	at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:922) ~[minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1285) ~[minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:882) [minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:256) [minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480) [fabric-loader-0.16.2.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.16.2.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.16.2.jar:?]
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) [dev-launch-injector-0.2.1+build.8.jar:?]
Caused by: java.lang.NullPointerException
	at java.base/java.util.Objects.requireNonNull(Objects.java:233) ~[?:?]
	at dev.isxander.yacl3.impl.SafeBinding.getValue(SafeBinding.java:17) ~[yet-another-config-lib-3.5.0+1.21-fabric.jar:?]
	at dev.isxander.yacl3.impl.OptionImpl.changed(OptionImpl.java:107) ~[yet-another-config-lib-3.5.0+1.21-fabric.jar:?]
	at dev.isxander.yacl3.gui.controllers.ControllerWidget.render(ControllerWidget.java:43) ~[yet-another-config-lib-3.5.0+1.21-fabric.jar:?]
	at dev.isxander.yacl3.gui.OptionListWidget$OptionEntry.render(OptionListWidget.java:310) ~[yet-another-config-lib-3.5.0+1.21-fabric.jar:?]
	at net.minecraft.client.gui.components.AbstractSelectionList.renderItem(AbstractSelectionList.java:447) ~[minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	at dev.isxander.yacl3.gui.ElementListWidgetExt.renderListItems(ElementListWidgetExt.java:214) ~[yet-another-config-lib-3.5.0+1.21-fabric.jar:?]
	at net.minecraft.client.gui.components.AbstractSelectionList.renderWidget(AbstractSelectionList.java:188) ~[minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	at dev.isxander.yacl3.gui.ElementListWidgetExt.renderWidget(ElementListWidgetExt.java:77) ~[yet-another-config-lib-3.5.0+1.21-fabric.jar:?]
	at net.minecraft.client.gui.components.AbstractWidget.render(AbstractWidget.java:66) ~[minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	at dev.isxander.yacl3.gui.tab.ListHolderWidget.renderWidget(ListHolderWidget.java:37) ~[yet-another-config-lib-3.5.0+1.21-fabric.jar:?]
	at net.minecraft.client.gui.components.AbstractWidget.render(AbstractWidget.java:66) ~[minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	at net.minecraft.client.gui.screens.Screen.render(Screen.java:128) ~[minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	at net.minecraft.client.gui.screens.Screen.renderWithTooltip(Screen.java:117) ~[minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	at net.minecraft.client.renderer.GameRenderer.mixinextras$bridge$renderWithTooltip$177(GameRenderer.java) ~[minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	at net.minecraft.client.renderer.GameRenderer.wrapOperation$zce000$fabric-screen-api-v1$onRenderScreen(GameRenderer.java:2086) ~[minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:913) ~[minecraft-clientOnly-6224587501-1.21.1-loom.mappings.1_21_1.layered+hash.1212190944-v2.jar:?]
	... 7 more
[23:57:21] [Server thread/INFO] (Minecraft) Stopping server

@JackFred2 JackFred2 self-assigned this Sep 20, 2024
@JackFred2
Copy link
Owner

I can't reproduce the config loading issue on your fork; it might just be a case of deleting the dev config because of an old (invalid) value.
image

Will add some comments on the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants