mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-05 23:36:12 +00:00
Data fixes for tec plates
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
package com.volmit.iris.util.matter;
|
||||
|
||||
import com.volmit.iris.engine.data.cache.Cache;
|
||||
import com.volmit.iris.util.data.Varint;
|
||||
import com.volmit.iris.util.data.palette.Palette;
|
||||
import com.volmit.iris.util.data.palette.PaletteType;
|
||||
import com.volmit.iris.util.hunk.Hunk;
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2021 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.volmit.iris.util.matter;
|
||||
|
||||
public class MatterTest {
|
||||
public static void test() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@ public class BlockMatter extends RawMatter<BlockData> {
|
||||
}
|
||||
|
||||
public BlockMatter(int width, int height, int depth) {
|
||||
super(width, height, depth, BlockData.class, AIR);
|
||||
super(width, height, depth, BlockData.class);
|
||||
registerWriter(World.class, ((w, d, x, y, z) -> w.getBlockAt(x, y, z).setBlockData(d)));
|
||||
registerReader(World.class, (w, x, y, z) -> {
|
||||
BlockData d = w.getBlockAt(x, y, z).getBlockData();
|
||||
|
||||
@@ -37,7 +37,7 @@ public class BooleanMatter extends RawMatter<Boolean> {
|
||||
}
|
||||
|
||||
public BooleanMatter(int width, int height, int depth) {
|
||||
super(width, height, depth, Boolean.class, false);
|
||||
super(width, height, depth, Boolean.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -40,7 +40,7 @@ public class CavernMatter extends RawMatter<MatterCavern> {
|
||||
}
|
||||
|
||||
public CavernMatter(int width, int height, int depth) {
|
||||
super(width, height, depth, MatterCavern.class, EMPTY);
|
||||
super(width, height, depth, MatterCavern.class);
|
||||
}
|
||||
|
||||
public static MatterCavern get(String customBiome, int liquid) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class EntityMatter extends RawMatter<MatterEntityGroup> {
|
||||
}
|
||||
|
||||
public EntityMatter(int width, int height, int depth) {
|
||||
super(width, height, depth, MatterEntityGroup.class, EMPTY);
|
||||
super(width, height, depth, MatterEntityGroup.class);
|
||||
registerWriter(World.class, ((w, d, x, y, z) -> {
|
||||
for (MatterEntity i : d.getEntities()) {
|
||||
Location realPosition = new Location(w, x + i.getXOff(), y + i.getYOff(), z + i.getZOff());
|
||||
|
||||
@@ -38,7 +38,7 @@ public class IntMatter extends RawMatter<Integer> {
|
||||
}
|
||||
|
||||
public IntMatter(int width, int height, int depth) {
|
||||
super(width, height, depth, Integer.class, 0);
|
||||
super(width, height, depth, Integer.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -38,7 +38,7 @@ public class LongMatter extends RawMatter<Long> {
|
||||
}
|
||||
|
||||
public LongMatter(int width, int height, int depth) {
|
||||
super(width, height, depth, Long.class, 0L);
|
||||
super(width, height, depth, Long.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -44,7 +44,7 @@ public class MarkerMatter extends RawMatter<MatterMarker> {
|
||||
}
|
||||
|
||||
public MarkerMatter(int width, int height, int depth) {
|
||||
super(width, height, depth, MatterMarker.class, NONE);
|
||||
super(width, height, depth, MatterMarker.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.io.IOException;
|
||||
|
||||
public class NBTMatter<T extends Tag<?>> extends RawMatter<T> {
|
||||
public NBTMatter(int width, int height, int depth, Class<T> c, T e) {
|
||||
super(width, height, depth, c, e);
|
||||
super(width, height, depth, c);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,8 +36,8 @@ public abstract class RawMatter<T> extends PaletteOrHunk<T> implements MatterSli
|
||||
@Getter
|
||||
private final Class<T> type;
|
||||
|
||||
public RawMatter(int width, int height, int depth, Class<T> type, T e) {
|
||||
super(width, height, depth, false, () -> new MappedHunk<>(width, height, depth), e);
|
||||
public RawMatter(int width, int height, int depth, Class<T> type) {
|
||||
super(width, height, depth, true, () -> new MappedHunk<>(width, height, depth));
|
||||
writers = new KMap<>();
|
||||
readers = new KMap<>();
|
||||
this.type = type;
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.io.IOException;
|
||||
|
||||
public class RegistryMatter<T extends IrisRegistrant> extends RawMatter<T> {
|
||||
public RegistryMatter(int width, int height, int depth, Class<T> c, T e) {
|
||||
super(width, height, depth, c, e);
|
||||
super(width, height, depth, c);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -32,7 +32,7 @@ public class StringMatter extends RawMatter<String> {
|
||||
}
|
||||
|
||||
public StringMatter(int width, int height, int depth) {
|
||||
super(width, height, depth, String.class, "");
|
||||
super(width, height, depth, String.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,7 +45,7 @@ public class TileMatter extends RawMatter<MatterTile> {
|
||||
}
|
||||
|
||||
public TileMatter(int width, int height, int depth) {
|
||||
super(width, height, depth, MatterTile.class, EMPTY);
|
||||
super(width, height, depth, MatterTile.class);
|
||||
registerWriter(World.class, ((w, d, x, y, z) -> INMS.get().deserializeTile(d.getTileData(), new Location(w, x, y, z))));
|
||||
registerReader(World.class, (w, x, y, z) -> {
|
||||
Location l = new Location(w, x, y, z);
|
||||
|
||||
@@ -43,7 +43,7 @@ public class UpdateMatter extends RawMatter<MatterUpdate> {
|
||||
}
|
||||
|
||||
public UpdateMatter(int width, int height, int depth) {
|
||||
super(width, height, depth, MatterUpdate.class, OFF);
|
||||
super(width, height, depth, MatterUpdate.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user