Skip to content

Some small tweaks to the mod... - #3

Closed
hotpad100c wants to merge 1 commit into
contariaa:mainfrom
hotpad100c:master
Closed

Some small tweaks to the mod...#3
hotpad100c wants to merge 1 commit into
contariaa:mainfrom
hotpad100c:master

Conversation

@hotpad100c

Copy link
Copy Markdown
  • the color will now display on the UI and will appear slightly grayer when not editable;

image

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

827A2D1E883DC825D370CAA76DB672AF

  • 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.
    image

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 contariaa left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() with MinecraftClient.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_GRAY would 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?

Comment on lines +116 to +122
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()));

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lerping with 0 will simply always use lastTickPos?, is there any specific reason to use an old position?

Comment on lines +66 to +77
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;
});

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +66 to +69
if(this.options == null){
throw new IllegalStateException("Option failed to initialize!");
}
if ( this.options.put(option.getId(), option) != null) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to load the config here

"client": [
"MinecraftClientMixin",
"MouseMixin"
"MouseMixin",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was probably left here by accident

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a bug, it's a feature

contariaa added a commit that referenced this pull request Apr 6, 2025
…terrain with iris

fix cherrypicked from #3, thanks to @hotpad100c
@hotpad100c

Copy link
Copy Markdown
Author

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.

@AndrewAllen04

Copy link
Copy Markdown

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 🙏

@hotpad100c

hotpad100c commented Sep 16, 2025

Copy link
Copy Markdown
Author

Hi, I’m back. Sorry, I really did provide some pretty bad code earlier… 😅
I’m surprised this PR still hasn’t been closed. I have time to resolve the conflicts now, but since it’s been so long, I figure it’s probably not needed anymore. Is there any particular reason it hasn’t been closed, or should I go ahead and close it?

@hotpad100c

hotpad100c commented Sep 16, 2025

Copy link
Copy Markdown
Author

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

This is the comment that caught my attention here xd

And you should probably open an issue about it instead of posting it here. ;)

@hotpad100c hotpad100c closed this Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants