-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Hiiragi283/active_machine
Release v0.9.0
- Loading branch information
Showing
464 changed files
with
5,069 additions
and
4,587 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
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
40 changes: 40 additions & 0 deletions
40
src/client/kotlin/hiiragi283/ragium/client/gui/HTDistillationTowerScreen.kt
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,40 @@ | ||
package hiiragi283.ragium.client.gui | ||
|
||
import hiiragi283.ragium.api.RagiumAPI | ||
import hiiragi283.ragium.common.screen.HTDistillationTowerScreenHandler | ||
import net.fabricmc.api.EnvType | ||
import net.fabricmc.api.Environment | ||
import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant | ||
import net.minecraft.client.gui.DrawContext | ||
import net.minecraft.entity.player.PlayerInventory | ||
import net.minecraft.text.Text | ||
import net.minecraft.util.Identifier | ||
|
||
@Environment(EnvType.CLIENT) | ||
class HTDistillationTowerScreen(handler: HTDistillationTowerScreenHandler, inventory: PlayerInventory, title: Text) : | ||
HTMachineScreenBase<HTDistillationTowerScreenHandler>(handler, inventory, title) { | ||
override val texture: Identifier = RagiumAPI.id("textures/gui/distillation_tower.png") | ||
override val fluidCache: Array<FluidVariant> = Array(4) { FluidVariant.blank() } | ||
override val amountCache: LongArray = LongArray(4) { 0 } | ||
|
||
override fun drawMouseoverTooltip(context: DrawContext, x: Int, y: Int) { | ||
super.drawMouseoverTooltip(context, x, y) | ||
drawFluidTooltip(context, fluidCache[0], amountCache[0], 2, 2, x, y) | ||
drawFluidTooltip(context, fluidCache[1], amountCache[1], 5, 2, x, y) | ||
drawFluidTooltip(context, fluidCache[2], amountCache[2], 6, 2, x, y) | ||
drawFluidTooltip(context, fluidCache[3], amountCache[3], 7, 2, x, y) | ||
} | ||
|
||
override fun drawBackground( | ||
context: DrawContext, | ||
delta: Float, | ||
mouseX: Int, | ||
mouseY: Int, | ||
) { | ||
super.drawBackground(context, delta, mouseX, mouseY) | ||
drawFluid(context, fluidCache[0], 2, 2) | ||
drawFluid(context, fluidCache[1], 5, 2) | ||
drawFluid(context, fluidCache[2], 6, 2) | ||
drawFluid(context, fluidCache[3], 7, 2) | ||
} | ||
} |
Oops, something went wrong.