Package net.minecraft.loot
Class LootTable
java.lang.Object
net.minecraft.loot.LootTable
public class LootTable extends Object
- Mappings:
Namespace Name official del
intermediary net/minecraft/class_52
named net/minecraft/loot/LootTable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LootTable.Builder
static class
LootTable.Serializer
-
Field Summary
Fields Modifier and Type Field Description private BiFunction<ItemStack,LootContext,ItemStack>
combinedFunction
static LootTable
EMPTY
private LootFunction[]
functions
static LootContextType
GENERIC
private static Logger
LOGGER
private LootPool[]
pools
private LootContextType
type
-
Constructor Summary
Constructors Modifier Constructor Description private
LootTable(LootContextType type, LootPool[] pools, LootFunction[] functions)
-
Method Summary
Modifier and Type Method Description static LootTable.Builder
builder()
List<ItemStack>
generateLoot(LootContext context)
void
generateLoot(LootContext context, Consumer<ItemStack> lootConsumer)
void
generateUnprocessedLoot(LootContext context, Consumer<ItemStack> lootConsumer)
private List<Integer>
getFreeSlots(Inventory inventory, Random random)
LootContextType
getType()
static Consumer<ItemStack>
processStacks(Consumer<ItemStack> lootConsumer)
private void
shuffle(List<ItemStack> drops, int freeSlots, Random random)
void
supplyInventory(Inventory inventory, LootContext context)
void
validate(LootTableReporter reporter)
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official c
Ldel;c:Lorg/apache/logging/log4j/Logger;
intermediary field_946
Lnet/minecraft/class_52;field_946:Lorg/apache/logging/log4j/Logger;
named LOGGER
Lnet/minecraft/loot/LootTable;LOGGER:Lorg/apache/logging/log4j/Logger;
-
EMPTY
- Mappings:
Namespace Name Mixin selector official a
Ldel;a:Ldel;
intermediary field_948
Lnet/minecraft/class_52;field_948:Lnet/minecraft/class_52;
named EMPTY
Lnet/minecraft/loot/LootTable;EMPTY:Lnet/minecraft/loot/LootTable;
-
GENERIC
- Mappings:
Namespace Name Mixin selector official b
Ldel;b:Ldgm;
intermediary field_947
Lnet/minecraft/class_52;field_947:Lnet/minecraft/class_176;
named GENERIC
Lnet/minecraft/loot/LootTable;GENERIC:Lnet/minecraft/loot/context/LootContextType;
-
type
- Mappings:
Namespace Name Mixin selector official d
Ldel;d:Ldgm;
intermediary field_942
Lnet/minecraft/class_52;field_942:Lnet/minecraft/class_176;
named type
Lnet/minecraft/loot/LootTable;type:Lnet/minecraft/loot/context/LootContextType;
-
pools
- Mappings:
Namespace Name Mixin selector official e
Ldel;e:[Ldek;
intermediary field_943
Lnet/minecraft/class_52;field_943:[Lnet/minecraft/class_55;
named pools
Lnet/minecraft/loot/LootTable;pools:[Lnet/minecraft/loot/LootPool;
-
functions
- Mappings:
Namespace Name Mixin selector official f
Ldel;f:[Ldft;
intermediary field_944
Lnet/minecraft/class_52;field_944:[Lnet/minecraft/class_117;
named functions
Lnet/minecraft/loot/LootTable;functions:[Lnet/minecraft/loot/function/LootFunction;
-
combinedFunction
- Mappings:
Namespace Name Mixin selector official g
Ldel;g:Ljava/util/function/BiFunction;
intermediary field_945
Lnet/minecraft/class_52;field_945:Ljava/util/function/BiFunction;
named combinedFunction
Lnet/minecraft/loot/LootTable;combinedFunction:Ljava/util/function/BiFunction;
-
-
Constructor Details
-
LootTable
- Mappings:
Namespace Name Mixin selector official <init>
Ldel;<init>(Ldgm;[Ldek;[Ldft;)V
intermediary <init>
Lnet/minecraft/class_52;<init>(Lnet/minecraft/class_176;[Lnet/minecraft/class_55;[Lnet/minecraft/class_117;)V
named <init>
Lnet/minecraft/loot/LootTable;<init>(Lnet/minecraft/loot/context/LootContextType;[Lnet/minecraft/loot/LootPool;[Lnet/minecraft/loot/function/LootFunction;)V
-
-
Method Details
-
processStacks
- Mappings:
Namespace Name Mixin selector official a
Ldel;a(Ljava/util/function/Consumer;)Ljava/util/function/Consumer;
intermediary method_332
Lnet/minecraft/class_52;method_332(Ljava/util/function/Consumer;)Ljava/util/function/Consumer;
named processStacks
Lnet/minecraft/loot/LootTable;processStacks(Ljava/util/function/Consumer;)Ljava/util/function/Consumer;
-
generateUnprocessedLoot
- Mappings:
Namespace Name Mixin selector official a
Ldel;a(Ldei;Ljava/util/function/Consumer;)V
intermediary method_328
Lnet/minecraft/class_52;method_328(Lnet/minecraft/class_47;Ljava/util/function/Consumer;)V
named generateUnprocessedLoot
Lnet/minecraft/loot/LootTable;generateUnprocessedLoot(Lnet/minecraft/loot/context/LootContext;Ljava/util/function/Consumer;)V
-
generateLoot
- Mappings:
Namespace Name Mixin selector official b
Ldel;b(Ldei;Ljava/util/function/Consumer;)V
intermediary method_320
Lnet/minecraft/class_52;method_320(Lnet/minecraft/class_47;Ljava/util/function/Consumer;)V
named generateLoot
Lnet/minecraft/loot/LootTable;generateLoot(Lnet/minecraft/loot/context/LootContext;Ljava/util/function/Consumer;)V
-
generateLoot
- Mappings:
Namespace Name Mixin selector official a
Ldel;a(Ldei;)Ljava/util/List;
intermediary method_319
Lnet/minecraft/class_52;method_319(Lnet/minecraft/class_47;)Ljava/util/List;
named generateLoot
Lnet/minecraft/loot/LootTable;generateLoot(Lnet/minecraft/loot/context/LootContext;)Ljava/util/List;
-
getType
- Mappings:
Namespace Name Mixin selector official a
Ldel;a()Ldgm;
intermediary method_322
Lnet/minecraft/class_52;method_322()Lnet/minecraft/class_176;
named getType
Lnet/minecraft/loot/LootTable;getType()Lnet/minecraft/loot/context/LootContextType;
-
validate
- Mappings:
Namespace Name Mixin selector official a
Ldel;a(Ldeq;)V
intermediary method_330
Lnet/minecraft/class_52;method_330(Lnet/minecraft/class_58;)V
named validate
Lnet/minecraft/loot/LootTable;validate(Lnet/minecraft/loot/LootTableReporter;)V
-
supplyInventory
- Mappings:
Namespace Name Mixin selector official a
Ldel;a(Lapj;Ldei;)V
intermediary method_329
Lnet/minecraft/class_52;method_329(Lnet/minecraft/class_1263;Lnet/minecraft/class_47;)V
named supplyInventory
Lnet/minecraft/loot/LootTable;supplyInventory(Lnet/minecraft/inventory/Inventory;Lnet/minecraft/loot/context/LootContext;)V
-
shuffle
- Mappings:
Namespace Name Mixin selector official a
Ldel;a(Ljava/util/List;ILjava/util/Random;)V
intermediary method_333
Lnet/minecraft/class_52;method_333(Ljava/util/List;ILjava/util/Random;)V
named shuffle
Lnet/minecraft/loot/LootTable;shuffle(Ljava/util/List;ILjava/util/Random;)V
-
getFreeSlots
- Mappings:
Namespace Name Mixin selector official a
Ldel;a(Lapj;Ljava/util/Random;)Ljava/util/List;
intermediary method_321
Lnet/minecraft/class_52;method_321(Lnet/minecraft/class_1263;Ljava/util/Random;)Ljava/util/List;
named getFreeSlots
Lnet/minecraft/loot/LootTable;getFreeSlots(Lnet/minecraft/inventory/Inventory;Ljava/util/Random;)Ljava/util/List;
-
builder
- Mappings:
Namespace Name Mixin selector official b
Ldel;b()Ldel$a;
intermediary method_324
Lnet/minecraft/class_52;method_324()Lnet/minecraft/class_52$class_53;
named builder
Lnet/minecraft/loot/LootTable;builder()Lnet/minecraft/loot/LootTable$Builder;
-