Documentation cleanup

This commit is contained in:
Ruling-0 committed 2026-11-25 14:45:57 -06:00
1 parent dd4bd60c3e
commit 05a424db34
23 files changed
+169 -291

No files matched your search

@@ -7,11 +7,10 @@ import net.minecraft.nbt.NBTTagCompound;
import com.gtnewhorizons.postea.api.IVersionedTransformer;
/**
* The {@code POSTEA_VERSIONS} compound Postea keeps on data handled by {@link IVersionedTransformer}s, one
* int per registered transformer key. Keys of transformers that are not registered in the running session are
* carried through unchanged so a mod that is temporarily absent does not lose its stamps.
*/
/// The `POSTEA_VERSIONS` compound Postea keeps on data handled by [IVersionedTransformer]s, with one int per
/// transformer key.
///
/// Keys of transformers not registered in the running session are carried through unchanged.
public final class VersionStamps {
public static final String KEY = "POSTEA_VERSIONS";
@@ -19,24 +18,18 @@ public final class VersionStamps {
private VersionStamps() {}
/**
* The stamps stored on {@code container}, or null when it carries none.
*/
/// The stamps stored on `container`, or null if it carries none.
public static NBTTagCompound read(NBTTagCompound container) {
return container.hasKey(KEY, TAG_COMPOUND) ? container.getCompoundTag(KEY) : null;
}
/**
* The version stored for {@code key} in {@code stamps} (which may be null), or {@link #UNSTAMPED}.
*/
/// The version stored for `key` in `stamps`, or [#UNSTAMPED]. `stamps` may be null.
public static int stored(NBTTagCompound stamps, String key) {
return stamps != null && stamps.hasKey(key, TAG_INT) ? stamps.getInteger(key) : UNSTAMPED;
}
/**
* Writes the stamps onto {@code container}: {@code carried} (the stamps the data was read with, or null) with
* every registered transformer's key set to its current version.
*/
/// Writes the stamps onto `container`: `carried`, the stamps the data was read with or null, with every
/// transformer's key set to its current version.
public static void write(NBTTagCompound container, NBTTagCompound carried,
Iterable<IVersionedTransformer> transformers) {
NBTTagCompound stamps = carried == null ? new NBTTagCompound() : (NBTTagCompound) carried.copy();