Interface GenericPeripheral
- All Superinterfaces:
 GenericSource
GenericSource which provides methods for a peripheral.
 
 Unlike a GenericSource, all methods should target the same type, for instance a
 block entity subclass. This is not currently enforced.
- 
Method Summary
Modifier and TypeMethodDescriptiondefault PeripheralTypegetType()Get the type of the exposed peripheral.Methods inherited from interface dan200.computercraft.api.lua.GenericSource
id 
- 
Method Details
- 
getType
Get the type of the exposed peripheral.Unlike normal
IPeripherals,GenericPeripheraldo not have to have a type. By default, the resulting peripheral uses the resource name of the wrapped block entity (for instanceminecraft:chest).However, in some cases it may be more appropriate to specify a more readable name. Overriding this method allows you to do so.
When multiple
GenericPeripherals return a non-empty peripheral type for a single tile entity, the lexicographically smallest will be chosen. In order to avoid this conflict, this method should only be implemented when your peripheral targets a single tile entity AND it's likely that you're the only mod to do so. Similarly this should NOT be implemented when your methods target a capability or other interface (such as Forge'sIItemHandler).- Returns:
 - The type of this peripheral or 
PeripheralType.untyped(). - See Also:
 
 
 -