PersonTheCat / OreStoneVariants

A powerful utility for generating new blocks when given a foreground and background.
GNU General Public License v3.0
7 stars 8 forks source link

counting the ore generation (1.14) #88

Closed frakier closed 4 years ago

frakier commented 4 years ago

So i set up the mod in a test environment. I included Worldedit for the testing. I go to any random chunk and remove all the dirt, stones, water, lava, etc. Then I remove each ore keeping count. ore - #stone, #andesite, #diroite, #granite = total coal 710, 88, 23, 69 = 890 (expected 17 count x 20 size = 340 [give or take]) 2.617 times expected iron 362, 20, 21, 31 = 434 (expected 20 count x 9 size = 180 [give or take]) 2.411 times expected gold 9, 4, 16, 0 = 29 (expected 2 count x 9 size = 18 [give or take]) 1.611 times expected redstone 97, 31, 24, 11 = 163 (expected 8 count x 8 size = 64 [give or take]) 2.546 times expected lapis 14, 8, 1, 0 = 23 (expected 2 count x 7 size = 14 [give or take]) 1.642 times expected diamond 6, 0, 6, 3 = 15 (expected 1 count x 8 size = 8 [give or take]) 1.875 times expected emerald [was not in mountains so no data]

Is this expected or am I missing something?

frakier commented 4 years ago

in the VariantFeature.java in the method place() I added... System.out.println("Chunck"+pos.getX()/16+","+pos.getZ()/16+" "+ config.target.location);

loaded up a world, let the chunks load and left, then looked at the logs... copied out the results to a calc file and sorted by chunk and ore...

(checked 4 chunks for data; separated by "-") coal tried 59-66-67-69 (expected 17 tries) iron tried 73-77-79-96 (expected 20 tries) redstone tried 24-30-30-36 (expected 8 tries) gold tried 3-7-8-8 (expected 2 tries) lapis tried 5-8-8-10 (expected 2 tries) diamond tried 4-4-4-4 (expected 1 tries)

all seem to be calling 4 time [give or take] the expected amount.

looked at 5 chunks, one chunk it seemed everything was double compared to the other chunks (125-153-62-16-16-8), so for now considering it an anomaly of operating in the programming environment.

I'll keep digging.

rejahtavi commented 4 years ago

I think i'm running in to this same issue. I'm using OSV with Dooglamoo Worlds + YUNG's Better Caves, which generates some stunning underground layering of various rock types, including some areas that have mesa-style terracotta layers.

What I have found through testing is that the generation seems to be called once per chunk per stone type, instead of just once per chunk as would be expected.

Effectively, the density of ores in the world increases with the number of background block types specified.

Here are the key values that I'm using. If I replace 'minecraft background_blocks' with 'default default', OR if I remove most of the background blocks from the list, the amount of ore generation drastically decreases.

    values: [
      minecraft background_blocks
    ]
    blockGroups: {
      background_blocks: [
        stone
        andesite
        diorite
        granite
        netherrack
        sandstone
        terracotta
        red_terracotta
        orange_terracotta
        yellow_terracotta
        white_terracotta
        light_gray_terracotta
        brown_terracotta
      ]
    }
    propertyGroups: {
      minecraft: [
        coal_ore
        diamond_ore
        emerald_ore
        gold_ore
        iron_ore
        lapis_ore
        redstone_ore
      ]
    }
PersonTheCat commented 4 years ago

@rejahtavi Ah, I see. That's my mistake and should definitely be an easy fix! Thanks for pointing that out.

PersonTheCat commented 4 years ago

Hello. Sorry to see it's been such a long time, but I have finally gotten around to fixing this issue. Feel free to try out the latest version below and let me know if it's working for you as well. Thanks again for your help!

ore_stone_variants-5.2-1.14.zip Ore Stone Variants-5.4-1.16.2.zip

PersonTheCat commented 4 years ago

Closing this for now. Please reopen the issue if it still occurs for you in either 1.14 or 1.16.