From 199c0c0504ba10abad802588b07f059b4627b84b Mon Sep 17 00:00:00 2001 From: Nicholas Stonecipher Date: Sat, 27 Jun 2020 16:11:58 -0400 Subject: [PATCH] Fix improper container signal strength --- src/main/kotlin/Container.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/Container.kt b/src/main/kotlin/Container.kt index 6759aa5..7802b11 100644 --- a/src/main/kotlin/Container.kt +++ b/src/main/kotlin/Container.kt @@ -8,7 +8,7 @@ import org.bukkit.entity.Player import org.bukkit.inventory.ItemStack import org.bukkit.inventory.meta.ItemMeta import kotlin.math.ceil -import kotlin.math.max +import kotlin.math.min @CommandAlias("container") @Description("Container fetching command") @@ -53,7 +53,7 @@ class Container : BaseCommand() { val itemList = compound.getCompoundList("Items") for (i in 1..(itemsNeeded / 64.toFloat() + 1).toInt()) { itemList.addCompound().apply { - setByte("Count", max(itemsNeeded, 64).toByte()) + setByte("Count", min(itemsNeeded, 64).toByte()) setString("id", "minecraft:redstone") setByte("Slot", (i - 1).toByte()) }