Package net.minecraft.server.commands
Class LootCommand
java.lang.Object
net.minecraft.server.commands.LootCommand
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static interface
(package private) static interface
(package private) static interface
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
static final com.mojang.brigadier.suggestion.SuggestionProvider
<CommandSourceStack> -
Constructor Summary
-
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 int
blockDistribute
(CommandSourceStack p_137961_, BlockPos p_137962_, List<ItemStack> p_137963_, LootCommand.Callback p_137964_) private static int
blockReplace
(CommandSourceStack p_137954_, BlockPos p_137955_, int p_137956_, int p_137957_, List<ItemStack> p_137958_, LootCommand.Callback p_137959_) private static void
callback
(CommandSourceStack p_137966_, List<ItemStack> p_137967_) private static void
callback
(CommandSourceStack p_137969_, List<ItemStack> p_137970_, ResourceKey<LootTable> p_336191_) private static boolean
canMergeItems
(ItemStack p_137895_, ItemStack p_137896_) private static boolean
distributeToContainer
(Container p_137886_, ItemStack p_137887_) private static int
drop
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_287721_, Holder<LootTable> p_335766_, LootParams p_287728_, LootCommand.DropConsumer p_287770_) private static int
dropBlockLoot
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137913_, BlockPos p_137914_, ItemStack p_137915_, LootCommand.DropConsumer p_137916_) private static int
dropChestLoot
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137933_, Holder<LootTable> p_336054_, LootCommand.DropConsumer p_137935_) private static int
dropFishingLoot
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137927_, Holder<LootTable> p_335944_, BlockPos p_137929_, ItemStack p_137930_, LootCommand.DropConsumer p_137931_) private static int
dropInWorld
(CommandSourceStack p_137946_, Vec3 p_137947_, List<ItemStack> p_137948_, LootCommand.Callback p_137949_) private static int
dropKillLoot
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_137906_, Entity p_137907_, LootCommand.DropConsumer p_137908_) private static int
entityReplace
(Collection<? extends Entity> p_137979_, int p_137980_, int p_137981_, List<ItemStack> p_137982_, LootCommand.Callback p_137983_) private static Container
getContainer
(CommandSourceStack p_137951_, BlockPos p_137952_) private static ItemStack
getSourceHandItem
(CommandSourceStack p_137939_, EquipmentSlot p_137940_) private static int
playerGive
(Collection<ServerPlayer> p_137985_, List<ItemStack> p_137986_, LootCommand.Callback p_137987_) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_214516_, CommandBuildContext p_214517_) private static void
setSlots
(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_, ResourceKey<LootTable> p_336191_) -
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_, Holder<LootTable> p_336054_, 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_, Holder<LootTable> p_335944_, 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_287721_, Holder<LootTable> p_335766_, LootParams p_287728_, LootCommand.DropConsumer p_287770_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-