WorldCreationGameRulesScreen .java

net.minecraft.client.gui.screens.worldselection.WorldCreationGameRulesScreen (class, 30 lines): members: initContent, onDone, onClose. imports: GameRules.

net.minecraft.client.gui.screens.worldselectionclass30 linesclientextends AbstractGameRulesScreen798 B

API Surface (3)

void initContent()
void onDone()
void onClose()

Code Graph: Dependencies (3)

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

Full Source

WorldCreationGameRulesScreen.java30 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.gui.screens.worldselection;
2
3
import java.util.Optional;
4
import java.util.function.Consumer;
5
import net.fabricmc.api.EnvType;
6
import net.fabricmc.api.Environment;
7
import net.minecraft.world.level.gamerules.GameRules;
8
9
@Environment(EnvType.CLIENT)
10
public class WorldCreationGameRulesScreen extends AbstractGameRulesScreen {
11
	public WorldCreationGameRulesScreen(final GameRules gameRules, final Consumer<Optional<GameRules>> exitCallback) {
12
		super(gameRules, exitCallback);
13
	}
14
15
	@Override
16
	protected void initContent() {
17
		this.ruleList = this.layout.addToContents(new AbstractGameRulesScreen.RuleList(this.gameRules));
18
	}
19
20
	@Override
21
	protected void onDone() {
22
		this.closeAndApplyChanges();
23
	}
24
25
	@Override
26
	public void onClose() {
27
		this.closeAndDiscardChanges();
28
	}
29
}
30

Decompiled Minecraft 26.3 source of WorldCreationGameRulesScreen (net/minecraft/client/gui/screens/worldselection/WorldCreationGameRulesScreen.java) with Mojang official mappings, stored verbatim on the site.