use of buildcraft.api.statements.StatementSlot in project BuildCraft by BuildCraft.
the class PipeItemsEmzuli method actionsActivated.
@Override
protected void actionsActivated(Collection<StatementSlot> actions) {
super.actionsActivated(actions);
activeFlags.clear();
for (StatementSlot action : actions) {
if (action.statement instanceof ActionExtractionPreset) {
setActivePreset(((ActionExtractionPreset) action.statement).color);
}
}
}
use of buildcraft.api.statements.StatementSlot in project BuildCraft by BuildCraft.
the class ActionRobotFilter method getGateFilterStacks.
public static Collection<ItemStack> getGateFilterStacks(DockingStation station) {
ArrayList<ItemStack> result = new ArrayList<>();
for (StatementSlot slot : station.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) {
result.add(stack);
}
}
}
}
}
return result;
}
use of buildcraft.api.statements.StatementSlot 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