Skip to content

Commit

Permalink
Fix improper container signal strength
Browse files Browse the repository at this point in the history
  • Loading branch information
Nickster258 committed Jun 27, 2020
1 parent 24e20e5 commit 199c0c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/Container.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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())
}
Expand Down

0 comments on commit 199c0c0

Please sign in to comment.