|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMedia
Represents an item that can be placed in a disk drive and used by a Computer. Implement this interface on your Item class to allow it to be used in the drive.
Method Summary | |
---|---|
IMount |
createDataMount(ItemStack stack,
World world)
If this disk represents an item with data (like a floppy disk), get a mount representing it's contents. |
java.lang.String |
getAudioRecordName(ItemStack stack)
If this disk represents an item with audio (like a record), get the resource name of the audio track to play. |
java.lang.String |
getAudioTitle(ItemStack stack)
If this disk represents an item with audio (like a record), get the readable name of the audio track. |
java.lang.String |
getLabel(ItemStack stack)
Get a string representing the label of this item. |
boolean |
setLabel(ItemStack stack,
java.lang.String label)
Set a string representing the label of this item. |
Method Detail |
---|
java.lang.String getLabel(ItemStack stack)
stack
- The itemstack to inspect
boolean setLabel(ItemStack stack, java.lang.String label)
stack
- The itemstack to modify.label
- The string to set the label to.
java.lang.String getAudioTitle(ItemStack stack)
stack
- The itemstack to inspect.
java.lang.String getAudioRecordName(ItemStack stack)
stack
- The itemstack to inspect.
IMount createDataMount(ItemStack stack, World world)
stack
- The itemstack to inspect.world
- The world in which the item and disk drive reside.
IMount
,
IWritableMount
,
ComputerCraftAPI#createSaveDirMount(World, String)
,
ComputerCraftAPI.createResourceMount(Class, String, String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |