diff --git a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/ContainerGUIFactories.kt b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/ContainerGUIFactories.kt index a8be66218..15050eb2e 100644 --- a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/ContainerGUIFactories.kt +++ b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/ContainerGUIFactories.kt @@ -18,10 +18,13 @@ import de.bixilon.minosoft.data.container.Container import de.bixilon.minosoft.data.registries.factory.clazz.mapping.DefaultClassMappingFactory import de.bixilon.minosoft.gui.rendering.gui.GUIRenderer import de.bixilon.minosoft.gui.rendering.gui.gui.screen.container.generic.GenericContainerScreen +import de.bixilon.minosoft.gui.rendering.gui.gui.screen.container.processing.smelting.FurnaceContainerScreen object ContainerGUIFactories : DefaultClassMappingFactory>( GenericContainerScreen, CraftingContainerScreen, + + FurnaceContainerScreen, ) { fun build(guiRenderer: GUIRenderer, container: Container): ContainerScreen<*>? { diff --git a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/processing/ProcessingContainerScreen.kt b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/processing/ProcessingContainerScreen.kt new file mode 100644 index 000000000..4a31e6920 --- /dev/null +++ b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/processing/ProcessingContainerScreen.kt @@ -0,0 +1,25 @@ +/* + * Minosoft + * Copyright (C) 2020-2022 Moritz Zwerger + * + * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with this program. If not, see . + * + * This software is not affiliated with Mojang AB, the original developer of Minecraft. + */ + +package de.bixilon.minosoft.gui.rendering.gui.gui.screen.container.processing + +import de.bixilon.minosoft.data.container.types.processing.ProcessingContainer +import de.bixilon.minosoft.gui.rendering.gui.GUIRenderer +import de.bixilon.minosoft.gui.rendering.gui.atlas.AtlasElement +import de.bixilon.minosoft.gui.rendering.gui.gui.screen.container.BackgroundedContainerScreen + +abstract class ProcessingContainerScreen( + guiRenderer: GUIRenderer, + container: C, + atlasElement: AtlasElement?, +) : BackgroundedContainerScreen(guiRenderer, container, atlasElement) diff --git a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/processing/smelting/FurnaceContainerScreen.kt b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/processing/smelting/FurnaceContainerScreen.kt new file mode 100644 index 000000000..d15b54b57 --- /dev/null +++ b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/processing/smelting/FurnaceContainerScreen.kt @@ -0,0 +1,34 @@ +/* + * Minosoft + * Copyright (C) 2020-2022 Moritz Zwerger + * + * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with this program. If not, see . + * + * This software is not affiliated with Mojang AB, the original developer of Minecraft. + */ + +package de.bixilon.minosoft.gui.rendering.gui.gui.screen.container.processing.smelting + +import de.bixilon.minosoft.data.container.types.processing.smelting.FurnaceContainer +import de.bixilon.minosoft.gui.rendering.gui.GUIRenderer +import de.bixilon.minosoft.gui.rendering.gui.gui.screen.container.ContainerGUIFactory +import kotlin.reflect.KClass + +class FurnaceContainerScreen( + guiRenderer: GUIRenderer, + container: FurnaceContainer, +) : SmeltingContainerScreen(guiRenderer, container, guiRenderer.atlasManager["minecraft:furnace_container"], guiRenderer.atlasManager["minecraft:furnace_container_fuel"], guiRenderer.atlasManager["minecraft:furnace_container_process"]) { + + + companion object : ContainerGUIFactory { + override val clazz: KClass = FurnaceContainer::class + + override fun build(guiRenderer: GUIRenderer, container: FurnaceContainer): FurnaceContainerScreen { + return FurnaceContainerScreen(guiRenderer, container) + } + } +} diff --git a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/processing/smelting/SmeltingContainerScreen.kt b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/processing/smelting/SmeltingContainerScreen.kt new file mode 100644 index 000000000..729e6df67 --- /dev/null +++ b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/gui/screen/container/processing/smelting/SmeltingContainerScreen.kt @@ -0,0 +1,29 @@ +/* + * Minosoft + * Copyright (C) 2020-2022 Moritz Zwerger + * + * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with this program. If not, see . + * + * This software is not affiliated with Mojang AB, the original developer of Minecraft. + */ + +package de.bixilon.minosoft.gui.rendering.gui.gui.screen.container.processing.smelting + +import de.bixilon.minosoft.data.container.types.processing.smelting.SmeltingContainer +import de.bixilon.minosoft.gui.rendering.gui.GUIRenderer +import de.bixilon.minosoft.gui.rendering.gui.atlas.AtlasElement +import de.bixilon.minosoft.gui.rendering.gui.gui.screen.container.processing.ProcessingContainerScreen + +abstract class SmeltingContainerScreen( + guiRenderer: GUIRenderer, + container: C, + atlasElement: AtlasElement?, + protected val fuelAtlasElement: AtlasElement?, + protected val processAtlasElement: AtlasElement?, +) : ProcessingContainerScreen(guiRenderer, container, atlasElement) { + +}