minecraft-src/net/minecraft/commands/arguments/TemplateRotationArgument.java
2025-07-04 01:41:11 +03:00

19 lines
624 B
Java

package net.minecraft.commands.arguments;
import com.mojang.brigadier.context.CommandContext;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.world.level.block.Rotation;
public class TemplateRotationArgument extends StringRepresentableArgument<Rotation> {
private TemplateRotationArgument() {
super(Rotation.CODEC, Rotation::values);
}
public static TemplateRotationArgument templateRotation() {
return new TemplateRotationArgument();
}
public static Rotation getRotation(CommandContext<CommandSourceStack> context, String name) {
return context.getArgument(name, Rotation.class);
}
}