Refactored Js5 class

This commit is contained in:
Pazaz 2022-06-15 13:41:21 -04:00
parent c5ef44dfcb
commit bcb88470f8
49 changed files with 423 additions and 423 deletions

View file

@ -728,7 +728,7 @@ public final class JagString implements StringInterface {
@OriginalMember(owner = "client!na", name = "hashCode", descriptor = "()I")
@Override
public final int hashCode() {
return this.method3154();
return this.getHash();
}
@OriginalMember(owner = "client!na", name = "b", descriptor = "(IZ)Z")
@ -963,7 +963,7 @@ public final class JagString implements StringInterface {
}
@OriginalMember(owner = "client!na", name = "d", descriptor = "(Z)I")
public final int method3154() {
public final int getHash() {
@Pc(7) int hash = 0;
for (@Pc(14) int c = 0; c < this.length; c++) {
hash = (this.chars[c] & 0xFF) + (hash << 5) - hash;