Skip to content

Commit

Permalink
feat: make layer available in slot factory
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Nov 12, 2024
1 parent 9c66c98 commit 260c5eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ kotlin_version=2.0.21
fabric_kotlin_version=1.12.3

# mod properties
mod_version=1.5.4
mod_version=1.6
maven_group=net.mcbrawls
mod_id=slate
4 changes: 2 additions & 2 deletions src/main/kotlin/net/mcbrawls/slate/Slate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ open class Slate {
width: Int,
height: Int,
maxCount: Int,
crossinline slotFactory: (Int) -> Tile?,
crossinline slotFactory: (PagedSlateLayer, Int) -> Tile?,
builder: SlateLayer.() -> Unit = {},
) : PagedSlateLayer {
val layer = object : PagedSlateLayer(maxCount, width, height) {
override fun createTile(index: Int): Tile? {
return slotFactory.invoke(index)
return slotFactory.invoke(this, index)
}
}

Expand Down

0 comments on commit 260c5eb

Please sign in to comment.