Skip to content

Do not obfuscate air#4149

Merged
kashike merged 1 commit into
PaperMC:progress/1.16.2from
stonar96:hotfix/anti-xray-air
Aug 20, 2020
Merged

Do not obfuscate air#4149
kashike merged 1 commit into
PaperMC:progress/1.16.2from
stonar96:hotfix/anti-xray-air

Conversation

@stonar96
Copy link
Copy Markdown
Contributor

@stonar96 stonar96 commented Aug 18, 2020

For further details about the issue see #4123 (comment) and #4123 (comment). This line prevents flagDirty from being invoked for blocks with negative y values, which throws an ArrayIndexOutOfBoundsException in 1.16.2. However, flagDirty is invoked if the array obfuscateGlobal is true for air. This is the case, when air is either added to hidden-blocks or replacement-blocks in engine-mode 2. This commit does not prevent adding air to the hidden-blocks list (as I often suggest) and thus being added to the chunk, but rather prevents "covered" air from being replaced (obfuscated) by other blocks, which makes no sense at all. In other words air isn't set to true in the obfuscateGlobal array, which prevents air from being replaced and prevents unnecessary block updates for air blocks (including the failing void block updates in 1.16.2).

Actually the same issue also exists in versions before 1.16.2 but without throwing an exception. Thus it might be a good idea to also apply these changes to other supported versions.

@kashike kashike self-assigned this Aug 20, 2020
@kashike kashike merged commit 100d51e into PaperMC:progress/1.16.2 Aug 20, 2020
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