Class ScanCommand
java.lang.Object
com.ldtteam.structurize.commands.AbstractCommand
com.minecolonies.core.commands.generalcommands.ScanCommand
public class ScanCommand
extends com.ldtteam.structurize.commands.AbstractCommand
Command for opening WindowScanTool or scanning a structure into a file
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ldtteam.structurize.commands.AbstractCommand
com.ldtteam.structurize.commands.AbstractCommand.CommandTree, com.ldtteam.structurize.commands.AbstractCommand.StructurizeCommandExceptionType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAnchor position command argument.static final StringThe filename command argument.static final StringDescriptive string.static final StringThe player name command argument.static final StringPosition 1 command argument.static final StringPosition 2 command argument. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack>build()static @NotNull Stringformat(com.ldtteam.structurize.util.ScanToolData.Slot slot) Generates a command string for the given parameters.static voidsaveStructure(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, com.ldtteam.structurize.util.ScanToolData.Slot slot, boolean saveEntities) Scan the structure and save it to the disk.Methods inherited from class com.ldtteam.structurize.commands.AbstractCommand
getEnvironmentType, newArgument, newLiteral, throwSyntaxException, throwSyntaxException
-
Field Details
-
NAME
Descriptive string.- See Also:
-
FILE_NAME
The filename command argument.- See Also:
-
PLAYER_NAME
The player name command argument.- See Also:
-
POS1
Position 1 command argument.- See Also:
-
POS2
Position 2 command argument.- See Also:
-
ANCHOR_POS
Anchor position command argument.- See Also:
-
-
Constructor Details
-
ScanCommand
public ScanCommand()
-
-
Method Details
-
saveStructure
public static void saveStructure(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, com.ldtteam.structurize.util.ScanToolData.Slot slot, boolean saveEntities) Scan the structure and save it to the disk.- Parameters:
world- Current world.player- causing this action.slot- the scan data.saveEntities- whether to scan in entities
-
build
public static com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> build() -
format
@NotNull public static @NotNull String format(@NotNull com.ldtteam.structurize.util.ScanToolData.Slot slot) Generates a command string for the given parameters.- Parameters:
slot- The scan slot data.- Returns:
- The command string.
-