use of net.geforcemods.securitycraft.api.Option in project SecurityCraft by Geforce132.
the class TileEntityLaserBlock method onLinkedBlockAction.
@Override
protected void onLinkedBlockAction(EnumLinkedAction action, Object[] parameters, ArrayList<CustomizableSCTE> excludedTEs) {
if (action == EnumLinkedAction.OPTION_CHANGED) {
Option<?> option = (Option<?>) parameters[0];
enabledOption.copy(option);
toggleLaser((OptionBoolean) option);
excludedTEs.add(this);
createLinkedBlockAction(EnumLinkedAction.OPTION_CHANGED, new Option[] { option }, excludedTEs);
} else if (action == EnumLinkedAction.MODULE_INSERTED) {
ItemStack module = (ItemStack) parameters[0];
insertModule(module);
excludedTEs.add(this);
createLinkedBlockAction(EnumLinkedAction.MODULE_INSERTED, parameters, excludedTEs);
} else if (action == EnumLinkedAction.MODULE_REMOVED) {
EnumCustomModules module = (EnumCustomModules) parameters[1];
removeModule(module);
excludedTEs.add(this);
createLinkedBlockAction(EnumLinkedAction.MODULE_REMOVED, parameters, excludedTEs);
}
}
Aggregations