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

Add arrow hiding function #291

Open
wants to merge 2 commits into
base: 1.20
Choose a base branch
from
Open

Conversation

Riftlight
Copy link
Contributor

Adds a function to RendererAPI, setRenderArrows, to control whether or not arrows stuck in the player are rendered. Adds an entry in en_us.json for it and adds a mixin for it.


@Inject(method = "renderStuckItem", at = @At("HEAD"), cancellable = true)
private void disableStuckArrowsRendering(PoseStack matrices, MultiBufferSource vertexConsumers, int light, Entity entity, float directionX, float directionY, float directionZ, float tickDelta, CallbackInfo ci) {
Avatar avatar = AvatarManager.getAvatarForPlayer(FiguraMod.getLocalPlayerUUID());
Copy link
Contributor

Choose a reason for hiding this comment

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

bad implementation, now the arrows' visibility for all players depends on the the setting of the avatar of the local player, not of their respective avatars

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah i fucked up and forgot to test mp, ill draft and work on fix

@Riftlight Riftlight marked this pull request as draft December 27, 2024 17:50
@Riftlight
Copy link
Contributor Author

as far as i can tell, everything is working. ill give myself a bit more time to test though because i dont trust myself

@Riftlight Riftlight marked this pull request as ready for review December 29, 2024 03:10
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.

2 participants