rwtema / DenseOres

53 stars 51 forks source link

config: nestable groups #54

Open skaviouz opened 9 years ago

skaviouz commented 9 years ago

Example time: (the idea came to me while i was typing block_55. I don't want others to run out of key-presses either.)

# Configuration file

ores {

    block_0 {
        S:baseBlock=minecraft:iron_ore
        I:baseBlockMeta=0
        S:baseBlockTexture=iron_ore
        D:denseOreProbability=1.0
        I:renderType=0
        I:retroGenId=0
        S:underlyingBlock=stone
    }
}

groups {

    blocks_0 {
        S:baseBlock=minecraft:gold_ore
        I:baseBlockMeta=0
        S:baseBlockTexture=gold_ore
        D:denseOreProbability=1.0
        I:renderType=0
        I:retroGenId=0
        S:underlyingBlock=stone,netherrrack,endstone

        block_0 {
            S:baseBlock=minecraft:quartz_ore
            I:baseBlockMeta=0
            S:baseBlockTexture=quartz_ore
            D:denseOreProbability=1.0
            I:renderType=0
            I:retroGenId=0
            S:underlyingBlock=netherrack
        }

        block_1 {
            S:baseBlock=minecraft:gold_ore
            I:baseBlockMeta=0
            S:baseBlockTexture=gold_ore
            D:denseOreProbability=1.0
            I:renderType=0
            I:retroGenId=0
            S:underlyingBlock=stone
        }

        block_2 {
            S:baseBlock=minecraft:lapis_ore
            S:baseBlockTexture=lapis_ore
        }

        block_3 {
            S:baseBlock=minecraft:diamond_ore
            S:baseBlockTexture=diamond_ore
        }

        block_4 {
            S:baseBlock=minecraft:emerald_ore
            S:baseBlockTexture=emerald_ore
        }

        block_5 {
            S:baseBlock=minecraft:redstone_ore
            S:baseBlockTexture=redstone_ore
        }

        block_6 {
            S:baseBlock=minecraft:coal_ore
            S:baseBlockTexture=coal_ore
        }
    }

    blocks_1 {
        I:baseBlockMeta=0
        D:denseOreProbability=1.0
        I:renderType=1
        I:retroGenId=0
        S:underlyingBlock=stone,netherrack,endstone

        block_0 {
            S:baseBlock=appliedenergistics2:tile.OreQuartz
            S:baseBlockTexture=appliedenergistics2:OreQuartz
        }

        block_1 {
            S:baseBlock=appliedenergistics2:tile.OreQuartzCharged
            S:baseBlockTexture=appliedenergistics2:OreQuartzCharged
        }
    }

    blocks_2 {
        S:baseBlock=BiomesOPlenty:gemOre
        D:denseOreProbability=1.0
        I:renderType=1
        I:retroGenId=0
        S:underlyingBlock=stone,netherrack,endstone

        block_0 {
            I:baseBlockMeta=2
            S:baseBlockTexture=biomesoplenty:rubyore
        }

        block_1 {
            I:baseBlockMeta=4
            S:baseBlockTexture=biomesoplenty:peridotore
        }

        block_2 {
            I:baseBlockMeta=6
            S:baseBlockTexture=biomesoplenty:topazore
        }

        block_3 {
            I:baseBlockMeta=8
            S:baseBlockTexture=biomesoplenty:tanzaniteore
        }

        block_4 {
            I:baseBlockMeta=10
            S:baseBlockTexture=biomesoplenty:malachiteore
        }

        block_5 {
            I:baseBlockMeta=12
            S:baseBlockTexture=biomesoplenty:sapphireore
        }
    }
}

Also notice the gold and nether quart was completely typed out, this would allow copy and pasties into the new format with no problems.

Also note that BOP uses the same name, and look at how setting defaults for groupings would help.

This example would have all the vanilla overworld ores (coal is an ore now, limiting iron ore) dense versions to spawn in netherrack and endstone. as well as a few other adjustments.

UndeadZeratul commented 9 years ago

So you'd like to have an outer definition that sets defaults to those in the inner list of blocks, who can also set their own individual configuration options that override the defaults? I'd be ok with that. Would be nice to define TConstruct:SearedStone or BiomesOPlenty:gemOre once and not each and every time.

Although this could done by adding ore dictionary support as well; just grab the block list and iterate through each block and generate a dense block from it.