Skip to content

Commit

Permalink
Fixed #49
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanPB committed Jul 8, 2021
1 parent 41eb8f2 commit 2193f29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import dev.nathanpb.dml.utils.setStacks
import io.github.cottonmc.cotton.gui.SyncedGuiDescription
import io.github.cottonmc.cotton.gui.widget.*
import io.github.cottonmc.cotton.gui.widget.data.Insets
import net.fabricmc.api.EnvType
import net.fabricmc.loader.api.FabricLoader
import net.minecraft.entity.player.PlayerInventory
import net.minecraft.inventory.SimpleInventory
import net.minecraft.item.ItemStack
Expand Down Expand Up @@ -111,15 +113,19 @@ class DeepLearnerScreenHandler (
}

private val prevButton: WButton = WButton(LiteralText("<")).apply {
addTooltip(TooltipBuilder().add(TranslatableText("gui.$MOD_ID.previous")))
if (FabricLoader.getInstance().environmentType == EnvType.CLIENT) {
addTooltip(TooltipBuilder().add(TranslatableText("gui.$MOD_ID.previous")))
}

setOnClick {
currentSlot = nextReverseDataModelIndex()
}
}

private val nextButton: WButton = WButton(LiteralText(">")).apply {
addTooltip(TooltipBuilder().add(TranslatableText("gui.${MOD_ID}.next")))
if (FabricLoader.getInstance().environmentType == EnvType.CLIENT) {
addTooltip(TooltipBuilder().add(TranslatableText("gui.${MOD_ID}.next")))
}

setOnClick {
currentSlot = nextForwardDataModelIndex()
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fabric_version=0.34.9+1.17
loom_version=0.8-SNAPSHOT

# Mod Properties
mod_version = 0.4.0-beta2
mod_version = 0.4.1-beta
maven_group = dev.nathanpb
archives_base_name = deepmoblearning-refabricated

Expand Down

0 comments on commit 2193f29

Please sign in to comment.