Sep palettes for other uses

This commit is contained in:
cyberpwn 2021-09-22 05:21:33 -04:00
parent c7638a6485
commit ee542abb5d
17 changed files with 29 additions and 29 deletions

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
public interface BiomeContainer {
int[] getData();

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
import org.apache.commons.lang3.Validate;
@ -61,25 +61,25 @@ public class BitStorage {
private final int divideShift;
public BitStorage(int var0, int var1) {
this(var0, var1, null);
public BitStorage(int bits, int length) {
this(bits, length, null);
}
public BitStorage(int var0, int var1, long[] var2) {
Validate.inclusiveBetween(1L, 32L, var0);
this.size = var1;
this.bits = var0;
this.mask = (1L << var0) - 1L;
this.valuesPerLong = (char) (64 / var0);
public BitStorage(int bits, int length, long[] data) {
Validate.inclusiveBetween(1L, 32L, bits);
this.size = length;
this.bits = bits;
this.mask = (1L << bits) - 1L;
this.valuesPerLong = (char) (64 / bits);
int var3 = 3 * (this.valuesPerLong - 1);
this.divideMul = MAGIC[var3 + 0];
this.divideAdd = MAGIC[var3 + 1];
this.divideShift = MAGIC[var3 + 2];
int var4 = (var1 + this.valuesPerLong - 1) / this.valuesPerLong;
if (var2 != null) {
if (var2.length != var4)
int var4 = (length + this.valuesPerLong - 1) / this.valuesPerLong;
if (data != null) {
if (data.length != var4)
throw new RuntimeException("NO!");
this.data = var2;
this.data = data;
} else {
this.data = new long[var4];
}

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
@FunctionalInterface
public interface CountConsumer<T> {

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
import com.google.common.base.Predicates;
import com.google.common.collect.Iterators;

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
import com.volmit.iris.util.nbt.tag.ListTag;

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
import com.volmit.iris.util.nbt.tag.CompoundTag;
import com.volmit.iris.util.nbt.tag.ListTag;

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
public interface IdMap<T> extends Iterable<T> {
int getId(T paramT);

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
import com.google.common.base.Predicates;
import com.google.common.collect.Iterators;

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
import com.volmit.iris.util.nbt.tag.CompoundTag;
import com.volmit.iris.util.nbt.tag.ListTag;

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
import java.util.Random;
import java.util.UUID;

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
import com.volmit.iris.util.nbt.tag.ListTag;

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
import com.volmit.iris.util.nbt.tag.CompoundTag;

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
interface PaletteResize<T> {
int onResize(int paramInt, T paramT);

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
import com.volmit.iris.util.nbt.tag.CompoundTag;
import com.volmit.iris.util.nbt.tag.ListTag;

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
public final class QuartPos {
public static final int BITS = 2;

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.util.nbt.mca.palette;
package com.volmit.iris.util.data.palette;
import com.volmit.iris.util.nbt.tag.CompoundTag;
import lombok.RequiredArgsConstructor;