Class SearchOption<T>

java.lang.Object
alexiil.mc.lib.attributes.SearchOption<T>
Direct Known Subclasses:
SearchOptionDirectional, SearchOptionInVoxel

public class SearchOption<T> extends Object
The base class for block search options. This only contains filtration for objects that are added to the attribute list via a Predicate. Instances can be constructed/obtained from SearchOptions, and all javadoc for the various implementations is on those static factories.
  • Method Details

    • matches

      public final boolean matches(T obj)
      Checks to see if the given object matches this searchMatcher. This method will normally be called by LBA automatically, so users are discouraged from calling this.
    • getShape

      public net.minecraft.util.shape.VoxelShape getShape()
      Returns the VoxelShape to use for bounds checking. This defaults to a full block, but custom search options (like SearchOptionInVoxel) override this.