Class LootContext

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

public class LootContext extends Object
Mappings:
Namespace Name
official dyw
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 Ldyw;a:Lapa;
      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 Ldyw;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 Ldyw;c:Laib;
      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;
    • field_44490

      private final class_8489 field_44490
      Mappings:
      Namespace Name Mixin selector
      official d Ldyw;d:Ldza;
      intermediary field_44490 Lnet/minecraft/class_47;field_44490:Lnet/minecraft/class_8489;
      named field_44490 Lnet/minecraft/loot/context/LootContext;field_44490:Lnet/minecraft/class_8489;
    • activeTables

      private final Set<LootContext.class_8487<?>> activeTables
      Mappings:
      Namespace Name Mixin selector
      official e Ldyw;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;
    • parameters

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

      private final Map<Identifier,LootContext.Dropper> drops
      Mappings:
      Namespace Name Mixin selector
      official g Ldyw;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, class_8489 class_8489, Map<LootContextParameter<?>,Object> map, Map<Identifier,LootContext.Dropper> parameters)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldyw;<init>(Lapa;FLaib;Ldza;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/class_8489;Ljava/util/Map;Ljava/util/Map;)V
  • Method Details

    • hasParameter

      public boolean hasParameter(LootContextParameter<?> parameter)
      Mappings:
      Namespace Name Mixin selector
      official a Ldyw;a(Lebe;)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 Ldyw;b(Lebe;)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 Ldyw;a(Lacp;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 Ldyw;c(Lebe;)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;
    • method_51184

      public boolean method_51184(LootContext.class_8487<?> class_8487)
      Mappings:
      Namespace Name Mixin selector
      official a Ldyw;a(Ldyw$d;)Z
      intermediary method_51184 Lnet/minecraft/class_47;method_51184(Lnet/minecraft/class_47$class_8487;)Z
      named method_51184 Lnet/minecraft/loot/context/LootContext;method_51184(Lnet/minecraft/loot/context/LootContext$class_8487;)Z
    • markActive

      public boolean markActive(LootContext.class_8487<?> class_8487)
      Mappings:
      Namespace Name Mixin selector
      official b Ldyw;b(Ldyw$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$class_8487;)Z
    • markInactive

      public void markInactive(LootContext.class_8487<?> class_8487)
      Mappings:
      Namespace Name Mixin selector
      official c Ldyw;c(Ldyw$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$class_8487;)V
    • method_51183

      public class_8489 method_51183()
      Mappings:
      Namespace Name Mixin selector
      official a Ldyw;a()Ldza;
      intermediary method_51183 Lnet/minecraft/class_47;method_51183()Lnet/minecraft/class_8489;
      named method_51183 Lnet/minecraft/loot/context/LootContext;method_51183()Lnet/minecraft/class_8489;
    • getRandom

      public Random getRandom()
      Mappings:
      Namespace Name Mixin selector
      official b Ldyw;b()Lapa;
      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 Ldyw;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 Ldyw;d()Laib;
      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;
    • method_51185

      public static LootContext.class_8487<LootTable> method_51185(LootTable lootTable)
      Mappings:
      Namespace Name Mixin selector
      official a Ldyw;a(Ldzd;)Ldyw$d;
      intermediary method_51185 Lnet/minecraft/class_47;method_51185(Lnet/minecraft/class_52;)Lnet/minecraft/class_47$class_8487;
      named method_51185 Lnet/minecraft/loot/context/LootContext;method_51185(Lnet/minecraft/loot/LootTable;)Lnet/minecraft/loot/context/LootContext$class_8487;
    • method_51187

      public static LootContext.class_8487<LootCondition> method_51187(LootCondition lootCondition)
      Mappings:
      Namespace Name Mixin selector
      official a Ldyw;a(Lebt;)Ldyw$d;
      intermediary method_51187 Lnet/minecraft/class_47;method_51187(Lnet/minecraft/class_5341;)Lnet/minecraft/class_47$class_8487;
      named method_51187 Lnet/minecraft/loot/context/LootContext;method_51187(Lnet/minecraft/loot/condition/LootCondition;)Lnet/minecraft/loot/context/LootContext$class_8487;
    • method_51186

      public static LootContext.class_8487<LootFunction> method_51186(LootFunction lootFunction)
      Mappings:
      Namespace Name Mixin selector
      official a Ldyw;a(Leak;)Ldyw$d;
      intermediary method_51186 Lnet/minecraft/class_47;method_51186(Lnet/minecraft/class_117;)Lnet/minecraft/class_47$class_8487;
      named method_51186 Lnet/minecraft/loot/context/LootContext;method_51186(Lnet/minecraft/loot/function/LootFunction;)Lnet/minecraft/loot/context/LootContext$class_8487;