Package net.minecraft.command.impl
Class LootCommand
- java.lang.Object
-
- net.minecraft.command.impl.LootCommand
-
public class LootCommand extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
LootCommand.ISourceArgumentBuilder
(package private) static interface
LootCommand.ISuccessListener
(package private) static interface
LootCommand.ITargetHandler
-
Field Summary
Fields Modifier and Type Field Description private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
ERROR_NO_HELD_ITEMS
private static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
ERROR_NO_LOOT_TABLE
static com.mojang.brigadier.suggestion.SuggestionProvider<CommandSource>
SUGGEST_LOOT_TABLE
-
Constructor Summary
Constructors Constructor Description LootCommand()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static <T extends com.mojang.brigadier.builder.ArgumentBuilder<CommandSource,T>>
TaddTargets(T p_218868_0_, LootCommand.ISourceArgumentBuilder p_218868_1_)
private static int
blockDistribute(CommandSource p_218900_0_, BlockPos p_218900_1_, java.util.List<ItemStack> p_218900_2_, LootCommand.ISuccessListener p_218900_3_)
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_)
private static void
callback(CommandSource p_218875_0_, java.util.List<ItemStack> p_218875_1_)
private static void
callback(CommandSource p_218860_0_, java.util.List<ItemStack> p_218860_1_, ResourceLocation p_218860_2_)
private static boolean
canMergeItems(ItemStack p_218883_0_, ItemStack p_218883_1_)
private static boolean
distributeToContainer(IInventory p_218890_0_, ItemStack p_218890_1_)
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_)
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_)
private static int
dropChestLoot(com.mojang.brigadier.context.CommandContext<CommandSource> p_218887_0_, ResourceLocation p_218887_1_, LootCommand.ITargetHandler p_218887_2_)
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_)
private static int
dropInWorld(CommandSource p_218881_0_, Vector3d p_218881_1_, java.util.List<ItemStack> p_218881_2_, LootCommand.ISuccessListener p_218881_3_)
private static int
dropKillLoot(com.mojang.brigadier.context.CommandContext<CommandSource> p_218869_0_, Entity p_218869_1_, LootCommand.ITargetHandler p_218869_2_)
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_)
private static IInventory
getContainer(CommandSource p_218862_0_, BlockPos p_218862_1_)
private static ItemStack
getSourceHandItem(CommandSource p_218872_0_, EquipmentSlotType p_218872_1_)
private static int
playerGive(java.util.Collection<ServerPlayerEntity> p_218859_0_, java.util.List<ItemStack> p_218859_1_, LootCommand.ISuccessListener p_218859_2_)
static void
register(com.mojang.brigadier.CommandDispatcher<CommandSource> p_218886_0_)
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_)
-
-
-
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
-
-
Method Detail
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSource> p_218886_0_)
-
addTargets
private static <T extends com.mojang.brigadier.builder.ArgumentBuilder<CommandSource,T>> T addTargets(T p_218868_0_, LootCommand.ISourceArgumentBuilder p_218868_1_)
-
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
-
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_)
-
callback
private static void callback(CommandSource p_218860_0_, java.util.List<ItemStack> p_218860_1_, ResourceLocation p_218860_2_)
-
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
-
-