Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 private static int getEngineScreen(TileEntity te) {
   EngineType e = ((TileEntityEngine) te).getEngineType();
   int ei = (1 + e.ordinal()) / 8;
   return ENGINEDESC.getBaseScreen() + ei;
 }
Exemplo n.º 3
0
 private static int getEnginePage(TileEntity te) {
   EngineType e = ((TileEntityEngine) te).getEngineType();
   return 1 + e.ordinal() - (getEngineScreen(te) - ENGINEDESC.getBaseScreen()) * 8;
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 5
0
 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;
 }