mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-16 23:55:17 +01:00
Merge branch 'ver/1.16' of https://github.com/stonar96/Paper into ver/1.16
This commit is contained in:
commit
8c0c587472
@ -847,10 +847,10 @@ index 0000000000000000000000000000000000000000..e61421d87a19bf2f6ce8836b48c445ff
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..8b8c2a0156fd936ea422b64ca6372fa6bd31be32
|
index 0000000000000000000000000000000000000000..298ea423084dbcc1b61f991bcd82b8ae51bf0977
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
||||||
@@ -0,0 +1,52 @@
|
@@ -0,0 +1,51 @@
|
||||||
+package com.destroystokyo.paper.antixray;
|
+package com.destroystokyo.paper.antixray;
|
||||||
+
|
+
|
||||||
+public final class DataBitsReader {
|
+public final class DataBitsReader {
|
||||||
@ -891,21 +891,20 @@ index 0000000000000000000000000000000000000000..8b8c2a0156fd936ea422b64ca6372fa6
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public int read() {
|
+ public int read() {
|
||||||
+ int value = (int) (current >>> bitInLongIndex) & mask;
|
+ if (bitInLongIndex + bitsPerObject > 64) {
|
||||||
+ bitInLongIndex += bitsPerObject;
|
|
||||||
+
|
|
||||||
+ if (bitInLongIndex > 63) {
|
|
||||||
+ bitInLongIndex = 0;
|
+ bitInLongIndex = 0;
|
||||||
+ longInDataBitsIndex += 8;
|
+ longInDataBitsIndex += 8;
|
||||||
+ init();
|
+ init();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ int value = (int) (current >>> bitInLongIndex) & mask;
|
||||||
|
+ bitInLongIndex += bitsPerObject;
|
||||||
+ return value;
|
+ return value;
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..5260882a319d5f897dd20e149d17077cb3f843ea
|
index 0000000000000000000000000000000000000000..333763936897befda5bb6c077944d2667f922799
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
||||||
@@ -0,0 +1,79 @@
|
@@ -0,0 +1,79 @@
|
||||||
@ -965,24 +964,24 @@ index 0000000000000000000000000000000000000000..5260882a319d5f897dd20e149d17077c
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void write(int value) {
|
+ public void write(int value) {
|
||||||
+ current = current & ~(mask << bitInLongIndex) | (value & mask) << bitInLongIndex;
|
+ if (bitInLongIndex + bitsPerObject > 64) {
|
||||||
+ dirty = true;
|
|
||||||
+ bitInLongIndex += bitsPerObject;
|
|
||||||
+
|
|
||||||
+ if (bitInLongIndex > 63) {
|
|
||||||
+ finish();
|
+ finish();
|
||||||
+ bitInLongIndex = 0;
|
+ bitInLongIndex = 0;
|
||||||
+ longInDataBitsIndex += 8;
|
+ longInDataBitsIndex += 8;
|
||||||
+ init();
|
+ init();
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
|
+ current = current & ~(mask << bitInLongIndex) | (value & mask) << bitInLongIndex;
|
||||||
|
+ dirty = true;
|
||||||
|
+ bitInLongIndex += bitsPerObject;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void skip() {
|
+ public void skip() {
|
||||||
+ bitInLongIndex += bitsPerObject;
|
+ bitInLongIndex += bitsPerObject;
|
||||||
+
|
+
|
||||||
+ if (bitInLongIndex > 63) {
|
+ if (bitInLongIndex > 64) {
|
||||||
+ finish();
|
+ finish();
|
||||||
+ bitInLongIndex = 0;
|
+ bitInLongIndex = bitsPerObject;
|
||||||
+ longInDataBitsIndex += 8;
|
+ longInDataBitsIndex += 8;
|
||||||
+ init();
|
+ init();
|
||||||
+ }
|
+ }
|
||||||
|
Loading…
Reference in New Issue
Block a user