Class LootTableIdCondition

java.lang.Object
net.neoforged.neoforge.common.loot.LootTableIdCondition
All Implemented Interfaces:
Predicate<net.minecraft.world.level.storage.loot.LootContext>, net.minecraft.world.level.storage.loot.LootContextUser, net.minecraft.world.level.storage.loot.predicates.LootItemCondition

public class LootTableIdCondition extends Object implements net.minecraft.world.level.storage.loot.predicates.LootItemCondition
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.MapCodec<LootTableIdCondition>
     
    static final net.minecraft.world.level.storage.loot.predicates.LootItemConditionType
     
    private final net.minecraft.resources.ResourceLocation
     
    static final net.minecraft.resources.ResourceLocation
     

    Fields inherited from interface net.minecraft.world.level.storage.loot.predicates.LootItemCondition

    DIRECT_CODEC, TYPED_CODEC
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    LootTableIdCondition(net.minecraft.resources.ResourceLocation targetLootTableId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    builder(net.minecraft.resources.ResourceLocation targetLootTableId)
     
    net.minecraft.world.level.storage.loot.predicates.LootItemConditionType
     
    boolean
    test(net.minecraft.world.level.storage.loot.LootContext lootContext)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser

    getReferencedContextParams, validate

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<LootTableIdCondition> CODEC
    • LOOT_TABLE_ID

      public static final net.minecraft.world.level.storage.loot.predicates.LootItemConditionType LOOT_TABLE_ID
    • UNKNOWN_LOOT_TABLE

      public static final net.minecraft.resources.ResourceLocation UNKNOWN_LOOT_TABLE
    • targetLootTableId

      private final net.minecraft.resources.ResourceLocation targetLootTableId
  • Constructor Details

    • LootTableIdCondition

      private LootTableIdCondition(net.minecraft.resources.ResourceLocation targetLootTableId)
  • Method Details

    • getType

      public net.minecraft.world.level.storage.loot.predicates.LootItemConditionType getType()
      Specified by:
      getType in interface net.minecraft.world.level.storage.loot.predicates.LootItemCondition
    • test

      public boolean test(net.minecraft.world.level.storage.loot.LootContext lootContext)
      Specified by:
      test in interface Predicate<net.minecraft.world.level.storage.loot.LootContext>
    • builder

      public static LootTableIdCondition.Builder builder(net.minecraft.resources.ResourceLocation targetLootTableId)