XCompWiz / Mystcraft-Issues

Issue tracked and localization repo for the MInecraft mod Mystcraft
xcompwiz.com
31 stars 22 forks source link

Mystcraft ages not using Worley's Caves, a custom cave generator #309

Closed TheDeviantCrafter closed 4 years ago

TheDeviantCrafter commented 6 years ago

I created a Mystcraft age with the following pages: -Caves -Normal lighting -Normal weather -Stone block -Water block -Native biome distribution -Standard world

This created an age with terrain very similar to the vanilla overworld. It also has caves.

Here's a screenshot of the caves in the Mystcraft age, taken in spectator mode:

2018-08-29_21 43 57

Here is a screenshot of the overworld:

2018-08-29_21 44 54

TheDeviantCrafter commented 6 years ago

Issue on Worley's Caves github: https://github.com/superfluke/WorleyCaves/issues/5

TheFloydman commented 6 years ago

I wouldn't call this an issue. Maybe you want to suggest that Mystcraft support Worley's Caves? Do you want vanilla cave generation to be overridden if Worley's Caves is present?

(On a side note, your grammar is a bit off. Stone and water blocks are modifiers for Standard World. Native Biome Generation should be placed before Stone Block or after Standard World. Otherwise Mystcraft could potentially generate another world type to use with Stone and Water.

TheDeviantCrafter commented 6 years ago

Keybounce mentioned this on Discord:

Yea, the "caves" symbol uses code that Xcw included that as I understand it is a copy of the vanilla cave code. There is no way to use the "overworld's cave code" because each instance of the cave symbol has a unique seed. If you write "caves, caves" then you want twice as many caves, not just the same set of air placed twice. If you want to use a custom cave generator, then you need for it to be able to use a seed given as an argument, rather than just grabbing the world's seed, and you need code to call it multiple times with different seeds

TheDeviantCrafter commented 6 years ago

Yes, I'd like Worley's Caves to overwrite default cave generation. Alternatively, creating an "interconnected caves" page that would generate caves from that mod could work. It wouldn't even need to support having more than one cave page as mentioned above, although it would be a nice plus.

TheDeviantCrafter commented 6 years ago

From XCompWiz on Discord:

"Add-on/mod interaction could be arranged for the caves, but Mystcraft can't do it out of the box."

"Easiest would be the mod doing the generation registering a Mystcraft symbol for that generation mechanic. Otherwise, they could offer the generation via some hook/event Mystcraft could detect and create a symbol for."

TheDeviantCrafter commented 4 years ago

Are there examples for the symbol creation API anywhere?

Veovis-Muaddib commented 4 years ago

Sorry I'm a bit late responding to this, but @TheFloydman and I are working on a shared library for our own addons. It's heavily work-in-progress so use at your own risk, but it should make it much easier to get off the ground with an addon.

If adding a symbol with Myst Library, you would want to implement this behavior interface https://gitlab.com/mystcraft/mystlibrary/blob/master/src/main/java/mystlibrary/symbol/behavior/IAgeSymbolBehavior.java

Here's an example for color modifiers: https://gitlab.com/mystcraft/mystlibrary/blob/master/src/main/java/mystlibrary/symbol/behavior/ColorBehavior.java

Then you register that behavior: https://gitlab.com/mystcraft/mystlibrary/blob/master/src/main/java/mystlibrary/event/EventHandler.java#L24

Once your behavior is registered you can simply package your symbols as JSON files in your assets folder, something like this:

{
    "modid": "mystlibrary",
    "identifier": "block_bedrock",
    "poem": ["Transform", "Constraint", "Vanilla", "BLOCK_NAME"],
    "card_rank": 6,
    "grammar_rules": [{
        "parent": "mystcraft:BlockStructure",
        "rank": 5
    }, {
        "parent": "mystcraft:BlockTerrain",
        "rank": 5
    }, {
        "parent": "mystcraft:BlockSolid",
        "rank": 5
    }],
    "localization": {
        "unlocal_name": "tile.bedrock.name"
    },
    "behavior": {
        "modid": "mystlibrary",
        "identifier": "block",
        "blockid": "minecraft:bedrock",
        "instability_base": -1,
        "instability_exposed": -1
    }
}

If you just want an idea on where to start with implementing your own symbols, you can look at how we did it here: https://gitlab.com/mystcraft/mystlibrary/blob/master/src/main/java/mystlibrary/symbol/AgeSymbol.java

I know you're on the Discord so feel free to come chat in #general-development or #lib-myst-library if you have questions.

XCompWiz commented 4 years ago

I'd also recommend that any special cave generation or other interesting generation variations be made as their own symbols. :) I'll close this, as it's not an issue for me to fix so much as an add-on request.