Make mod actually run
This commit is contained in:
parent
fa67353eae
commit
2220a7039f
@ -17,10 +17,14 @@ public abstract class ItemMixin {
|
||||
cancellable = true
|
||||
)
|
||||
public void getItemCategory$hook(CallbackInfoReturnable<CreativeModeTab> info) {
|
||||
if (MCreativeTabsKt.getMainTabContents().contains((Item) ((Object) this))) {
|
||||
info.setReturnValue(OverdriveThatMatters.INSTANCE.CREATIVE_TAB);
|
||||
} else if (MCreativeTabsKt.getDecorativeTabContents().contains((Item) ((Object) this))) {
|
||||
info.setReturnValue(OverdriveThatMatters.INSTANCE.CREATIVE_TAB_DECORATIVE);
|
||||
try {
|
||||
if (MCreativeTabsKt.getMainTabContents().contains((Item) ((Object) this))) {
|
||||
info.setReturnValue(OverdriveThatMatters.INSTANCE.CREATIVE_TAB);
|
||||
} else if (MCreativeTabsKt.getDecorativeTabContents().contains((Item) ((Object) this))) {
|
||||
info.setReturnValue(OverdriveThatMatters.INSTANCE.CREATIVE_TAB_DECORATIVE);
|
||||
}
|
||||
} catch(Throwable err) {
|
||||
info.setReturnValue(CreativeModeTab.TAB_MISC); // fuck you shapedrecipebuilder
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -285,5 +285,6 @@ private fun addDecorativeTabItems(consumer: CreativeTabOutput) {
|
||||
}
|
||||
}
|
||||
|
||||
val MainTabContents = CreativeTabOutput().also { addMainCreativeTabItems(it) }
|
||||
val DecorativeTabContents = CreativeTabOutput().also { addDecorativeTabItems(it) }
|
||||
// lazy is to prevent "exception in initializer" and allow to re-initialize in future
|
||||
val MainTabContents by lazy { CreativeTabOutput().also { addMainCreativeTabItems(it) } }
|
||||
val DecorativeTabContents by lazy { CreativeTabOutput().also { addDecorativeTabItems(it) } }
|
||||
|
Loading…
Reference in New Issue
Block a user