Some small tweaks to the mod... - #3
Conversation
hotpad100c
commented
Mar 25, 2025
- the color will now display on the UI and will appear slightly grayer when not editable;

- the text can now still be shown through clouds when enabled shader;

- The text on the marker will now remain bright even enabled shader;
- the text has been converted to world space instead of camera space;
- exiting and closing the game will now save the renderOverlay options.

the color will now display on the UI and will appear slightly grayer when not editable; the text can now still be shown through clouds when enabled shader; The text on the marker will now remain bright even enabled shader; the text has been converted to world space instead of camera space; exiting and closing the game will now save the renderOverlay options.
contariaa
left a comment
There was a problem hiding this comment.
Thanks for the PR, a couple points:
- Thank you so much for fixing the issues with clouds and shaders, looking at your code and testing locally it seems simply replacing occurances of
context.consumers()withMinecraftClient.getInstance().getBufferBuilders().getEffectVertexConsumers()is enough to fix it, please revert any other refactors to make the git diff more comprehensible - I disagree with saving the state of overlay being enabled to config, design wise i intentionally made it behave the same as F3 keybinds (such as F3 itself, hitboxes and chunkborders)
- I'm not a fan of coloring the text in the angle entries, I much prefer the solution from #2 which colors the icon instead, please revert those changes
- I like the idea of signaling the state of entries being editable or not, but I don't like making the text darker and less readable, maybe
Colors.LIGHT_GRAYwould be acceptable? - Personally I prefer the text on markers on the overlay being white but I can see why others would prefer it like this, could you make it toggleable please?
| lastTickPosX = camPos.getX(); | ||
| lastTickPosY = camPos.getY(); | ||
| lastTickPosZ = camPos.getZ(); | ||
|
|
||
| float x = (float) (worldPos.getX() - MathHelper.lerp(0, lastTickPosX, camPos.getX())); | ||
| float y = (float) (worldPos.getY() - MathHelper.lerp(0, lastTickPosY, camPos.getY())); | ||
| float z = (float) (worldPos.getZ() - MathHelper.lerp(0, lastTickPosZ, camPos.getZ())); |
There was a problem hiding this comment.
Lerping with 0 will simply always use lastTickPos?, is there any specific reason to use an old position?
| ClientTickEvents.END_CLIENT_TICK.register(client -> { | ||
| boolean isKeyDown = openOverlay.isPressed(); | ||
| if (isKeyDown && !wasToggleOverlayPressed) { | ||
| if (client.player != null) { | ||
| AngleSnap.CONFIG.renderOverlays.setValue(!AngleSnap.CONFIG.renderOverlays.getValue()); | ||
| LOGGER.info("Overlay toggled: " + AngleSnap.CONFIG.renderOverlays.getValue()); | ||
| AngleSnap.CONFIG.save(); | ||
| AngleSnap.CONFIG.load(); | ||
| } | ||
| } | ||
| wasToggleOverlayPressed = isKeyDown; | ||
| }); |
There was a problem hiding this comment.
From my understanding, this will only update the hotkey 20 times a second, which will introduce some latency.
While it's not much, that is the reason I update the openMenu hotkey in MinecraftClientMixin.
| if(this.options == null){ | ||
| throw new IllegalStateException("Option failed to initialize!"); | ||
| } | ||
| if ( this.options.put(option.getId(), option) != null) { |
There was a problem hiding this comment.
I see no reason for this change, the original check is just there to force a crash in case of duplicate options ID's. options being null will already crash with a NullPointerException, which is good enough
| AngleSnap.CONFIG.renderOverlays.setValue(!AngleSnap.CONFIG.renderOverlays.getValue()); | ||
| LOGGER.info("Overlay toggled: " + AngleSnap.CONFIG.renderOverlays.getValue()); | ||
| AngleSnap.CONFIG.save(); | ||
| AngleSnap.CONFIG.load(); |
There was a problem hiding this comment.
No need to load the config here
| "client": [ | ||
| "MinecraftClientMixin", | ||
| "MouseMixin" | ||
| "MouseMixin", |
There was a problem hiding this comment.
This was probably left here by accident
…terrain with iris fix cherrypicked from #3, thanks to @hotpad100c
|
Sorry I didn’t see your reply earlier. As far as I know, if you use camera space instead of world space, the markers will sway up and down with the player’s view when moving. Also, I don’t really have the time to undo the changes in this PR — they were just suggestions, so feel free to pick the parts you find useful and apply them yourself. |
|
Am just recommending a hotkey feature in order to bind hot keys to snap to angles quickly without opening a menu clicking. Would be extremely useful for PVP to snap to angles quickly without angle in the sky and teleport away. Also to change the keybinds to toggle the menu and overlay instead of f6 and f7. Thanks 🙏 |
|
Hi, I’m back. Sorry, I really did provide some pretty bad code earlier… 😅 |
This is the comment that caught my attention here xd And you should probably open an issue about it instead of posting it here. ;) |