1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-22 20:48:25 +01:00

Merge branch 'ver/1.16' of https://github.com/stonar96/Paper into ver/1.16

This commit is contained in:
Spottedleaf 2020-06-26 20:34:31 -07:00
commit 0f7c022cbc

View file

@ -891,15 +891,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } + }
+ +
+ 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;
+ } + }
+} +}
@ -965,24 +964,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ } + }
+ +
+ 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();
+ } + }