mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-30 09:44:24 +00:00
Follow the API's move of MantleCodec to com.volmit.data.Codec
This commit is contained in:
1 parent
a905dc24e7
commit
7c90040924
7 files changed
+24
-24
No files matched your search
@@ -41,7 +41,7 @@ import com.volmit.host.LoadedPack;
|
||||
import com.volmit.host.ModuleHost;
|
||||
import com.volmit.geometry.BlockBox;
|
||||
import com.volmit.geometry.BlockPosition;
|
||||
import com.volmit.mantle.MantleCodec;
|
||||
import com.volmit.data.Codec;
|
||||
import com.volmit.mantle.MantleKey;
|
||||
import com.volmit.mantle.MantleLifetime;
|
||||
import com.volmit.placement.PlacedBlock;
|
||||
@@ -86,7 +86,7 @@ public class DimensionBottomTest {
|
||||
private static final BlockBox WHOLE_HEIGHT_AROUND_ONE_CHUNK = new BlockBox(-16, BOTTOM, -16, 32, DIMENSION_HEIGHT, 32);
|
||||
private static final BlockState STONE = BlockState.parse("minecraft:stone");
|
||||
private static final MantleKey<String> MARKS = new MantleKey<>("test:bottom/mark", String.class);
|
||||
private static final MantleCodec<String> TEXT = new MantleCodec<>() {
|
||||
private static final Codec<String> TEXT = new Codec<>() {
|
||||
public int version() { return 1; }
|
||||
public void write(DataOutput output, String value) throws IOException { output.writeUTF(value); }
|
||||
public String read(DataInput input, int storedVersion) throws IOException { return input.readUTF(); }
|
||||
|
||||
@@ -12,7 +12,7 @@ import art.arcane.volmlib.util.mantle.runtime.MantleHooks;
|
||||
import art.arcane.volmlib.util.matter.IrisMatter;
|
||||
import art.arcane.volmlib.util.matter.Matter;
|
||||
import art.arcane.volmlib.util.matter.MatterSlice;
|
||||
import com.volmit.mantle.MantleCodec;
|
||||
import com.volmit.data.Codec;
|
||||
import com.volmit.mantle.MantleKey;
|
||||
|
||||
import java.io.DataOutputStream;
|
||||
@@ -55,7 +55,7 @@ public final class InMemoryMantle {
|
||||
}
|
||||
|
||||
/** What the layer holds at a block of the mantle's storage coordinates, or null. */
|
||||
public <T> T value(MantleKey<T> key, MantleCodec<T> codec, int x, int mantleY, int z) {
|
||||
public <T> T value(MantleKey<T> key, Codec<T> codec, int x, int mantleY, int z) {
|
||||
MantleChunk<Matter> chunk = chunk(x >> 4, z >> 4);
|
||||
if (!chunk.exists(mantleY >> 4) || !chunk.get(mantleY >> 4).hasSlice(ModuleLayerValues.class)) {
|
||||
return null;
|
||||
|
||||
@@ -47,7 +47,7 @@ import com.volmit.host.LoadedPack;
|
||||
import com.volmit.host.MantleRegistration;
|
||||
import com.volmit.host.ModuleHost;
|
||||
import com.volmit.geometry.BlockBox;
|
||||
import com.volmit.mantle.MantleCodec;
|
||||
import com.volmit.data.Codec;
|
||||
import com.volmit.mantle.MantleEdit;
|
||||
import com.volmit.mantle.MantleKey;
|
||||
import com.volmit.mantle.MantleLayer;
|
||||
@@ -87,12 +87,12 @@ public class IrisModuleMantleTest {
|
||||
private static final int HEIGHT = SECTIONS * 16;
|
||||
private static final MantleKey<String> MARKS = new MantleKey<>("iris:marks/mark", String.class);
|
||||
private static final MantleKey<Integer> DEPTHS = new MantleKey<>("iris:marks/depth", Integer.class);
|
||||
private static final MantleCodec<String> TEXT = new MantleCodec<>() {
|
||||
private static final Codec<String> TEXT = new Codec<>() {
|
||||
public int version() { return 1; }
|
||||
public void write(DataOutput output, String value) throws IOException { output.writeUTF(value); }
|
||||
public String read(DataInput input, int storedVersion) throws IOException { return input.readUTF(); }
|
||||
};
|
||||
private static final MantleCodec<Integer> NUMBER = new MantleCodec<>() {
|
||||
private static final Codec<Integer> NUMBER = new Codec<>() {
|
||||
public int version() { return 0; }
|
||||
public void write(DataOutput output, Integer value) throws IOException { output.writeInt(value); }
|
||||
public Integer read(DataInput input, int storedVersion) throws IOException { return input.readInt(); }
|
||||
|
||||
@@ -5,7 +5,7 @@ import art.arcane.iris.engine.framework.Engine;
|
||||
import com.volmit.placement.PlacementTerrain;
|
||||
import com.volmit.host.MantleRegistration;
|
||||
import com.volmit.geometry.BlockBox;
|
||||
import com.volmit.mantle.MantleCodec;
|
||||
import com.volmit.data.Codec;
|
||||
import com.volmit.mantle.MantleKey;
|
||||
import com.volmit.mantle.MantleLifetime;
|
||||
import org.junit.After;
|
||||
@@ -30,7 +30,7 @@ public class PlacementMantleTest {
|
||||
private static final int HEIGHT = 64;
|
||||
private static final int Y = 20;
|
||||
private static final MantleKey<String> MARKS = new MantleKey<>("iris:marks/mark", String.class);
|
||||
private static final MantleCodec<String> TEXT = new MantleCodec<>() {
|
||||
private static final Codec<String> TEXT = new Codec<>() {
|
||||
public int version() { return 1; }
|
||||
public void write(DataOutput output, String value) throws IOException { output.writeUTF(value); }
|
||||
public String read(DataInput input, int storedVersion) throws IOException { return input.readUTF(); }
|
||||
|
||||
+2
-2
@@ -42,7 +42,7 @@ import com.volmit.ModuleSetup;
|
||||
import com.volmit.block.BlockState;
|
||||
import com.volmit.geometry.BlockPosition;
|
||||
import com.volmit.mantle.Mantle;
|
||||
import com.volmit.mantle.MantleCodec;
|
||||
import com.volmit.data.Codec;
|
||||
import com.volmit.mantle.MantleKey;
|
||||
import com.volmit.mantle.MantleLifetime;
|
||||
import com.volmit.host.LoadedPack;
|
||||
@@ -469,7 +469,7 @@ public class ObjectPlacementRegressionTest {
|
||||
}
|
||||
|
||||
private static final MantleKey<String> MARKS = new MantleKey<>("test:mark/spot", String.class);
|
||||
private static final MantleCodec<String> TEXT = new MantleCodec<>() {
|
||||
private static final Codec<String> TEXT = new Codec<>() {
|
||||
public int version() { return 1; }
|
||||
public void write(java.io.DataOutput output, String value) throws IOException { output.writeUTF(value); }
|
||||
public String read(java.io.DataInput input, int storedVersion) throws IOException { return input.readUTF(); }
|
||||
|
||||
Reference in new issue
Block a user