blob: 4aca4e1e11900a22283e1645fd2c668118c5a1d3 [file] [log] [blame] [raw]
package li.cil.oc.api.driver;
/**
* This interface can be added to <em>environments</em> generated by block
* drivers to provide a 'preferred name' in case the driver is merged with
* other block drivers (interface based drivers such as for <tt>IInventory</tt>).
* <p/>
* This was previously to be implemented on the driver itself, but that has been
* deprecated. Implement it in the environment returned from the block driver's
* {@link Block#createEnvironment(net.minecraft.world.World, int, int, int)}
* method instead.
*/
public interface NamedBlock {
/**
* The preferred name, in case the driver is merged with others.
* <p/>
* If multiple drivers with a preferred name are merged, the first one is
* picked. This should usually not happen, since this is only intended to
* be implemented by drivers for actual tile entities (not interfaces).
*
* @return the preferred name.
*/
String preferredName();
}