Package net.minecraft.server.command
Class ReplaceItemCommand
java.lang.Object
net.minecraft.server.command.ReplaceItemCommand
public class ReplaceItemCommand extends Object
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
BLOCK_FAILED_EXCEPTION
static com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
ENTITY_FAILED_EXCEPTION
static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
SLOT_INAPPLICABLE_EXCEPTION
-
Constructor Summary
Constructors Constructor Description ReplaceItemCommand()
-
Method Summary
Modifier and Type Method Description private static int
executeBlock(ServerCommandSource source, BlockPos pos, int slot, ItemStack item)
private static int
executeEntity(ServerCommandSource source, Collection<? extends Entity> targets, int slot, ItemStack item)
static void
register(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher)
-
Field Details
-
BLOCK_FAILED_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType BLOCK_FAILED_EXCEPTION -
SLOT_INAPPLICABLE_EXCEPTION
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType SLOT_INAPPLICABLE_EXCEPTION -
ENTITY_FAILED_EXCEPTION
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ENTITY_FAILED_EXCEPTION
-
-
Constructor Details
-
ReplaceItemCommand
public ReplaceItemCommand()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher) -
executeBlock
private static int executeBlock(ServerCommandSource source, BlockPos pos, int slot, ItemStack item) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
executeEntity
private static int executeEntity(ServerCommandSource source, Collection<? extends Entity> targets, int slot, ItemStack item)
-