类 LootCommand
java.lang.Object
net.minecraft.server.commands.LootCommand
-
嵌套类概要
嵌套类修饰符和类型类说明(专用程序包) static interface
(专用程序包) static interface
(专用程序包) static interface
-
字段概要
字段修饰符和类型字段说明private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
static final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSourceStack>
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private static <T extends com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,
T>>
TaddTargets
(T pBuilder, LootCommand.TailProvider pTailProvider) private static int
blockDistribute
(CommandSourceStack pSource, BlockPos pPos, List<ItemStack> pItems, LootCommand.Callback pCallback) private static int
blockReplace
(CommandSourceStack pSource, BlockPos pPos, int pSlot, int p_137957_, List<ItemStack> pItems, LootCommand.Callback pCallback) private static void
callback
(CommandSourceStack pSource, List<ItemStack> pItems) private static void
callback
(CommandSourceStack pSource, List<ItemStack> pItems, ResourceLocation pLootTable) private static boolean
canMergeItems
(ItemStack pFirst, ItemStack pSecond) private static boolean
distributeToContainer
(Container pContainer, ItemStack pItem) private static int
drop
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, ResourceLocation pLootTable, LootParams pParams, LootCommand.DropConsumer pDropConsumer) private static int
dropBlockLoot
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, BlockPos pPos, ItemStack p_137915_, LootCommand.DropConsumer pDropConsumer) private static int
dropChestLoot
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, ResourceLocation pLootTable, LootCommand.DropConsumer pDropConsumer) private static int
dropFishingLoot
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, ResourceLocation pLootTable, BlockPos p_137929_, ItemStack p_137930_, LootCommand.DropConsumer pDropConsumer) private static int
dropInWorld
(CommandSourceStack pSource, Vec3 pPos, List<ItemStack> pItems, LootCommand.Callback pCallback) private static int
dropKillLoot
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, Entity pEntity, LootCommand.DropConsumer pDropConsumer) private static int
entityReplace
(Collection<? extends Entity> pTargets, int pStartSlot, int p_137981_, List<ItemStack> pItems, LootCommand.Callback pCallback) private static Container
getContainer
(CommandSourceStack pSource, BlockPos pPos) private static ItemStack
getSourceHandItem
(CommandSourceStack pSource, EquipmentSlot pSlot) private static int
playerGive
(Collection<ServerPlayer> pTargets, List<ItemStack> pItems, LootCommand.Callback pCallback) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> pDispatcher, CommandBuildContext pContext) private static void
setSlots
(Entity pTarget, List<ItemStack> pItems, int pStartSlot, int p_137892_, List<ItemStack> p_137893_)
-
字段详细资料
-
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
-
-
构造器详细资料
-
LootCommand
public LootCommand()
-
-
方法详细资料
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> pDispatcher, CommandBuildContext pContext) -
addTargets
private static <T extends com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,T>> T addTargets(T pBuilder, LootCommand.TailProvider pTailProvider) -
getContainer
private static Container getContainer(CommandSourceStack pSource, BlockPos pPos) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
blockDistribute
private static int blockDistribute(CommandSourceStack pSource, BlockPos pPos, List<ItemStack> pItems, LootCommand.Callback pCallback) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
distributeToContainer
-
blockReplace
private static int blockReplace(CommandSourceStack pSource, BlockPos pPos, int pSlot, int p_137957_, List<ItemStack> pItems, LootCommand.Callback pCallback) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
canMergeItems
-
playerGive
private static int playerGive(Collection<ServerPlayer> pTargets, List<ItemStack> pItems, LootCommand.Callback pCallback) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setSlots
-
entityReplace
private static int entityReplace(Collection<? extends Entity> pTargets, int pStartSlot, int p_137981_, List<ItemStack> pItems, LootCommand.Callback pCallback) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
dropInWorld
private static int dropInWorld(CommandSourceStack pSource, Vec3 pPos, List<ItemStack> pItems, LootCommand.Callback pCallback) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
callback
-
callback
private static void callback(CommandSourceStack pSource, List<ItemStack> pItems, ResourceLocation pLootTable) -
getSourceHandItem
private static ItemStack getSourceHandItem(CommandSourceStack pSource, EquipmentSlot pSlot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
dropBlockLoot
private static int dropBlockLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, BlockPos pPos, ItemStack p_137915_, LootCommand.DropConsumer pDropConsumer) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
dropKillLoot
private static int dropKillLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, Entity pEntity, LootCommand.DropConsumer pDropConsumer) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
dropChestLoot
private static int dropChestLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, ResourceLocation pLootTable, LootCommand.DropConsumer pDropConsumer) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
dropFishingLoot
private static int dropFishingLoot(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, ResourceLocation pLootTable, BlockPos p_137929_, ItemStack p_137930_, LootCommand.DropConsumer pDropConsumer) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
drop
private static int drop(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, ResourceLocation pLootTable, LootParams pParams, LootCommand.DropConsumer pDropConsumer) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-