diff options
author | Linnea Gräf <nea@nea.moe> | 2024-07-10 01:34:37 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-07-10 03:14:55 +0200 |
commit | 986ce538f123cdec7e0da12ed89ba7225539df0a (patch) | |
tree | dd4a3448878c2af26be3bca81bbc8aa710bdc112 /src/main/kotlin/moe/nea/firmament/util/customgui/CoordRememberingSlot.kt | |
parent | 4e1cda1d64ce60719f6ff6e60c6af4881d81fdd2 (diff) | |
download | firmament-986ce538f123cdec7e0da12ed89ba7225539df0a.tar.gz firmament-986ce538f123cdec7e0da12ed89ba7225539df0a.tar.bz2 firmament-986ce538f123cdec7e0da12ed89ba7225539df0a.zip |
Add interactive storage overlay
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/customgui/CoordRememberingSlot.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/util/customgui/CoordRememberingSlot.kt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/customgui/CoordRememberingSlot.kt b/src/main/kotlin/moe/nea/firmament/util/customgui/CoordRememberingSlot.kt new file mode 100644 index 0000000..cf290af --- /dev/null +++ b/src/main/kotlin/moe/nea/firmament/util/customgui/CoordRememberingSlot.kt @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe> + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +package moe.nea.firmament.util.customgui + +import net.minecraft.screen.slot.Slot + +interface CoordRememberingSlot { + fun rememberCoords_firmament() + fun restoreCoords_firmament() + fun getOriginalX_firmament(): Int + fun getOriginalY_firmament(): Int +} + +val Slot.originalX get() = (this as CoordRememberingSlot).getOriginalX_firmament() +val Slot.originalY get() = (this as CoordRememberingSlot).getOriginalY_firmament() |