public class LootCommand extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
LootCommand.FeedbackMessage |
(package private) static interface |
LootCommand.SourceConstructor |
(package private) static interface |
LootCommand.Target |
Modifier and Type | Field and Description |
---|---|
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType |
NO_HELD_ITEMS_EXCEPTION |
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType |
NO_LOOT_TABLE_EXCEPTION |
static com.mojang.brigadier.suggestion.SuggestionProvider<ServerCommandSource> |
SUGGESTION_PROVIDER |
Constructor and Description |
---|
LootCommand() |
Modifier and Type | Method and Description |
---|---|
private static <T extends com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,T>> |
addTargetArguments(T rootArgument,
LootCommand.SourceConstructor sourceConstructor) |
private static int |
executeBlock(ServerCommandSource source,
BlockPos targetPos,
int slot,
int stackCount,
List<ItemStack> stacks,
LootCommand.FeedbackMessage messageSender) |
private static int |
executeFish(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context,
Identifier lootTable,
BlockPos pos,
ItemStack stack,
LootCommand.Target constructor) |
private static int |
executeGive(Collection<ServerPlayerEntity> players,
List<ItemStack> stacks,
LootCommand.FeedbackMessage messageSender) |
private static int |
executeInsert(ServerCommandSource source,
BlockPos targetPos,
List<ItemStack> stacks,
LootCommand.FeedbackMessage messageSender) |
private static int |
executeKill(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context,
Entity entity,
LootCommand.Target constructor) |
private static int |
executeLoot(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context,
Identifier lootTable,
LootCommand.Target constructor) |
private static int |
executeMine(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context,
BlockPos pos,
ItemStack stack,
LootCommand.Target constructor) |
private static int |
executeReplace(Collection<? extends Entity> targets,
int slot,
int stackCount,
List<ItemStack> stacks,
LootCommand.FeedbackMessage messageSender) |
private static int |
executeSpawn(ServerCommandSource source,
Vec3d pos,
List<ItemStack> stacks,
LootCommand.FeedbackMessage messageSender) |
private static Inventory |
getBlockInventory(ServerCommandSource source,
BlockPos pos) |
private static int |
getFeedbackMessageSingle(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context,
Identifier lootTable,
LootContext lootContext,
LootCommand.Target constructor) |
private static ItemStack |
getHeldItem(ServerCommandSource source,
EquipmentSlot slot) |
private static boolean |
insert(Inventory inventory,
ItemStack stack) |
private static boolean |
itemsMatch(ItemStack first,
ItemStack second) |
static void |
register(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher) |
private static void |
replace(Entity entity,
List<ItemStack> stacks,
int slot,
int stackCount,
List<ItemStack> addedStacks) |
private static void |
sendDroppedFeedback(ServerCommandSource source,
List<ItemStack> stacks) |
private static void |
sendDroppedFeedback(ServerCommandSource source,
List<ItemStack> stacks,
Identifier lootTable) |
public static final com.mojang.brigadier.suggestion.SuggestionProvider<ServerCommandSource> SUGGESTION_PROVIDER
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType NO_HELD_ITEMS_EXCEPTION
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType NO_LOOT_TABLE_EXCEPTION
public static void register(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher)
private static <T extends com.mojang.brigadier.builder.ArgumentBuilder<ServerCommandSource,T>> T addTargetArguments(T rootArgument, LootCommand.SourceConstructor sourceConstructor)
private static Inventory getBlockInventory(ServerCommandSource source, BlockPos pos) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private static int executeInsert(ServerCommandSource source, BlockPos targetPos, List<ItemStack> stacks, LootCommand.FeedbackMessage messageSender)
private static int executeBlock(ServerCommandSource source, BlockPos targetPos, int slot, int stackCount, List<ItemStack> stacks, LootCommand.FeedbackMessage messageSender)
private static int executeGive(Collection<ServerPlayerEntity> players, List<ItemStack> stacks, LootCommand.FeedbackMessage messageSender)
private static void replace(Entity entity, List<ItemStack> stacks, int slot, int stackCount, List<ItemStack> addedStacks)
private static int executeReplace(Collection<? extends Entity> targets, int slot, int stackCount, List<ItemStack> stacks, LootCommand.FeedbackMessage messageSender)
private static int executeSpawn(ServerCommandSource source, Vec3d pos, List<ItemStack> stacks, LootCommand.FeedbackMessage messageSender)
private static void sendDroppedFeedback(ServerCommandSource source, List<ItemStack> stacks)
private static void sendDroppedFeedback(ServerCommandSource source, List<ItemStack> stacks, Identifier lootTable)
private static ItemStack getHeldItem(ServerCommandSource source, EquipmentSlot slot) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private static int executeMine(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, BlockPos pos, ItemStack stack, LootCommand.Target constructor)
private static int executeKill(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, Entity entity, LootCommand.Target constructor)
private static int executeLoot(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, Identifier lootTable, LootCommand.Target constructor)
private static int executeFish(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, Identifier lootTable, BlockPos pos, ItemStack stack, LootCommand.Target constructor)
private static int getFeedbackMessageSingle(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, Identifier lootTable, LootContext lootContext, LootCommand.Target constructor)