Package net.minecraft.server.commands
Class LootCommand
java.lang.Object
net.minecraft.server.commands.LootCommand
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface(package private) static interface(package private) static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionTypestatic final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSourceStack> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T extends com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,T>>
TaddTargets(T p_137903_, LootCommand.TailProvider p_137904_) private static intblockDistribute(CommandSourceStack p_137961_, BlockPos p_137962_, List<ItemStack> p_137963_, LootCommand.Callback p_137964_) private static intblockReplace(CommandSourceStack p_137954_, BlockPos p_137955_, int p_137956_, int p_137957_, List<ItemStack> p_137958_, LootCommand.Callback p_137959_) private static voidcallback(CommandSourceStack p_137966_, List<ItemStack> p_137967_) private static voidcallback(CommandSourceStack p_137969_, List<ItemStack> p_137970_, ResourceLocation p_137971_) private static booleancanMergeItems(ItemStack p_137895_, ItemStack p_137896_) private static booleandistributeToContainer(Container p_137886_, ItemStack p_137887_) private static intdrop(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137922_, ResourceLocation p_137923_, LootContext p_137924_, LootCommand.DropConsumer p_137925_) private static intdropBlockLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137913_, BlockPos p_137914_, ItemStack p_137915_, LootCommand.DropConsumer p_137916_) private static intdropChestLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137933_, ResourceLocation p_137934_, LootCommand.DropConsumer p_137935_) private static intdropFishingLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137927_, ResourceLocation p_137928_, BlockPos p_137929_, ItemStack p_137930_, LootCommand.DropConsumer p_137931_) private static intdropInWorld(CommandSourceStack p_137946_, Vec3 p_137947_, List<ItemStack> p_137948_, LootCommand.Callback p_137949_) private static intdropKillLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137906_, Entity p_137907_, LootCommand.DropConsumer p_137908_) private static intentityReplace(Collection<? extends Entity> p_137979_, int p_137980_, int p_137981_, List<ItemStack> p_137982_, LootCommand.Callback p_137983_) private static ContainergetContainer(CommandSourceStack p_137951_, BlockPos p_137952_) private static ItemStackgetSourceHandItem(CommandSourceStack p_137939_, EquipmentSlot p_137940_) private static intplayerGive(Collection<ServerPlayer> p_137985_, List<ItemStack> p_137986_, LootCommand.Callback p_137987_) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_214516_, CommandBuildContext p_214517_) private static voidsetSlots(Entity p_137889_, List<ItemStack> p_137890_, int p_137891_, int p_137892_, List<ItemStack> p_137893_)
-
Field Details
-
SUGGEST_LOOT_TABLE
public static final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSourceStack> SUGGEST_LOOT_TABLE -
ERROR_NO_HELD_ITEMS
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_NO_HELD_ITEMS -
ERROR_NO_LOOT_TABLE
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_NO_LOOT_TABLE
-
-
Constructor Details
-
LootCommand
public LootCommand()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_214516_, CommandBuildContext p_214517_) -
addTargets
private static <T extends com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,T>> T addTargets(T p_137903_, LootCommand.TailProvider p_137904_) -
getContainer
private static Container getContainer(CommandSourceStack p_137951_, BlockPos p_137952_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
blockDistribute
private static int blockDistribute(CommandSourceStack p_137961_, BlockPos p_137962_, List<ItemStack> p_137963_, LootCommand.Callback p_137964_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
distributeToContainer
-
blockReplace
private static int blockReplace(CommandSourceStack p_137954_, BlockPos p_137955_, int p_137956_, int p_137957_, List<ItemStack> p_137958_, LootCommand.Callback p_137959_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
canMergeItems
-
playerGive
private static int playerGive(Collection<ServerPlayer> p_137985_, List<ItemStack> p_137986_, LootCommand.Callback p_137987_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setSlots
-
entityReplace
private static int entityReplace(Collection<? extends Entity> p_137979_, int p_137980_, int p_137981_, List<ItemStack> p_137982_, LootCommand.Callback p_137983_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
dropInWorld
private static int dropInWorld(CommandSourceStack p_137946_, Vec3 p_137947_, List<ItemStack> p_137948_, LootCommand.Callback p_137949_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
callback
-
callback
private static void callback(CommandSourceStack p_137969_, List<ItemStack> p_137970_, ResourceLocation p_137971_) -
getSourceHandItem
private static ItemStack getSourceHandItem(CommandSourceStack p_137939_, EquipmentSlot p_137940_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
dropBlockLoot
private static int dropBlockLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137913_, BlockPos p_137914_, ItemStack p_137915_, LootCommand.DropConsumer p_137916_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
dropKillLoot
private static int dropKillLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137906_, Entity p_137907_, LootCommand.DropConsumer p_137908_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
dropChestLoot
private static int dropChestLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137933_, ResourceLocation p_137934_, LootCommand.DropConsumer p_137935_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
dropFishingLoot
private static int dropFishingLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137927_, ResourceLocation p_137928_, BlockPos p_137929_, ItemStack p_137930_, LootCommand.DropConsumer p_137931_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
drop
private static int drop(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137922_, ResourceLocation p_137923_, LootContext p_137924_, LootCommand.DropConsumer p_137925_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-