appeng.api.implementations.tiles.IChestOrDrive Java Examples

The following examples show how to use appeng.api.implementations.tiles.IChestOrDrive. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AdapterStorage.java    From OpenPeripheral-Integration with MIT License 5 votes vote down vote up
@ScriptCallable(returnTypes = { ReturnType.NUMBER, ReturnType.STRING })
public IMultiReturn getCellStatus(IChestOrDrive target, @Arg(name = "slot") Index slot) {
	try {
		int status = target.getCellStatus(slot.value);
		return MultiReturn.wrap(status, intToState(status));
	} catch (IndexOutOfBoundsException e) {
		throw new IllegalArgumentException("Invalid cell index: " + slot);
	}
}
 
Example #2
Source File: AdapterStorage.java    From OpenPeripheral-Integration with MIT License 4 votes vote down vote up
@Override
public Class<?> getTargetClass() {
	return IChestOrDrive.class;
}
 
Example #3
Source File: AdapterStorage.java    From OpenPeripheral-Integration with MIT License 4 votes vote down vote up
@ScriptCallable(returnTypes = ReturnType.NUMBER)
public int getCellCount(IChestOrDrive target) {
	return target.getCellCount();
}
 
Example #4
Source File: ICellHandler.java    From Framez with GNU General Public License v3.0 2 votes vote down vote up
/**
 * 
 * Called when the storage cell is planed in an ME Chest and the user tries to open the terminal side, if your item
 * is not available via ME Chests simply tell the user they can't use it, or something, other wise you should open
 * your gui and display the cell to the user.
 * 
 * @param player player opening chest gui
 * @param chest to be opened chest
 * @param cellHandler cell handler
 * @param inv inventory handler
 * @param is item
 * @param chan storage channel
 */
void openChestGui(EntityPlayer player, IChestOrDrive chest, ICellHandler cellHandler, IMEInventoryHandler inv, ItemStack is, StorageChannel chan);
 
Example #5
Source File: ICellHandler.java    From PneumaticCraft with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Called when the storage cell is planed in an ME Chest and the user tries to open the terminal side, if your item
 * is not available via ME Chests simply tell the user they can't use it, or something, other wise you should open
 * your gui and display the cell to the user.
 *
 * @param player      player opening chest gui
 * @param chest       to be opened chest
 * @param cellHandler cell handler
 * @param inv         inventory handler
 * @param is          item
 * @param chan        storage channel
 */
void openChestGui( EntityPlayer player, IChestOrDrive chest, ICellHandler cellHandler, IMEInventoryHandler inv, ItemStack is, StorageChannel chan );