mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-27 19:19:07 +00:00
Allow disabling paletted hunks
This commit is contained in:
@@ -399,6 +399,17 @@ public class B {
|
||||
public static BlockData getOrNull(String bdxf) {
|
||||
try {
|
||||
String bd = bdxf.trim();
|
||||
|
||||
if(bd.startsWith("minecraft:cauldron[level="))
|
||||
{
|
||||
bd = bd.replaceAll("\\Q:cauldron[\\E", ":water_cauldron[");
|
||||
}
|
||||
|
||||
if(bd.equals("minecraft:grass_path"))
|
||||
{
|
||||
return DIRT_PATH.createBlockData();
|
||||
}
|
||||
|
||||
BlockData bdx = parseBlockData(bd);
|
||||
|
||||
if (bdx == null) {
|
||||
|
||||
@@ -29,9 +29,9 @@ import java.util.function.Supplier;
|
||||
|
||||
public class PaletteOrHunk<T> extends StorageHunk<T> implements Hunk<T> {
|
||||
private final Hunk<T> hunk;
|
||||
public PaletteOrHunk(int width, int height, int depth, Supplier<Hunk<T>> factory) {
|
||||
public PaletteOrHunk(int width, int height, int depth, boolean allow, Supplier<Hunk<T>> factory) {
|
||||
super(width, height, depth);
|
||||
hunk = width == 16 && height == 16 && depth == 16 ? new PaletteHunk<>() : factory.get();
|
||||
hunk = (width == 16 && height == 16 && depth == 16 && allow) ? new PaletteHunk<>() : factory.get();
|
||||
}
|
||||
|
||||
public PalettedContainer<T> palette()
|
||||
|
||||
@@ -37,7 +37,7 @@ public abstract class RawMatter<T> extends PaletteOrHunk<T> implements MatterSli
|
||||
private final Class<T> type;
|
||||
|
||||
public RawMatter(int width, int height, int depth, Class<T> type) {
|
||||
super(width, height, depth, () -> new MappedHunk<>(width, height, depth));
|
||||
super(width, height, depth, true, () -> new MappedHunk<>(width, height, depth));
|
||||
writers = new KMap<>();
|
||||
readers = new KMap<>();
|
||||
this.type = type;
|
||||
|
||||
Reference in New Issue
Block a user