Update MixinSodiumChunkProvider.java

This commit is contained in:
wagyourtail 2021-02-02 17:56:00 -07:00 committed by GitHub
parent 637c182114
commit 484c606dc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 6 deletions

View File

@ -75,18 +75,15 @@ public class MixinSodiumChunkProvider implements IClientChunkProvider {
@Override
public ISodiumChunkArray extractReferenceArray() {
https://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html#jls-14.15
if (chunkArrayField == null) {
boolean flag = true;
for (Field f : this.getClass().getDeclaredFields()) {
if (ISodiumChunkArray.class.isAssignableFrom(f.getType())) {
chunkArrayField = f;
flag = false;
break;
break https;
}
} // else
if (flag) {
throw new RuntimeException(Arrays.toString(this.getClass().getDeclaredFields()));
}
throw new RuntimeException(Arrays.toString(this.getClass().getDeclaredFields()));
}
try {
return (ISodiumChunkArray) chunkArrayField.get(this);