@@ -35,32 +35,7 @@ class ModPluginOpenComputers extends IModPlugin {
35
35
registry.addRecipeHandlers(CallbackDocHandler .CallbackDocRecipeHandler )
36
36
registry.addRecipes(CallbackDocHandler .getRecipes(registry))
37
37
38
- def useNBT (names : String * ) = names.map(name => {
39
- val info = Items .get(name)
40
- Option (info.item).getOrElse(Item .getItemFromBlock(info.block))
41
- }).filter(_ != null ).distinct.foreach(registry.getJeiHelpers.getSubtypeRegistry.useNbtForSubtypes(_))
42
-
43
- // Only the preconfigured blocks and items have to be here.
44
- useNBT(
45
- Constants .BlockName .Microcontroller ,
46
- Constants .BlockName .Robot ,
47
-
48
- Constants .ItemName .Drone ,
49
- Constants .ItemName .Tablet
50
- )
51
-
52
- registry.getJeiHelpers.getSubtypeRegistry.registerNbtInterpreter(Items .get(Constants .ItemName .Floppy ).item(), new ISubtypeInterpreter {
53
- override def getSubtypeInfo (stack : ItemStack ): String = {
54
- if (! stack.hasTagCompound) return null
55
- val compound : NBTTagCompound = stack.getTagCompound
56
- val data = new NBTTagCompound
57
- // Separate loot disks from normal floppies
58
- if (compound.hasKey(Settings .namespace + " lootFactory" )) {
59
- data.setTag(Settings .namespace + " lootFactory" , compound.getTag(Settings .namespace + " lootFactory" ))
60
- }
61
- if (data.hasNoTags) null else data.toString
62
- }
63
- })
38
+ registry.addAdvancedGuiHandlers(RelayGuiHandler )
64
39
}
65
40
66
41
private var stackUnderMouse : (GuiContainer , Int , Int ) => Option [ItemStack ] = null
@@ -70,7 +45,5 @@ class ModPluginOpenComputers extends IModPlugin {
70
45
ItemSearch .stackFocusing += ((container, mouseX, mouseY) => stackUnderMouse(container, mouseX, mouseY))
71
46
}
72
47
stackUnderMouse = (container, mouseX, mouseY) => Option (jeiRuntime.getItemListOverlay.getStackUnderMouse)
73
-
74
- // TODO check for focused input
75
48
}
76
49
}
0 commit comments