public static int getScreen(MachineRegistry m, TileEntity te) { if (m == MachineRegistry.ENGINE) return getEngineScreen(te); if (m == MachineRegistry.ADVANCEDGEARS) return TRANSDESC.getBaseScreen() + 1; for (int i = ENGINEDESC.ordinal(); i < TOOLDESC.ordinal(); i++) { if (tabList[i].machine == m) return tabList[i].getScreen(); } return -1; }
private static int getEngineScreen(TileEntity te) { EngineType e = ((TileEntityEngine) te).getEngineType(); int ei = (1 + e.ordinal()) / 8; return ENGINEDESC.getBaseScreen() + ei; }
private static int getEnginePage(TileEntity te) { EngineType e = ((TileEntityEngine) te).getEngineType(); return 1 + e.ordinal() - (getEngineScreen(te) - ENGINEDESC.getBaseScreen()) * 8; }
public static HandbookRegistry[] getMiscTabs() { int size = ENGINEDESC.ordinal() - MISCDESC.ordinal() - 1; HandbookRegistry[] tabs = new HandbookRegistry[size]; System.arraycopy(tabList, MISCDESC.ordinal() + 1, tabs, 0, size); return tabs; }
public static HandbookRegistry[] getEngineTabs() { int size = TRANSDESC.ordinal() - ENGINEDESC.ordinal() - 1; HandbookRegistry[] tabs = new HandbookRegistry[size]; System.arraycopy(tabList, ENGINEDESC.ordinal() + 1, tabs, 0, size); return tabs; }