mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
- Split into Gradle subprojects api (com.volmit:iris-api) and host (com.volmit:iris-host). ExposedPackages never exposes com.volmit.host. - One unchecked ModuleLoadException(moduleId, origin, message, cause) for every load error; messages unchanged. - PlacementAccess.set(x, y, z, state) next to set(PlacedBlock). - BlockState: precompiled patterns, withProperty copies once. - Mantle and layer views are made once per invocation. - Hunk getters are width(), height(), depth(). - Held types and host types are deprecated for removal at the cut-over. - Docs: artifacts, one-or-more modules per jar, no option shorthand.
19 lines
646 B
Java
19 lines
646 B
Java
package com.volmit.mantle;
|
|
|
|
import java.io.DataInput;
|
|
import java.io.DataOutput;
|
|
import java.io.IOException;
|
|
|
|
/** Value serialization. Host frames payloads and stores key ID and version separately.
|
|
* Implementations must support concurrent calls, must not close streams, and must reject
|
|
* malformed data or unsupported stored versions with IOException. Values cannot be null.
|
|
*/
|
|
public interface MantleCodec<T> {
|
|
/** Nonnegative format version, stable for the registration lifetime. */
|
|
int version();
|
|
|
|
void write(DataOutput output, T value) throws IOException;
|
|
|
|
T read(DataInput input, int storedVersion) throws IOException;
|
|
}
|