Class RegistryContains<T>

java.lang.Object
net.darkhax.bookshelf.common.impl.data.conditions.RegistryContains<T>
All Implemented Interfaces:
ILoadCondition

public class RegistryContains<T> extends Object implements ILoadCondition
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.resources.ResourceLocation
     
    static final net.minecraft.resources.ResourceLocation
     
    static final net.minecraft.resources.ResourceLocation
     
    static final net.minecraft.resources.ResourceLocation
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tests if the condition has been met or not.
    Set<net.minecraft.resources.ResourceLocation>
     
    Gets the type of the condition.
    static <RT> com.mojang.serialization.MapCodec<RegistryContains<RT>>
    of(net.minecraft.resources.ResourceLocation typeId, net.minecraft.core.Registry<RT> registry)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • BLOCK

      public static final net.minecraft.resources.ResourceLocation BLOCK
    • ITEM

      public static final net.minecraft.resources.ResourceLocation ITEM
    • ENTITY

      public static final net.minecraft.resources.ResourceLocation ENTITY
    • BLOCK_ENTITY

      public static final net.minecraft.resources.ResourceLocation BLOCK_ENTITY
  • Method Details

    • of

      public static <RT> com.mojang.serialization.MapCodec<RegistryContains<RT>> of(net.minecraft.resources.ResourceLocation typeId, net.minecraft.core.Registry<RT> registry)
    • allowLoading

      public boolean allowLoading()
      Description copied from interface: ILoadCondition
      Tests if the condition has been met or not.
      Specified by:
      allowLoading in interface ILoadCondition
      Returns:
      Has the condition been met?
    • getRequiredEntries

      public Set<net.minecraft.resources.ResourceLocation> getRequiredEntries()
    • getType

      public ConditionType getType()
      Description copied from interface: ILoadCondition
      Gets the type of the condition. This is required for serializing conditions.
      Specified by:
      getType in interface ILoadCondition
      Returns:
      The type of the condition.