9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-25 18:19:14 +00:00

Basic impl for global palettes

This commit is contained in:
cyberpwn
2021-09-22 06:26:18 -04:00
parent 3b38b69034
commit 600bf94044

View File

@@ -20,6 +20,7 @@ package com.volmit.iris.util.data.palette;
import com.volmit.iris.util.nbt.tag.ListTag;
import java.util.List;
import java.util.function.Predicate;
public class GlobalPalette<T> implements Palette<T> {
@@ -27,6 +28,17 @@ public class GlobalPalette<T> implements Palette<T> {
private final T defaultValue;
public GlobalPalette(T... f)
{
IdMapper<T> mapper = new IdMapper<>();
for(T i : f)
{
mapper.add(i);
}
registry = mapper;
defaultValue = f[0];
}
public GlobalPalette(IdMapper<T> var0, T var1) {
this.registry = var0;
this.defaultValue = var1;
@@ -50,6 +62,13 @@ public class GlobalPalette<T> implements Palette<T> {
return this.registry.size();
}
public void read(ListTag var0) {
@Override
public void read(List<T> fromList) {
}
@Override
public void write(List<T> toList) {
}
}