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

The player's attack range is increased with NeoForge #243

Closed
Lolothepro opened this issue Nov 3, 2023 · 5 comments · Fixed by #346
Closed

The player's attack range is increased with NeoForge #243

Lolothepro opened this issue Nov 3, 2023 · 5 comments · Fixed by #346
Labels
1.20 Targeted at Minecraft 1.20 bug A bug or error triage Needs triaging and confirmation

Comments

@Lolothepro
Copy link
Contributor

Minecraft Version: 1.20.2

NeoForge Version: NeoForge-20.2.26-beta

NeoForge:

2023-11-03.20-43-44.mp4

Vanilla:

2023-11-03.20-45-24.mp4

World:
Reach.zip

@Lolothepro Lolothepro added the triage Needs triaging and confirmation label Nov 3, 2023
@Lolothepro Lolothepro changed the title The player's attack range is increased with Forge The player's attack range is increased with NeoForge Nov 3, 2023
@sciwhiz12 sciwhiz12 added bug A bug or error 1.20 Targeted at Minecraft 1.20 labels Nov 3, 2023
@LoganDark
Copy link

LoganDark commented Nov 8, 2023

I think this could be because creative mode has slightly increased block reach and maybe someone tried to unify reach for blocks and entities

@Shadows-of-Fire
Copy link
Contributor

I guess someone fucked this patch in porting again, as has happened every time since it was introduced, lol

@pupnewfster
Copy link
Member

If it is the same specific part of the patch as got messed up last time, we should probably add a comment as part of the patch that tries to clarify what should be used there.

@Shadows-of-Fire
Copy link
Contributor

I don't think its the same part of the patch, the previous part was due to vanilla adding new cap constants that meant our changes were getting capped - this looks like something is being offset by a value incorrectly.

@Matyrobbrt Matyrobbrt added this to the 20.4 Stable Release milestone Dec 8, 2023
@Shadows-of-Fire
Copy link
Contributor

So this is just a resurfacing of a vanilla bug: https://bugs.mojang.com/browse/MC-250858

Vanilla declares an entity reach distance of 6.0 for creative players in GameRenderer#pick, but then forgets a != MISS check and truncates it to 5.0 (the block reach) inadvertently.

This only impacts creative players, but we have to add the miss check to support disjoint ranges (otherwise all ranges are truncated to the block range).

We can probably reduce the creative entity reach boost from 3 to 2 to compensate for vanilla's issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.20 Targeted at Minecraft 1.20 bug A bug or error triage Needs triaging and confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants