Package alexiil.mc.lib.attributes
Class SearchOptions
java.lang.Object
alexiil.mc.lib.attributes.SearchOptions
Various methods for creating 
SearchOption instances.- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic SearchOption<Object>ASearchOptionthat has no constraints, and will get every attribute instance that is obtainable without a direction.
- 
Method SummaryModifier and TypeMethodDescriptionstatic SearchOptionDirectional<Object>inDirection(net.minecraft.util.math.Direction direction)static SearchOptionDirectionalVoxel<Object>inDirectionalVoxel(net.minecraft.util.math.Direction direction, net.minecraft.util.shape.VoxelShape shape)static <T> SearchOptionDirectionalVoxel<T>inDirectionalVoxelMatching(net.minecraft.util.math.Direction direction, net.minecraft.util.shape.VoxelShape shape, Predicate<T> matcher)static <T> SearchOptionDirectional<T>inDirectionMatching(net.minecraft.util.math.Direction direction, Predicate<T> matcher)static SearchOptionDirectionalVoxel<Object>inOrderedDirectionalVoxel(net.minecraft.util.math.Direction direction, net.minecraft.util.shape.VoxelShape shape)static <T> SearchOptionDirectionalVoxel<T>inOrderedDirectionalVoxelMatching(net.minecraft.util.math.Direction direction, net.minecraft.util.shape.VoxelShape shape, Predicate<T> matcher)static SearchOptionInVoxel<Object>inVoxel(net.minecraft.util.shape.VoxelShape shape)static <T> SearchOptionInVoxel<T>inVoxelMatching(net.minecraft.util.shape.VoxelShape shape, Predicate<T> matcher)static <T> SearchOption<T>
- 
Field Details- 
ALLASearchOptionthat has no constraints, and will get every attribute instance that is obtainable without a direction. Note that you should never need to use this directly as every attribute getter method (likeAttribute.getAll(World, BlockPos, SearchOption)) will use this if null is passed.
 
- 
- 
Method Details- 
matching- Returns:
- A SearchOptionthat will only match attribute instances that pass the givenPredicatetest.
 
- 
inDirectionpublic static SearchOptionDirectional<Object> inDirection(net.minecraft.util.math.Direction direction)- Parameters:
- direction- The direction to search in - in other words the direction from the block that is searching to the block that is being searched.
- Returns:
- A SearchOptionthat will only match attribute instances that offer themselves in the specified direction.
 
- 
inDirectionMatchingpublic static <T> SearchOptionDirectional<T> inDirectionMatching(net.minecraft.util.math.Direction direction, Predicate<T> matcher)- Parameters:
- direction- The direction to search in - in other words the direction from the block that is searching to the block that is being searched.
- Returns:
- A SearchOptionthat will only match attribute instances that offer themselves in the specified direction, and which pass the givenPredicatetest.
 
- 
inVoxel- Returns:
- A SearchOptionthat will only match attribute instances thatintersectwith the givenVoxelShape.
 
- 
inVoxelMatchingpublic static <T> SearchOptionInVoxel<T> inVoxelMatching(net.minecraft.util.shape.VoxelShape shape, Predicate<T> matcher)- Returns:
- A SearchOptionthat will only match attribute instances thatintersectwith the givenVoxelShape, and and which pass the givenPredicatetest.
 
- 
inDirectionalVoxelpublic static SearchOptionDirectionalVoxel<Object> inDirectionalVoxel(net.minecraft.util.math.Direction direction, net.minecraft.util.shape.VoxelShape shape)- Parameters:
- direction- The direction to search in - in other words the direction from the block that is searching to the block that is being searched.
- Returns:
- A SearchOptionthat will only match attribute instances that offer themselves in the specified direction, and whichintersectwith the givenVoxelShape, and and which pass the givenPredicatetest.
 
- 
inDirectionalVoxelMatchingpublic static <T> SearchOptionDirectionalVoxel<T> inDirectionalVoxelMatching(net.minecraft.util.math.Direction direction, net.minecraft.util.shape.VoxelShape shape, Predicate<T> matcher)- Parameters:
- direction- The direction to search in - in other words the direction from the block that is searching to the block that is being searched.
- Returns:
- A SearchOptionthat will only match attribute instances that:
 
- 
inOrderedDirectionalVoxelpublic static SearchOptionDirectionalVoxel<Object> inOrderedDirectionalVoxel(net.minecraft.util.math.Direction direction, net.minecraft.util.shape.VoxelShape shape)- Parameters:
- direction- The direction to search in - in other words the direction from the block that is searching to the block that is being searched.
- Returns:
- A SearchOptionthat will only match attribute instances that offer themselves in the specified direction, and whichintersectwith the givenVoxelShape, and and which pass the givenPredicatetest.In addition this will sort the resulting AttributeListthat are returned from methods likeAttribute.getAll(World, BlockPos, SearchOption)in the order that theirVoxelShapewill be encountered by the directional search.
 
- 
inOrderedDirectionalVoxelMatchingpublic static <T> SearchOptionDirectionalVoxel<T> inOrderedDirectionalVoxelMatching(net.minecraft.util.math.Direction direction, net.minecraft.util.shape.VoxelShape shape, Predicate<T> matcher)- Parameters:
- direction- The direction to search in - in other words the direction from the block that is searching to the block that is being searched.
- Returns:
- A SearchOptionthat will only match attribute instances that:- Offer themselves in the specified direction
- Intersectwith the given- VoxelShape
- Pass the given Predicatetest, and which
 AttributeListthat are returned from methods likeAttribute.getAll(World, BlockPos, SearchOption)in the order that theirVoxelShapewill be encountered by the search.
 
 
-