Package net.minecraft.loot.context
Class LootContext
java.lang.Object
net.minecraft.loot.context.LootContext
- Mappings:
Namespace Name official dzc
intermediary net/minecraft/class_47
named net/minecraft/loot/context/LootContext
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
static enum
static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Set<LootContext.Entry<?>>
private final LootDataLookup
private final Map<Identifier,
LootContext.Dropper> private final float
private final Map<LootContextParameter<?>,
Object> private final Random
private final ServerWorld
-
Constructor Summary
ConstructorDescriptionLootContext
(Random random, float luck, ServerWorld world, LootDataLookup dataLookup, Map<LootContextParameter<?>, Object> parameters, Map<Identifier, LootContext.Dropper> drops) -
Method Summary
Modifier and TypeMethodDescriptionvoid
drop
(Identifier id, Consumer<ItemStack> lootConsumer) <T> T
get
(LootContextParameter<T> parameter) float
getLuck()
getWorld()
boolean
hasParameter
(LootContextParameter<?> parameter) boolean
isActive
(LootContext.Entry<?> entry) static LootContext.Entry<LootFunction>
itemModifier
(LootFunction itemModifier) boolean
markActive
(LootContext.Entry<?> entry) void
markInactive
(LootContext.Entry<?> entry) static LootContext.Entry<LootCondition>
predicate
(LootCondition predicate) <T> T
requireParameter
(LootContextParameter<T> parameter) static LootContext.Entry<LootTable>
-
Field Details
-
random
- Mappings:
Namespace Name Mixin selector official a
Ldzc;a:Lapd;
intermediary field_923
Lnet/minecraft/class_47;field_923:Lnet/minecraft/class_5819;
named random
Lnet/minecraft/loot/context/LootContext;random:Lnet/minecraft/util/math/random/Random;
-
luck
private final float luck- Mappings:
Namespace Name Mixin selector official b
Ldzc;b:F
intermediary field_926
Lnet/minecraft/class_47;field_926:F
named luck
Lnet/minecraft/loot/context/LootContext;luck:F
-
world
- Mappings:
Namespace Name Mixin selector official c
Ldzc;c:Laid;
intermediary field_928
Lnet/minecraft/class_47;field_928:Lnet/minecraft/class_3218;
named world
Lnet/minecraft/loot/context/LootContext;world:Lnet/minecraft/server/world/ServerWorld;
-
dataLookup
- Mappings:
Namespace Name Mixin selector official d
Ldzc;d:Ldzg;
intermediary field_44490
Lnet/minecraft/class_47;field_44490:Lnet/minecraft/class_8489;
named dataLookup
Lnet/minecraft/loot/context/LootContext;dataLookup:Lnet/minecraft/loot/LootDataLookup;
-
activeEntries
- Mappings:
Namespace Name Mixin selector official e
Ldzc;e:Ljava/util/Set;
intermediary field_927
Lnet/minecraft/class_47;field_927:Ljava/util/Set;
named activeEntries
Lnet/minecraft/loot/context/LootContext;activeEntries:Ljava/util/Set;
-
parameters
- Mappings:
Namespace Name Mixin selector official f
Ldzc;f:Ljava/util/Map;
intermediary field_925
Lnet/minecraft/class_47;field_925:Ljava/util/Map;
named parameters
Lnet/minecraft/loot/context/LootContext;parameters:Ljava/util/Map;
-
drops
- Mappings:
Namespace Name Mixin selector official g
Ldzc;g:Ljava/util/Map;
intermediary field_929
Lnet/minecraft/class_47;field_929:Ljava/util/Map;
named drops
Lnet/minecraft/loot/context/LootContext;drops:Ljava/util/Map;
-
-
Constructor Details
-
LootContext
LootContext(Random random, float luck, ServerWorld world, LootDataLookup dataLookup, Map<LootContextParameter<?>, Object> parameters, Map<Identifier, LootContext.Dropper> drops) - Mappings:
Namespace Name Mixin selector official <init>
Ldzc;<init>(Lapd;FLaid;Ldzg;Ljava/util/Map;Ljava/util/Map;)V
intermediary <init>
Lnet/minecraft/class_47;<init>(Lnet/minecraft/class_5819;FLnet/minecraft/class_3218;Lnet/minecraft/class_8489;Ljava/util/Map;Ljava/util/Map;)V
named <init>
Lnet/minecraft/loot/context/LootContext;<init>(Lnet/minecraft/util/math/random/Random;FLnet/minecraft/server/world/ServerWorld;Lnet/minecraft/loot/LootDataLookup;Ljava/util/Map;Ljava/util/Map;)V
-
-
Method Details
-
hasParameter
- Mappings:
Namespace Name Mixin selector official a
Ldzc;a(Lebk;)Z
intermediary method_300
Lnet/minecraft/class_47;method_300(Lnet/minecraft/class_169;)Z
named hasParameter
Lnet/minecraft/loot/context/LootContext;hasParameter(Lnet/minecraft/loot/context/LootContextParameter;)Z
-
requireParameter
- Mappings:
Namespace Name Mixin selector official b
Ldzc;b(Lebk;)Ljava/lang/Object;
intermediary method_35508
Lnet/minecraft/class_47;method_35508(Lnet/minecraft/class_169;)Ljava/lang/Object;
named requireParameter
Lnet/minecraft/loot/context/LootContext;requireParameter(Lnet/minecraft/loot/context/LootContextParameter;)Ljava/lang/Object;
-
drop
- Mappings:
Namespace Name Mixin selector official a
Ldzc;a(Lacq;Ljava/util/function/Consumer;)V
intermediary method_297
Lnet/minecraft/class_47;method_297(Lnet/minecraft/class_2960;Ljava/util/function/Consumer;)V
named drop
Lnet/minecraft/loot/context/LootContext;drop(Lnet/minecraft/util/Identifier;Ljava/util/function/Consumer;)V
-
get
- Mappings:
Namespace Name Mixin selector official c
Ldzc;c(Lebk;)Ljava/lang/Object;
intermediary method_296
Lnet/minecraft/class_47;method_296(Lnet/minecraft/class_169;)Ljava/lang/Object;
named get
Lnet/minecraft/loot/context/LootContext;get(Lnet/minecraft/loot/context/LootContextParameter;)Ljava/lang/Object;
-
isActive
- Mappings:
Namespace Name Mixin selector official a
Ldzc;a(Ldzc$d;)Z
intermediary method_51184
Lnet/minecraft/class_47;method_51184(Lnet/minecraft/class_47$class_8487;)Z
named isActive
Lnet/minecraft/loot/context/LootContext;isActive(Lnet/minecraft/loot/context/LootContext$Entry;)Z
-
markActive
- Mappings:
Namespace Name Mixin selector official b
Ldzc;b(Ldzc$d;)Z
intermediary method_298
Lnet/minecraft/class_47;method_298(Lnet/minecraft/class_47$class_8487;)Z
named markActive
Lnet/minecraft/loot/context/LootContext;markActive(Lnet/minecraft/loot/context/LootContext$Entry;)Z
-
markInactive
- Mappings:
Namespace Name Mixin selector official c
Ldzc;c(Ldzc$d;)V
intermediary method_295
Lnet/minecraft/class_47;method_295(Lnet/minecraft/class_47$class_8487;)V
named markInactive
Lnet/minecraft/loot/context/LootContext;markInactive(Lnet/minecraft/loot/context/LootContext$Entry;)V
-
getDataLookup
- Mappings:
Namespace Name Mixin selector official a
Ldzc;a()Ldzg;
intermediary method_51183
Lnet/minecraft/class_47;method_51183()Lnet/minecraft/class_8489;
named getDataLookup
Lnet/minecraft/loot/context/LootContext;getDataLookup()Lnet/minecraft/loot/LootDataLookup;
-
getRandom
- Mappings:
Namespace Name Mixin selector official b
Ldzc;b()Lapd;
intermediary method_294
Lnet/minecraft/class_47;method_294()Lnet/minecraft/class_5819;
named getRandom
Lnet/minecraft/loot/context/LootContext;getRandom()Lnet/minecraft/util/math/random/Random;
-
getLuck
public float getLuck()- Mappings:
Namespace Name Mixin selector official c
Ldzc;c()F
intermediary method_302
Lnet/minecraft/class_47;method_302()F
named getLuck
Lnet/minecraft/loot/context/LootContext;getLuck()F
-
getWorld
- Mappings:
Namespace Name Mixin selector official d
Ldzc;d()Laid;
intermediary method_299
Lnet/minecraft/class_47;method_299()Lnet/minecraft/class_3218;
named getWorld
Lnet/minecraft/loot/context/LootContext;getWorld()Lnet/minecraft/server/world/ServerWorld;
-
table
- Mappings:
Namespace Name Mixin selector official a
Ldzc;a(Ldzj;)Ldzc$d;
intermediary method_51185
Lnet/minecraft/class_47;method_51185(Lnet/minecraft/class_52;)Lnet/minecraft/class_47$class_8487;
named table
Lnet/minecraft/loot/context/LootContext;table(Lnet/minecraft/loot/LootTable;)Lnet/minecraft/loot/context/LootContext$Entry;
-
predicate
- Mappings:
Namespace Name Mixin selector official a
Ldzc;a(Lecb;)Ldzc$d;
intermediary method_51187
Lnet/minecraft/class_47;method_51187(Lnet/minecraft/class_5341;)Lnet/minecraft/class_47$class_8487;
named predicate
Lnet/minecraft/loot/context/LootContext;predicate(Lnet/minecraft/loot/condition/LootCondition;)Lnet/minecraft/loot/context/LootContext$Entry;
-
itemModifier
- Mappings:
Namespace Name Mixin selector official a
Ldzc;a(Leaq;)Ldzc$d;
intermediary method_51186
Lnet/minecraft/class_47;method_51186(Lnet/minecraft/class_117;)Lnet/minecraft/class_47$class_8487;
named itemModifier
Lnet/minecraft/loot/context/LootContext;itemModifier(Lnet/minecraft/loot/function/LootFunction;)Lnet/minecraft/loot/context/LootContext$Entry;
-