Class LootCommand


  • public class LootCommand
    extends java.lang.Object
    • Field Detail

      • SUGGEST_LOOT_TABLE

        public static final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSource> 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 Detail

      • LootCommand

        public LootCommand()
    • Method Detail

      • register

        public static void register​(com.mojang.brigadier.CommandDispatcher<CommandSource> p_218886_0_)
      • getContainer

        private static IInventory getContainer​(CommandSource p_218862_0_,
                                               BlockPos p_218862_1_)
                                        throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • blockDistribute

        private static int blockDistribute​(CommandSource p_218900_0_,
                                           BlockPos p_218900_1_,
                                           java.util.List<ItemStack> p_218900_2_,
                                           LootCommand.ISuccessListener p_218900_3_)
                                    throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • distributeToContainer

        private static boolean distributeToContainer​(IInventory p_218890_0_,
                                                     ItemStack p_218890_1_)
      • blockReplace

        private static int blockReplace​(CommandSource p_218894_0_,
                                        BlockPos p_218894_1_,
                                        int p_218894_2_,
                                        int p_218894_3_,
                                        java.util.List<ItemStack> p_218894_4_,
                                        LootCommand.ISuccessListener p_218894_5_)
                                 throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • canMergeItems

        private static boolean canMergeItems​(ItemStack p_218883_0_,
                                             ItemStack p_218883_1_)
      • playerGive

        private static int playerGive​(java.util.Collection<ServerPlayerEntity> p_218859_0_,
                                      java.util.List<ItemStack> p_218859_1_,
                                      LootCommand.ISuccessListener p_218859_2_)
                               throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • setSlots

        private static void setSlots​(Entity p_218901_0_,
                                     java.util.List<ItemStack> p_218901_1_,
                                     int p_218901_2_,
                                     int p_218901_3_,
                                     java.util.List<ItemStack> p_218901_4_)
      • entityReplace

        private static int entityReplace​(java.util.Collection<? extends Entity> p_218865_0_,
                                         int p_218865_1_,
                                         int p_218865_2_,
                                         java.util.List<ItemStack> p_218865_3_,
                                         LootCommand.ISuccessListener p_218865_4_)
                                  throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • dropInWorld

        private static int dropInWorld​(CommandSource p_218881_0_,
                                       Vector3d p_218881_1_,
                                       java.util.List<ItemStack> p_218881_2_,
                                       LootCommand.ISuccessListener p_218881_3_)
                                throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • callback

        private static void callback​(CommandSource p_218875_0_,
                                     java.util.List<ItemStack> p_218875_1_)
      • getSourceHandItem

        private static ItemStack getSourceHandItem​(CommandSource p_218872_0_,
                                                   EquipmentSlotType p_218872_1_)
                                            throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • dropBlockLoot

        private static int dropBlockLoot​(com.mojang.brigadier.context.CommandContext<CommandSource> p_218879_0_,
                                         BlockPos p_218879_1_,
                                         ItemStack p_218879_2_,
                                         LootCommand.ITargetHandler p_218879_3_)
                                  throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • dropKillLoot

        private static int dropKillLoot​(com.mojang.brigadier.context.CommandContext<CommandSource> p_218869_0_,
                                        Entity p_218869_1_,
                                        LootCommand.ITargetHandler p_218869_2_)
                                 throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • dropChestLoot

        private static int dropChestLoot​(com.mojang.brigadier.context.CommandContext<CommandSource> p_218887_0_,
                                         ResourceLocation p_218887_1_,
                                         LootCommand.ITargetHandler p_218887_2_)
                                  throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • dropFishingLoot

        private static int dropFishingLoot​(com.mojang.brigadier.context.CommandContext<CommandSource> p_218876_0_,
                                           ResourceLocation p_218876_1_,
                                           BlockPos p_218876_2_,
                                           ItemStack p_218876_3_,
                                           LootCommand.ITargetHandler p_218876_4_)
                                    throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • drop

        private static int drop​(com.mojang.brigadier.context.CommandContext<CommandSource> p_218871_0_,
                                ResourceLocation p_218871_1_,
                                LootContext p_218871_2_,
                                LootCommand.ITargetHandler p_218871_3_)
                         throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException