| import net.minecraftforge.common.ForgeDirection; |
| * This interface is implemented by the computer case and robot tile entities |
| * to allow item components to query the orientation of their host, i.e. to |
| * allow getting the facing of the tile entity passed to their drivers' |
| * {@link li.cil.oc.api.driver.Item#createEnvironment(net.minecraft.item.ItemStack, net.minecraft.tileentity.TileEntity)} |
| public interface Rotatable { |
| * The current facing of a tile entity implementing this interface. |
| * Intended to be used to query the orientation of an item components' host. |
| * class SomeDriver implements li.cil.oc.api.driver.Item { |
| * ManagedEnvironment createEnvironment(ItemStack stack, TileEntity tileentity) { |
| * if (tileentity instanceof Rotatable) { |
| * ForgeDirection facing = ((Rotatable)tileentity).facing(); |
| * // Do something with facing. |
| * @return the current facing. |