Class LootContext

java.lang.Object
net.minecraft.loot.context.LootContext

public class LootContext extends Object
Mappings:
Namespace Name
official dzh
intermediary net/minecraft/class_47
named net/minecraft/loot/context/LootContext
  • Field Details

    • parameters

      private final LootContextParameterSet parameters
      Mappings:
      Namespace Name Mixin selector
      official a Ldzh;a:Ldzn;
      intermediary field_44881 Lnet/minecraft/class_47;field_44881:Lnet/minecraft/class_8567;
      named parameters Lnet/minecraft/loot/context/LootContext;parameters:Lnet/minecraft/loot/context/LootContextParameterSet;
    • random

      private final Random random
      Mappings:
      Namespace Name Mixin selector
      official b Ldzh;b:Lapf;
      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;
    • dataLookup

      private final LootDataLookup dataLookup
      Mappings:
      Namespace Name Mixin selector
      official c Ldzh;c:Ldzl;
      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

      private final Set<LootContext.Entry<?>> activeEntries
      Mappings:
      Namespace Name Mixin selector
      official d Ldzh;d: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;
  • Constructor Details

    • LootContext

      LootContext(LootContextParameterSet parameters, Random random, LootDataLookup dataLookup)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldzh;<init>(Ldzn;Lapf;Ldzl;)V
      intermediary <init> Lnet/minecraft/class_47;<init>(Lnet/minecraft/class_8567;Lnet/minecraft/class_5819;Lnet/minecraft/class_8489;)V
      named <init> Lnet/minecraft/loot/context/LootContext;<init>(Lnet/minecraft/loot/context/LootContextParameterSet;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/loot/LootDataLookup;)V
  • Method Details

    • hasParameter

      public boolean hasParameter(LootContextParameter<?> parameter)
      Mappings:
      Namespace Name Mixin selector
      official a Ldzh;a(Lebq;)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

      public <T> T requireParameter(LootContextParameter<T> parameter)
      Mappings:
      Namespace Name Mixin selector
      official b Ldzh;b(Lebq;)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

      public void drop(Identifier id, Consumer<ItemStack> lootConsumer)
      Mappings:
      Namespace Name Mixin selector
      official a Ldzh;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

      @Nullable public <T> T get(LootContextParameter<T> parameter)
      Mappings:
      Namespace Name Mixin selector
      official c Ldzh;c(Lebq;)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

      public boolean isActive(LootContext.Entry<?> entry)
      Mappings:
      Namespace Name Mixin selector
      official a Ldzh;a(Ldzh$c;)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

      public boolean markActive(LootContext.Entry<?> entry)
      Mappings:
      Namespace Name Mixin selector
      official b Ldzh;b(Ldzh$c;)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

      public void markInactive(LootContext.Entry<?> entry)
      Mappings:
      Namespace Name Mixin selector
      official c Ldzh;c(Ldzh$c;)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

      public LootDataLookup getDataLookup()
      Mappings:
      Namespace Name Mixin selector
      official a Ldzh;a()Ldzl;
      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

      public Random getRandom()
      Mappings:
      Namespace Name Mixin selector
      official b Ldzh;b()Lapf;
      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 Ldzh;c()F
      intermediary method_302 Lnet/minecraft/class_47;method_302()F
      named getLuck Lnet/minecraft/loot/context/LootContext;getLuck()F
    • getWorld

      public ServerWorld getWorld()
      Mappings:
      Namespace Name Mixin selector
      official d Ldzh;d()Laif;
      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

      public static LootContext.Entry<LootTable> table(LootTable table)
      Mappings:
      Namespace Name Mixin selector
      official a Ldzh;a(Ldzp;)Ldzh$c;
      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

      public static LootContext.Entry<LootCondition> predicate(LootCondition predicate)
      Mappings:
      Namespace Name Mixin selector
      official a Ldzh;a(Lech;)Ldzh$c;
      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

      public static LootContext.Entry<LootFunction> itemModifier(LootFunction itemModifier)
      Mappings:
      Namespace Name Mixin selector
      official a Ldzh;a(Leaw;)Ldzh$c;
      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;