DataPackConfig .java

net.minecraft.world.level.DataPackConfig (class): members: getDisabled, getEnabled, disabled, enabled, DEFAULT, CODEC. strings: "Disabled", "Enabled".

net.minecraft.world.levelclass30 linescommon1009 B

API Surface (2)

List<String> getEnabled()
List<String> getDisabled()

Fields & Constants (4)

DEFAULT
CODEC
enabled
disabled

String literals (3)

"vanilla"
"Enabled"
"Disabled"

Full Source

DataPackConfig.java30 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level;
2
3
import com.google.common.collect.ImmutableList;
4
import com.mojang.serialization.Codec;
5
import com.mojang.serialization.codecs.RecordCodecBuilder;
6
import java.util.List;
7
8
public class DataPackConfig {
9
	public static final DataPackConfig DEFAULT = new DataPackConfig(ImmutableList.of("vanilla"), ImmutableList.of());
10
	public static final Codec<DataPackConfig> CODEC = RecordCodecBuilder.create(
11
		i -> i.group(Codec.STRING.listOf().fieldOf("Enabled").forGetter(o -> o.enabled), Codec.STRING.listOf().fieldOf("Disabled").forGetter(o -> o.disabled))
12
			.apply(i, DataPackConfig::new)
13
	);
14
	private final List<String> enabled;
15
	private final List<String> disabled;
16
17
	public DataPackConfig(final List<String> enabled, final List<String> disabled) {
18
		this.enabled = ImmutableList.copyOf(enabled);
19
		this.disabled = ImmutableList.copyOf(disabled);
20
	}
21
22
	public List<String> getEnabled() {
23
		return this.enabled;
24
	}
25
26
	public List<String> getDisabled() {
27
		return this.disabled;
28
	}
29
}
30

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