WorldVersion .java

net.minecraft.WorldVersion (interface): members: resourcePackVersion, datapackVersion, packVersion, buildTime, protocolVersion, dataVersion, stable, name.

net.minecraftinterface42 linescommon848 B

API Surface (1)

PackFormat packVersion(final PackType packType)

Fields & Constants (7)

id
name
dataVersion
protocolVersion
resourcePackVersion
datapackVersion
buildTime

Code Graph: Dependencies (3)

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

Full Source

WorldVersion.java42 lines · Minecraft 26.3 · verbatim
1
package net.minecraft;
2
3
import java.util.Date;
4
import net.minecraft.server.packs.PackType;
5
import net.minecraft.server.packs.metadata.pack.PackFormat;
6
import net.minecraft.world.level.storage.DataVersion;
7
8
public interface WorldVersion {
9
	DataVersion dataVersion();
10
11
	String id();
12
13
	String name();
14
15
	int protocolVersion();
16
17
	PackFormat packVersion(PackType packType);
18
19
	Date buildTime();
20
21
	boolean stable();
22
23
	record Simple(
24
		String id,
25
		String name,
26
		DataVersion dataVersion,
27
		int protocolVersion,
28
		PackFormat resourcePackVersion,
29
		PackFormat datapackVersion,
30
		Date buildTime,
31
		boolean stable
32
	) implements WorldVersion {
33
		@Override
34
		public PackFormat packVersion(final PackType packType) {
35
			return switch (packType) {
36
				case CLIENT_RESOURCES -> this.resourcePackVersion;
37
				case SERVER_DATA -> this.datapackVersion;
38
			};
39
		}
40
	}
41
}
42

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