TemplateRotationArgument .java

net.minecraft.commands.arguments.TemplateRotationArgument (class, 20 lines): members: templateRotation, getRotation. imports: Rotation, CommandContext.

net.minecraft.commands.argumentsclass20 linescommonextends StringRepresentableArgument<Rotation>636 B

API Surface (2)

TemplateRotationArgument templateRotation()
Rotation getRotation(final CommandContext<CommandSourceStack> context, final String name)

Code Graph: Dependencies (3)

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

Full Source

TemplateRotationArgument.java20 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.commands.arguments;
2
3
import com.mojang.brigadier.context.CommandContext;
4
import net.minecraft.commands.CommandSourceStack;
5
import net.minecraft.world.level.block.Rotation;
6
7
public class TemplateRotationArgument extends StringRepresentableArgument<Rotation> {
8
	private TemplateRotationArgument() {
9
		super(Rotation.CODEC, Rotation::values);
10
	}
11
12
	public static TemplateRotationArgument templateRotation() {
13
		return new TemplateRotationArgument();
14
	}
15
16
	public static Rotation getRotation(final CommandContext<CommandSourceStack> context, final String name) {
17
		return context.getArgument(name, Rotation.class);
18
	}
19
}
20

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