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 due
intermediary net/minecraft/class_219
named net/minecraft/loot/condition/RandomChanceLootCondition
  • Field Details

    • chance

      final float chance
      Mappings:
      Namespace Name Mixin selector
      official a Ldue;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 chance)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldue;<init>(F)V
      intermediary <init> Lnet/minecraft/class_219;<init>(F)V
      named <init> Lnet/minecraft/loot/condition/RandomChanceLootCondition;<init>(F)V
  • Method Details

    • getType

      public LootConditionType getType()
      Specified by:
      getType in interface LootCondition
      Mappings:
      Namespace Name Mixin selector
      official a Ldtz;a()Ldua;
      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 Ldue;a(Ldrf;)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 Ldue;a(F)Ldtz$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;