Class LootContext

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

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

    • random

      private final Random random
      Mappings:
      Namespace Name Mixin selector
      official a Ldvr;a:Laoh;
      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 Ldvr;b:F
      intermediary field_926 Lnet/minecraft/class_47;field_926:F
      named luck Lnet/minecraft/loot/context/LootContext;luck:F
    • world

      private final ServerWorld world
      Mappings:
      Namespace Name Mixin selector
      official c Ldvr;c:Lahm;
      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;
    • tableGetter

      private final Function<Identifier,LootTable> tableGetter
      Mappings:
      Namespace Name Mixin selector
      official d Ldvr;d:Ljava/util/function/Function;
      intermediary field_924 Lnet/minecraft/class_47;field_924:Ljava/util/function/Function;
      named tableGetter Lnet/minecraft/loot/context/LootContext;tableGetter:Ljava/util/function/Function;
    • activeTables

      private final Set<LootTable> activeTables
      Mappings:
      Namespace Name Mixin selector
      official e Ldvr;e:Ljava/util/Set;
      intermediary field_927 Lnet/minecraft/class_47;field_927:Ljava/util/Set;
      named activeTables Lnet/minecraft/loot/context/LootContext;activeTables:Ljava/util/Set;
    • conditionGetter

      private final Function<Identifier,LootCondition> conditionGetter
      Mappings:
      Namespace Name Mixin selector
      official f Ldvr;f:Ljava/util/function/Function;
      intermediary field_20750 Lnet/minecraft/class_47;field_20750:Ljava/util/function/Function;
      named conditionGetter Lnet/minecraft/loot/context/LootContext;conditionGetter:Ljava/util/function/Function;
    • conditions

      private final Set<LootCondition> conditions
      Mappings:
      Namespace Name Mixin selector
      official g Ldvr;g:Ljava/util/Set;
      intermediary field_20751 Lnet/minecraft/class_47;field_20751:Ljava/util/Set;
      named conditions Lnet/minecraft/loot/context/LootContext;conditions:Ljava/util/Set;
    • parameters

      private final Map<LootContextParameter<?>,Object> parameters
      Mappings:
      Namespace Name Mixin selector
      official h Ldvr;h: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

      private final Map<Identifier,LootContext.Dropper> drops
      Mappings:
      Namespace Name Mixin selector
      official i Ldvr;i: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, Function<Identifier,LootTable> tableGetter, Function<Identifier,LootCondition> conditionGetter, Map<LootContextParameter<?>,Object> parameters, Map<Identifier,LootContext.Dropper> drops)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldvr;<init>(Laoh;FLahm;Ljava/util/function/Function;Ljava/util/function/Function;Ljava/util/Map;Ljava/util/Map;)V
      intermediary <init> Lnet/minecraft/class_47;<init>(Lnet/minecraft/class_5819;FLnet/minecraft/class_3218;Ljava/util/function/Function;Ljava/util/function/Function;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;Ljava/util/function/Function;Ljava/util/function/Function;Ljava/util/Map;Ljava/util/Map;)V
  • Method Details

    • hasParameter

      public boolean hasParameter(LootContextParameter<?> parameter)
      Mappings:
      Namespace Name Mixin selector
      official a Ldvr;a(Ldxw;)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 Ldvr;b(Ldxw;)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 Ldvr;a(Lacf;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 Ldvr;c(Ldxw;)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;
    • markActive

      public boolean markActive(LootTable table)
      Mappings:
      Namespace Name Mixin selector
      official a Ldvr;a(Ldvu;)Z
      intermediary method_298 Lnet/minecraft/class_47;method_298(Lnet/minecraft/class_52;)Z
      named markActive Lnet/minecraft/loot/context/LootContext;markActive(Lnet/minecraft/loot/LootTable;)Z
    • markInactive

      public void markInactive(LootTable table)
      Mappings:
      Namespace Name Mixin selector
      official b Ldvr;b(Ldvu;)V
      intermediary method_295 Lnet/minecraft/class_47;method_295(Lnet/minecraft/class_52;)V
      named markInactive Lnet/minecraft/loot/context/LootContext;markInactive(Lnet/minecraft/loot/LootTable;)V
    • addCondition

      public boolean addCondition(LootCondition condition)
      Mappings:
      Namespace Name Mixin selector
      official a Ldvr;a(Ldyl;)Z
      intermediary method_22555 Lnet/minecraft/class_47;method_22555(Lnet/minecraft/class_5341;)Z
      named addCondition Lnet/minecraft/loot/context/LootContext;addCondition(Lnet/minecraft/loot/condition/LootCondition;)Z
    • removeCondition

      public void removeCondition(LootCondition condition)
      Mappings:
      Namespace Name Mixin selector
      official b Ldvr;b(Ldyl;)V
      intermediary method_22557 Lnet/minecraft/class_47;method_22557(Lnet/minecraft/class_5341;)V
      named removeCondition Lnet/minecraft/loot/context/LootContext;removeCondition(Lnet/minecraft/loot/condition/LootCondition;)V
    • getTable

      public LootTable getTable(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      official a Ldvr;a(Lacf;)Ldvu;
      intermediary method_22556 Lnet/minecraft/class_47;method_22556(Lnet/minecraft/class_2960;)Lnet/minecraft/class_52;
      named getTable Lnet/minecraft/loot/context/LootContext;getTable(Lnet/minecraft/util/Identifier;)Lnet/minecraft/loot/LootTable;
    • getCondition

      @Nullable public @Nullable LootCondition getCondition(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      official b Ldvr;b(Lacf;)Ldyl;
      intermediary method_22558 Lnet/minecraft/class_47;method_22558(Lnet/minecraft/class_2960;)Lnet/minecraft/class_5341;
      named getCondition Lnet/minecraft/loot/context/LootContext;getCondition(Lnet/minecraft/util/Identifier;)Lnet/minecraft/loot/condition/LootCondition;
    • getRandom

      public Random getRandom()
      Mappings:
      Namespace Name Mixin selector
      official a Ldvr;a()Laoh;
      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 b Ldvr;b()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 c Ldvr;c()Lahm;
      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;