mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Sep palettes for other uses
This commit is contained in:
parent
c7638a6485
commit
ee542abb5d
@ -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();
|
@ -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];
|
||||
}
|
@ -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;
|
@ -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> {
|
@ -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;
|
@ -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;
|
||||
|
@ -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;
|
@ -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);
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
@ -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;
|
@ -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;
|
@ -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;
|
Loading…
x
Reference in New Issue
Block a user