CachedOutput .java

net.minecraft.data.CachedOutput (interface, 17 lines): interface declaring 1 method. members: writeIfNeeded, NO_CACHE. imports: HashCode, FileUtil.

net.minecraft.datainterface17 linescommon438 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Fields & Constants (1)

NO_CACHE

Code Graph: Dependencies (2)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

CachedOutput.java17 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.data;
2
3
import com.google.common.hash.HashCode;
4
import java.io.IOException;
5
import java.nio.file.Files;
6
import java.nio.file.Path;
7
import net.minecraft.util.FileUtil;
8
9
public interface CachedOutput {
10
	CachedOutput NO_CACHE = (path, input, hash) -> {
11
		FileUtil.createDirectoriesSafe(path.getParent());
12
		Files.write(path, input);
13
	};
14
15
	void writeIfNeeded(Path path, byte[] input, HashCode hash) throws IOException;
16
}
17

Decompiled Minecraft 26.3 source of CachedOutput (net/minecraft/data/CachedOutput.java) with Mojang official mappings, stored verbatim on the site.