#Custom Ore block Gen with overlay texture

11 messages · Page 1 of 1 (latest)

mental hedge
#
function createOres(id, color, hardness, level, oreOption) {
        let condStone = oreOption == 'stone' ? `unify:${id}_ore` : `unify:${id}_${oreOption}_ore`
        event.create(condStone)
            .hardness(hardness)
            .material('stone')
            .tagBlock(level)
            .tagBlock('minecraft:mineable/pickaxe')
            .tagItem('forge:ores')
            .tagItem(`forge:ores/${id}`)
            .tagItem('unify:ores')
            .tagItem(`unify:ores/${id}`)
            .color(1, color)
            .item(item => item.color(1, color))
            .modelJson = {
            parent: 'unify:block/ore',
            textures: {
                all: `unify:ores_variant/${oreOption}`,
                particle: `unify:ores_variant/${oreOption}`,
                overlay: 'unify:ores_variant/ore_overlay'
            }
        }
    }

createOres('iridium', '#A1E4E4', 20, 'forge:needs_netherite_tool', 'moon')
createOres('osmium', '#3232FF', 7, 'minecraft:needs_iron_tool', 'stone')

These are the 2 examples I'm giving

vivid laurelBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

mental hedge
obtuse ruinBOT
#

Paste version of ore.json from @mental hedge

mental hedge
#

block textures and overlay ore

#

the problem is the texture on the block when put into the world. the texture of the block in an item in the inventory is normal

mental hedge
#

Custom Ore block Gen with overlay texture

autumn quail
#

I did this for datagen ores and it works well, maybe this will help you.

    event
      .create(`${mat}_ore`)
      .color(1, ore_props[mat].color)
      .soundType('gilded_blackstone')
      .tagBoth('forge:ores')
      .tagBoth(`forge:ores/${mat}`)
      .requiresTool(true)
      .defaultCutout()
      .item(i => {
        i.color(ore_props[mat].color)
      }).modelJson = {
      parent: 'kubejs:block/ore',
      textures: {
        all: `kubejs:block/ore_stone`,
        particle: `kubejs:block/ore_overlay`,
        overlay: `kubejs:block/ore_overlay`
      }
    }```
obtuse ruinBOT
#

Paste version of ore.json from @autumn quail

mental hedge
#

thanks