Greymerk / minecraft-roguelike

This is a mod for minecraft that adds randomly generated dungeon complexes.
GNU General Public License v3.0
129 stars 53 forks source link

Custom spawner not working in Minecraft 1.12.2 #192

Closed RisingInIris2017 closed 4 months ago

RisingInIris2017 commented 5 years ago

Minecraft Version: 1.12.2 RD Version: 1.12.2-1.8.0 (latest) Forge Version: 1.12.2 - 14.23.5.2838 For some reason, I need to override, or simply disable the Blaze spawner. I tried to copy this json: https://github.com/Greymerk/rd-settings/blob/master/spawners.json then modified it, and get this:https://gist.github.com/RisingInIris2017/70635177583f0008911bfb369bd1c93e

Then put this file into config\roguelike_dungeons\settings, restarted the game and nothing happened, Blaze spawners still spawned Blazes.

I also tried this: https://github.com/Greymerk/minecraft-roguelike/issues/104 But Blaze spawner didn't spawned Wither, maybe it is outdated.

How can I disable or modify RD's Blaze spawners? Thanks in advance!

AnnaErisian commented 4 years ago

Just got through this, I think I understand it enough to help and explain.

I'm judging by your post that you only took that JSON file. What that does it make a disjointed spawner setting "demo:spawners" This won't do anything, because nothing references it. The rest of the config there would cause it to work only in the plains biome, because the rest of the config builds a plains-like dungeon, then puts it in Plains-type biomes. This is done in https://github.com/Greymerk/rd-settings/blob/master/main.json The condition is what places it in plains, and exclusive means (as far as I can tell) that it's the only type that spawns when the condition is met, effectively overriding the base dungeons if you set the conditions right.

I made a (larger, but w/e) spawners json file, then referenced it in a .json for each type, basically overriding the defaults with a version that uses my spawners. I've left the forest example below. The prefix is drm3 because I stole the config from Roguelike Adventures and Dungeons, but it was very similar to the demo and as far as I could tell would have exhibited this problem in non-plains biomes. Just use your own value for name.

Make a file like this for each 'type' of dungeon - the command is IIRC roguelike settings list, then pick out all the biome ones, like ice, mesa, etc. Replace 'forest' with the name of the builtin. Once you're done, run roguelike settings reload to check your JSON, or use an online tool like https://jsonformatter.org/


{
    "name" : "drm3:forest",
    "exclusive" : true,
    "criteria" : {
        "biomeTypes" : [
            "FOREST"
        ]
    },
    "inherit" : [
        "drm3:spawners",
        "builtin:forest"
    ]
}

Some biomes may have 'wrong' dungeon themes, so play with weights if you want to alter that. For example, I want almost exclusively mesa-style dungeons if one happens to spawn in a mesa, which is also Sandy (Except mutated plateau F, but they're even rarer), so my mesa's condition is:

"criteria" : {
        "weight" : 1000,
        "biomeTypes" : [
            "MESA"
        ]
    },

Biome types are here, vanilla biomes at the bottom:
https://github.com/MinecraftForge/MinecraftForge/blob/1.11.x/src/main/java/net/minecraftforge/common/BiomeDictionary.java#L44-L90

Good luck!