alRex-U / alRex-U/AutoLook

Aim changing sound plays regardless of lock state

Aberta
#2 1 comentário 0 reações 1 responsável Reivindicada por @alRex-U Ver no GitHub
bug
Linguagem predominante
Java
Estrelas
1
Forks
3
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

The sound for changing aim (BOOK_PAGE_TURN) plays if the mouse gets moved enough, even if there is no entity locked, being looked at or even visible. This got quite annoying once I noticed it, as it means that there are constant page turning sounds every time you look around.

I tested and reproduced it in a new Minecraft installation, with only this mod.

Steps to reproduce:
1. Start game and load into world
2. Move the mouse around
3. Hear page sound

Software Versions:
- OS: Ubuntu 18.04
- Minecraft: 1.16.5
- Forge: 36.2.33
- AutoLook: autolook-1.16.5-1.1.0.0-R from CurseForge

I had a quick look at the code, I think the problem is in [TickEventHandler.java](https://github.com/alRex-U/AutoLook/blob/main/src/main/java/com/alrexu/autolook/handler/TickEventHandler.java). The mouse shaking part gets evaluated every tick regardless of any lock state. If the mouse gets moved enough, it calls the handler.changeAimToward() with the corresponding direction, which immediately returns because lookedAim is null. But then the aimChanged variable gets set to true anyways, resulting in the sound being played.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.