Skip to content

Commit

Permalink
fix #7
Browse files Browse the repository at this point in the history
  • Loading branch information
TehcJS committed Jul 19, 2021
1 parent fb43a48 commit b17993e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/kotlin/dev/tehc/libreg/registry/block/Block.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,16 @@ fun blockItem(id: String, block: Block, itemSettings: FabricItemSettings): Pair<
}

fun blockItem(id: String, blockSettings: FabricBlockSettings, itemSettings: FabricItemSettings): Pair<Block, BlockItem> {
return blockItem(id, block(id, blockSettings), itemSettings)
val block = Block(blockSettings)
return blockItem(id, block, itemSettings)
}

fun blockItem(id: String, renderLayer: RenderLayer, block: Block, itemSettings: FabricItemSettings): Pair<Block, BlockItem> {
return Pair(block(id, renderLayer, block), item(id, BlockItem(block, itemSettings)) as BlockItem)
}

fun blockItem(id: String, renderLayer: RenderLayer, blockSettings: FabricBlockSettings, itemSettings: FabricItemSettings): Pair<Block, BlockItem> {
return blockItem(id, block(id, renderLayer, blockSettings), itemSettings)
val block = Block(blockSettings)
renderLayer(block, renderLayer)
return blockItem(id, block, itemSettings)
}

0 comments on commit b17993e

Please sign in to comment.