-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
107 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.teammoeg.frostedheart; | ||
|
||
import com.teammoeg.frostedheart.content.climate.heatdevice.generator.GeneratorScreen; | ||
import com.teammoeg.frostedheart.content.climate.heatdevice.generator.t1.T1GeneratorLogic; | ||
import com.teammoeg.frostedheart.content.climate.heatdevice.generator.t1.T1GeneratorState; | ||
import com.teammoeg.frostedheart.content.climate.heatdevice.generator.t2.T2GeneratorLogic; | ||
import com.teammoeg.frostedheart.content.climate.heatdevice.generator.t2.T2GeneratorState; | ||
import com.teammoeg.frostedheart.content.decoration.RelicChestScreen; | ||
import com.teammoeg.frostedheart.content.incubator.IncubatorT1Screen; | ||
import com.teammoeg.frostedheart.content.incubator.IncubatorT2Screen; | ||
import com.teammoeg.frostedheart.content.research.gui.drawdesk.DrawDeskScreen; | ||
import com.teammoeg.frostedheart.content.steamenergy.HeatStatScreen; | ||
import com.teammoeg.frostedheart.content.steamenergy.sauna.SaunaScreen; | ||
import com.teammoeg.frostedheart.content.trade.gui.TradeScreen; | ||
import dev.ftb.mods.ftblibrary.ui.BaseScreen; | ||
import dev.ftb.mods.ftblibrary.ui.MenuScreenWrapper; | ||
import net.minecraft.client.gui.screens.MenuScreens; | ||
import net.minecraft.world.inventory.AbstractContainerMenu; | ||
import net.minecraft.world.inventory.MenuType; | ||
|
||
import java.util.function.Function; | ||
|
||
public class FHScreens { | ||
public static void init() { | ||
// Register screens | ||
MenuScreens.register(FHMenuTypes.GENERATOR_T1.getType(), GeneratorScreen<T1GeneratorState, T1GeneratorLogic>::new); | ||
MenuScreens.register(FHMenuTypes.GENERATOR_T2.getType(), GeneratorScreen<T2GeneratorState, T2GeneratorLogic>::new); | ||
MenuScreens.register(FHMenuTypes.RELIC_CHEST.get(), RelicChestScreen::new); | ||
registerFTBScreen(FHMenuTypes.DRAW_DESK.get(), DrawDeskScreen::new); | ||
registerFTBScreen(FHMenuTypes.TRADE_GUI.get(), TradeScreen::new); | ||
registerFTBScreen(FHMenuTypes.HEAT_STAT.get(), HeatStatScreen::new); | ||
MenuScreens.register(FHMenuTypes.SAUNA.get(), SaunaScreen::new); | ||
MenuScreens.register(FHMenuTypes.INCUBATOR_T1.get(), IncubatorT1Screen::new); | ||
MenuScreens.register(FHMenuTypes.INCUBATOR_T2.get(), IncubatorT2Screen::new); | ||
} | ||
|
||
public static <C extends AbstractContainerMenu, S extends BaseScreen> void | ||
registerFTBScreen(MenuType<C> type, Function<C, S> factory) { | ||
MenuScreens.register(type, FTBScreenFactory(factory)); | ||
} | ||
|
||
public static <C extends AbstractContainerMenu, S extends BaseScreen> MenuScreens.ScreenConstructor<C, MenuScreenWrapper<C>> | ||
FTBScreenFactory(Function<C, S> factory) { | ||
return (c, i, t) -> new MenuScreenWrapper<>(factory.apply(c), c, i, t).disableSlotDrawing(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/com/teammoeg/frostedheart/compat/ie/FHManual.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.teammoeg.frostedheart.compat.ie; | ||
|
||
import blusunrize.immersiveengineering.api.ManualHelper; | ||
import blusunrize.immersiveengineering.client.manual.ManualElementMultiblock; | ||
import blusunrize.lib.manual.ManualEntry; | ||
import blusunrize.lib.manual.ManualInstance; | ||
import blusunrize.lib.manual.Tree; | ||
import com.teammoeg.frostedheart.FHMain; | ||
import com.teammoeg.frostedheart.FHMultiblocks; | ||
import net.minecraft.resources.ResourceLocation; | ||
|
||
public class FHManual { | ||
private static Tree.InnerNode<ResourceLocation, ManualEntry> CATEGORY; | ||
|
||
public static void init() { | ||
ManualInstance man = ManualHelper.getManual(); | ||
CATEGORY = man.getRoot().getOrCreateSubnode(new ResourceLocation(FHMain.MODID, "main"), 110); | ||
{ | ||
ManualEntry.ManualEntryBuilder builder = new ManualEntry.ManualEntryBuilder(man); | ||
|
||
builder.addSpecialElement(new ManualEntry.SpecialElementData("generator", 0, () -> new ManualElementMultiblock(man, FHMultiblocks.Multiblock.GENERATOR_T1))); | ||
builder.readFromFile(new ResourceLocation(FHMain.MODID, "generator")); | ||
man.addEntry(CATEGORY, builder.create(), 0); | ||
} | ||
{ | ||
ManualEntry.ManualEntryBuilder builder = new ManualEntry.ManualEntryBuilder(man); | ||
builder.addSpecialElement(new ManualEntry.SpecialElementData("generator_2", 0, () -> new ManualElementMultiblock(man, FHMultiblocks.Multiblock.GENERATOR_T2))); | ||
builder.readFromFile(new ResourceLocation(FHMain.MODID, "generator_t2")); | ||
man.addEntry(CATEGORY, builder.create(), 1); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters