render furnace screen

This commit is contained in:
Bixilon 2022-05-03 12:46:18 +02:00
parent c94d50a52b
commit 143a05432a
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
4 changed files with 91 additions and 0 deletions

View File

@ -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.data.registries.factory.clazz.mapping.DefaultClassMappingFactory
import de.bixilon.minosoft.gui.rendering.gui.GUIRenderer 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.generic.GenericContainerScreen
import de.bixilon.minosoft.gui.rendering.gui.gui.screen.container.processing.smelting.FurnaceContainerScreen
object ContainerGUIFactories : DefaultClassMappingFactory<ContainerGUIFactory<*, *>>( object ContainerGUIFactories : DefaultClassMappingFactory<ContainerGUIFactory<*, *>>(
GenericContainerScreen, GenericContainerScreen,
CraftingContainerScreen, CraftingContainerScreen,
FurnaceContainerScreen,
) { ) {
fun build(guiRenderer: GUIRenderer, container: Container): ContainerScreen<*>? { fun build(guiRenderer: GUIRenderer, container: Container): ContainerScreen<*>? {

View File

@ -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 <https://www.gnu.org/licenses/>.
*
* 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<C : ProcessingContainer>(
guiRenderer: GUIRenderer,
container: C,
atlasElement: AtlasElement?,
) : BackgroundedContainerScreen<C>(guiRenderer, container, atlasElement)

View File

@ -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 <https://www.gnu.org/licenses/>.
*
* 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<FurnaceContainer>(guiRenderer, container, guiRenderer.atlasManager["minecraft:furnace_container"], guiRenderer.atlasManager["minecraft:furnace_container_fuel"], guiRenderer.atlasManager["minecraft:furnace_container_process"]) {
companion object : ContainerGUIFactory<FurnaceContainerScreen, FurnaceContainer> {
override val clazz: KClass<FurnaceContainer> = FurnaceContainer::class
override fun build(guiRenderer: GUIRenderer, container: FurnaceContainer): FurnaceContainerScreen {
return FurnaceContainerScreen(guiRenderer, container)
}
}
}

View File

@ -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 <https://www.gnu.org/licenses/>.
*
* 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<C : SmeltingContainer>(
guiRenderer: GUIRenderer,
container: C,
atlasElement: AtlasElement?,
protected val fuelAtlasElement: AtlasElement?,
protected val processAtlasElement: AtlasElement?,
) : ProcessingContainerScreen<C>(guiRenderer, container, atlasElement) {
}