Still busted. Build at your own risk

This commit is contained in:
cyberpwn
2021-09-23 10:56:22 -04:00
parent 1628652264
commit e19784a429
3 changed files with 46 additions and 34 deletions

View File

@@ -29,11 +29,11 @@ import java.io.IOException;
import java.util.Map;
import java.util.function.Supplier;
public class PaletteOrHunk<T> extends StorageHunk<T> implements Hunk<T> {
public abstract class PaletteOrHunk<T> extends StorageHunk<T> implements Hunk<T>, Writable<T> {
private final Hunk<T> hunk;
public PaletteOrHunk(int width, int height, int depth, boolean allow, Writable<T> writable, Supplier<Hunk<T>> factory) {
public PaletteOrHunk(int width, int height, int depth, boolean allow, Supplier<Hunk<T>> factory) {
super(width, height, depth);
hunk = (allow) ? new PaletteHunk<>(width, height, depth, writable) : factory.get();
hunk = (allow) ? new PaletteHunk<>(width, height, depth, this) : factory.get();
}
public DataContainer<T> palette()