IC2 Oregen Question

  • I am working on updating the configurations for the mod Custom Ore Generation: First Revival, a mod designed to replace vanilla ore sprinkling with more realistic veins, ore clouds, and soon strata. In the course of making configurations, I have set up sufficient calculation to make the oregen consistent with the vanilla WorldGenMinable() values (min/max Y, max ores per vein, max veins per chunk). However, some mods, including IC2, do not have source code where I can see it (or at least, if they do, I don't know where to look).


    I was hoping it would be alright to ask what the values are for IC2 ores?

    • Official Post

    It'd be easiest if you just decompile IC2 with BytecodeViewer or similar and look at IC2.generate around line 650.


    IC2 scales its vertical ore distribution and chunk count proportionally to the world height. The quantities are being randomly varied to reduce the bias from the generation (=chunk) grid. There's also a config option to scale the generation quantities.


    The values except for rubber trees with a normal world height are:
    copper: avg. 15 chunks, size 10, y 10 to 70, non-uniformly with peak at 40
    tin: avg. 25 chunks, size 6, y 0 to 40 uniform
    uranium: 20 chunks, size 3, y 0 to 60 uniform
    lead: 8 chunks, size 4, y 0 to 60 uniform


    The size is the WorldGenMinable parameter, which is not linear.

  • That's what I was looking for, thanks! Custom Ore Generation includes its own RNG, and I include the assumption of averages in my calculations when creating the configurations (and there are options for uniform and non-uniform distributions) by halving the max and supplying the resulting value to both the average and the range.


    One question: Those veins per chunk value; are they averages or maximums? If those are averages, what are their maximums? UPDATE: Never mind; I got this viewer figured out.


    And trust me, I had enough of a nightmare trying to figure my way through decompiled vanilla; Java is not something I have much knowledge of. :(