D0CTOR-ZED / GenMogrify-docs

World gen transmogrification.... change the world as it is generated.
https://www.curseforge.com/minecraft/mc-mods/genmogrify
0 stars 0 forks source link

[Suggestion] conditions: e.g. dimension or y-level #2

Closed MSandro closed 3 months ago

MSandro commented 4 months ago

Thank you very much for the last fix, the NeoForge Version works very well now. I like the mod!

would it be possible to implement some conditions, like in which dimension / biome or on which y level it should replace?

Or for Mobs it would be usefull to add a chance parameter.

[
  {
    "block": "minecraft:lava",
    "dimension": "minecraft:the_nether",
    "result": "minecraft:netherrack"
  },
  {
    "block": "minecraft:lava",
    "dimension": "minecraft:overworld",
    "min-y": -63,
    "max-y": 10,
    "result": "minecraft:deepslate"
  }
]
D0CTOR-ZED commented 4 months ago

The dimension idea should be easy enough and fits the theme of the mod.

The y-level might be possible, but I need to be cautious how much I do here as this is done every time a chunk is generated. If the target block isn't common, it shouldn't be much of an issue as I would only need to check y level if the block matches.

I'm not sure what you mean by a chance parameter for mobs. You can use arrays which get selected at from random. For example:

{ "entity": "creeper",
  "result": [
    "cow",
    "pig",
    "sheep",
    "chicken",
    "creeper"
  ]
}

That would make 80% of creeper spawns be random animals instead.

Oh, and the lava example you used reminds me that I have an undocumented feature. If you leave out the result from a block mogrification, it will turn that block to be the same as an adjacent block, as long as it can find an adjacent block within the chunk boundary that doesn't also have it's own mogrification. Failing to find such an adjacent block results in air. So if you did target lava (not sure if you can target fluids) but left out the result, the blocks would match any surrounding stone/ore. Mostly I added that so ore could be removed and replaced by whatever material that ore is found in. For lava, if it were possible, it might significantly slow down world gen. Hard to say without testing. Such a change would probably also prevent the nether from being able to successfully complete loading just from being too slow. Or maybe the slowness isn't as bad as that. It's been a while since I had added that part and had forgotten all about that feature.

MSandro commented 4 months ago

Thanks for the feedback, I didn't know you could set multiple results. The feature to be able to leave out the result sounds usefull as well. Thanks.

D0CTOR-ZED commented 3 months ago

Implemented dimension-specific transmogrifications with the release of version 0.2 (uploaded, currently pending approval). I'm going to hold off on adding a Y-level condition, at least for now. Mostly because I have another project to work on. It shouldn't be difficult to implement, so if requested again I would most likely implement it at a later date.