2022-11-09 22:15:45 +01:00
|
|
|
/**
|
|
|
|
* This file is part of the public ComputerCraft API - http://www.computercraft.info
|
2022-11-09 22:16:55 +01:00
|
|
|
* Copyright Daniel Ratcliffe, 2011-2015. This API may be redistributed unmodified and in
|
|
|
|
* full only. For help using the API, and posting your mods, visit the forums at
|
|
|
|
* computercraft.info.
|
2022-11-09 22:15:45 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
package dan200.computercraft.api.media;
|
|
|
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This interface is used to provide IMedia implementations for ItemStack
|
|
|
|
* @see dan200.computercraft.api.ComputerCraftAPI#registerMediaProvider(IMediaProvider)
|
|
|
|
*/
|
2022-11-09 22:16:55 +01:00
|
|
|
public interface IMediaProvider {
|
2022-11-09 22:15:45 +01:00
|
|
|
/**
|
|
|
|
* Produce an IMedia implementation from an ItemStack.
|
2022-11-09 22:16:55 +01:00
|
|
|
* @see
|
|
|
|
* dan200.computercraft.api.ComputerCraftAPI#registerMediaProvider(IMediaProvider)
|
|
|
|
* @return an IMedia implementation, or null if the item is not something you wish to
|
|
|
|
* handle
|
2022-11-09 22:15:45 +01:00
|
|
|
*/
|
2022-11-09 22:16:55 +01:00
|
|
|
public IMedia getMedia(ItemStack stack);
|
2022-11-09 22:15:45 +01:00
|
|
|
}
|