use of buildcraft.api.statements.StatementParameterItemStack in project BuildCraft by BuildCraft.
the class BoardRobotGenericSearchBlock method updateFilter.
public final void updateFilter() {
blockFilter.clear();
for (StatementSlot slot : robot.getLinkedStation().getActiveActions()) {
if (slot.statement instanceof ActionRobotFilter) {
for (IStatementParameter p : slot.parameters) {
if (p != null && p instanceof StatementParameterItemStack) {
StatementParameterItemStack param = (StatementParameterItemStack) p;
ItemStack stack = param.getItemStack();
if (stack != null && stack.getItem() instanceof ItemBlock) {
ItemBlock item = (ItemBlock) stack.getItem();
blockFilter.add(item.block.getStateFromMeta(stack.getMetadata()));
}
}
}
}
}
}
Aggregations