Skip to content

Commit

Permalink
Actually add ores instead of generic blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
NoudZandbergen committed Oct 18, 2022
1 parent 012a1b8 commit 5766c69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/me/steven/indrev/registry/MaterialHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import net.fabricmc.fabric.api.`object`.builder.v1.block.FabricBlockSettings
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap
import net.fabricmc.loader.api.FabricLoader
import net.minecraft.block.Block
import net.minecraft.block.OreBlock
import net.minecraft.block.Material
import net.minecraft.client.render.RenderLayer
import net.minecraft.entity.EquipmentSlot
Expand All @@ -29,7 +30,7 @@ class MaterialHelper(private val id: String, private val block: MaterialHelper.(
return this
}

fun withOre(rawOre: Boolean = true, supplier: (FabricBlockSettings) -> Block = { Block(it) }): MaterialHelper {
fun withOre(rawOre: Boolean = true, supplier: (FabricBlockSettings) -> Block = { OreBlock(it) }): MaterialHelper {
val ore = supplier(FabricBlockSettings.of(Material.STONE).requiresTool().strength(3f, 3f))
val identifier = identifier("${id}_ore")
map[identifier] = {
Expand Down

0 comments on commit 5766c69

Please sign in to comment.