use of forestry.sorting.FilterData in project ForestryMC by ForestryMC.
the class TileGeneticFilter method getValidDirections.
public Collection<EnumFacing> getValidDirections(ItemStack itemStack, EnumFacing from) {
ISpeciesRoot root = AlleleManager.alleleRegistry.getSpeciesRoot(itemStack);
IIndividual individual = null;
ISpeciesType type = null;
if (root != null) {
individual = root.getMember(itemStack);
type = root.getType(itemStack);
}
IFilterData filterData = new FilterData(root, individual, type);
List<EnumFacing> validFacings = new LinkedList<>();
for (EnumFacing facing : EnumFacing.VALUES) {
if (facing == from) {
continue;
}
if (isValidFacing(facing, itemStack, filterData)) {
validFacings.add(facing);
}
}
return validFacings;
}
Aggregations