55 Zeilen
2.1 KiB
Diff
55 Zeilen
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
Date: Fri, 26 Jun 2020 14:10:10 -0700
|
|
Subject: [PATCH] fixup! Anti-Xray
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
|
index c5a7b186e96901d55680283500f423025ededbe8..8b8c2a0156fd936ea422b64ca6372fa6bd31be32 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
|
@@ -42,13 +42,9 @@ public final class DataBitsReader {
|
|
bitInLongIndex += bitsPerObject;
|
|
|
|
if (bitInLongIndex > 63) {
|
|
- bitInLongIndex -= 64;
|
|
+ bitInLongIndex = 0;
|
|
longInDataBitsIndex += 8;
|
|
init();
|
|
-
|
|
- if (bitInLongIndex > 0) {
|
|
- value |= current << bitsPerObject - bitInLongIndex & mask;
|
|
- }
|
|
}
|
|
|
|
return value;
|
|
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
|
index 2eff19f6aaa31245f80910c6fbb541e32c672a31..5260882a319d5f897dd20e149d17077cb3f843ea 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
|
@@ -60,14 +60,9 @@ public final class DataBitsWriter {
|
|
|
|
if (bitInLongIndex > 63) {
|
|
finish();
|
|
- bitInLongIndex -= 64;
|
|
+ bitInLongIndex = 0;
|
|
longInDataBitsIndex += 8;
|
|
init();
|
|
-
|
|
- if (bitInLongIndex > 0) {
|
|
- current = current & ~(mask >>> bitsPerObject - bitInLongIndex) | (value & mask) >>> bitsPerObject - bitInLongIndex;
|
|
- dirty = true;
|
|
- }
|
|
}
|
|
}
|
|
|
|
@@ -76,7 +71,7 @@ public final class DataBitsWriter {
|
|
|
|
if (bitInLongIndex > 63) {
|
|
finish();
|
|
- bitInLongIndex -= 64;
|
|
+ bitInLongIndex = 0;
|
|
longInDataBitsIndex += 8;
|
|
init();
|
|
}
|