Class RandomChanceLootCondition

java.lang.Object
net.minecraft.loot.condition.RandomChanceLootCondition
All Implemented Interfaces:
Predicate<LootContext>, LootCondition, LootContextAware

public class RandomChanceLootCondition extends Object implements LootCondition
Mappings:
Namespace Name
official dlm
intermediary net/minecraft/class_219
named net/minecraft/loot/condition/RandomChanceLootCondition
  • Field Details

    • chance

      final float chance
      Mappings:
      Namespace Name Mixin selector
      official a Ldlm;a:F
      intermediary field_1296 Lnet/minecraft/class_219;field_1296:F
      named chance Lnet/minecraft/loot/condition/RandomChanceLootCondition;chance:F
  • Constructor Details

    • RandomChanceLootCondition

      RandomChanceLootCondition(float float2)
  • Method Details

    • getType

      public LootConditionType getType()
      Specified by:
      getType in interface LootCondition
      Mappings:
      Namespace Name Mixin selector
      official a Ldlh;a()Ldli;
      intermediary method_29325 Lnet/minecraft/class_5341;method_29325()Lnet/minecraft/class_5342;
      named getType Lnet/minecraft/loot/condition/LootCondition;getType()Lnet/minecraft/loot/condition/LootConditionType;
    • test

      public boolean test(LootContext lootContext)
      Specified by:
      test in interface Predicate<LootContext>
      Mappings:
      Namespace Name Mixin selector
      official a Ldlm;a(Ldip;)Z
      intermediary method_934 Lnet/minecraft/class_219;method_934(Lnet/minecraft/class_47;)Z
      named test Lnet/minecraft/loot/condition/RandomChanceLootCondition;test(Lnet/minecraft/loot/context/LootContext;)Z
    • builder

      public static LootCondition.Builder builder(float chance)
      Mappings:
      Namespace Name Mixin selector
      official a Ldlm;a(F)Ldlh$a;
      intermediary method_932 Lnet/minecraft/class_219;method_932(F)Lnet/minecraft/class_5341$class_210;
      named builder Lnet/minecraft/loot/condition/RandomChanceLootCondition;builder(F)Lnet/minecraft/loot/condition/LootCondition$Builder;