Skip to content

Commit

Permalink
add missing PlayerAuthInputData, use zeroed BigInteger while writing …
Browse files Browse the repository at this point in the history
…large VarInt (#269)
  • Loading branch information
tahmid-23 authored Dec 13, 2024
1 parent 2880d90 commit 868bc77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public <T extends Enum<?>> void readLargeVarIntFlags(ByteBuf buffer, Set<T> flag

@Override
public <T extends Enum<?>> void writeLargeVarIntFlags(ByteBuf buffer, Set<T> flags, Class<T> clazz) {
BigInteger flagsInt = new BigInteger(clazz.getEnumConstants().length, ThreadLocalRandom.current());
BigInteger flagsInt = BigInteger.ZERO;
for (T flag : flags) {
flagsInt = flagsInt.setBit(flag.ordinal());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ public enum PlayerAuthInputData {
* @since v748
*/
STOP_SPIN_ATTACK,
/**
* @since v766
*/
HOTBAR_ONLY_TOUCH,
/**
* @since v766
*/
Expand Down

0 comments on commit 868bc77

Please sign in to comment.