orphu / mcdungeon

A procedural dungeon generator for Minecraft
Other
84 stars 18 forks source link

Is the 0.14 release for 1.8 compatible with structure-generating mods (e.g. Ruins)? #422

Closed ehx-v1 closed 6 years ago

ehx-v1 commented 7 years ago

I'm heavily using mods for dungeon brawling setups. Among them are primarily ones that create new dungeons and similar gimmicks, like Lucky Blocks or Ruins. (Some of them have only been updated as far as 1.8, which is the reason why I still use that.) Now I wanted to add MCDungeon scripts to the mix, however I fear that, while they are confirmed to take into account Vanilla structures, mod structures might be straight-up ignored. My greatest fear is related to Ruins, which generates just piles of command blocks that place structures as the player approaches them, so there's no indication that those are generated structures and not just terrain. How does the structure identification work? Can I safely assume it covers mod structures and even such weird structure placement setups as Ruins? (I mean, like, to cover Ruins it would basically need to cover hand-placed structures as well!)

orphu commented 7 years ago

Structure identification just excludes chunks that contain blocks that do not appear naturally. There is a short list of block IDs that are considered unnatural in the config and it can be customized.

From the config:

# Player structure detection
# This is a list of blocks that are considered to be player structures.
# Any chunks that contain these types of blocks will be excluded from the 
# location algorithm. By default, these are essentially light sources. The 
# thought being that any structures you care about will be lit. 
#
# This list will shortcut at the first match, (ie: once a block matches, we
# won't bother checking the rest) so for maximum efficiency, order this by 
# most common blocks first. The more blocks you list here the slower the 
# initial terrain pass will be. 
#
# These names should match the names in materials.cfg. To disable this
# feature, just leave this blank. 
#
# NOTE: If you change this, you probably want to delete the chunk cache. 
# delete the "mcdungeon_cache" in your world folder if it exists.
structures: Torch, Glass, Wooden Door, Redstone Torch On, Redstone Torch Off, Glowstone, Sea Lantern, Nether Portal, Powered Rail, Spruce Door, Birch Door, Jungle Door, Acacia Door, Dark Oak Door
JiFish commented 7 years ago

In order to add materials to the list, you'll have to add them to materials.cfg, which will require knowing the mod's block's internal ID number. I'm actually not sure how best to figure this out - and if this number is consistent between all people using that mod. If you find answers for those questions, please post them here for the next guy!

ehx-v1 commented 6 years ago

Thanks for the replies! Most structure mods I use luckily use Vanilla blocks only (in fact, all of them except Lucky Blocks and GraveStone), and if chests are in the list it most probably should be fine, but I'll add cobblestone and stone bricks just to be safe. As of the ID problem, I'll try out if it works with named IDs (e.g. minecraft:cobblestone or lucky:lucky_block). If yes, then fine, because the named ID is shown when looking at the block with debug data (F3) active. Otherwise, NEI lists the numeric ID besides the block/item name.

JiFish commented 6 years ago

You may want to add the structure block itself to the list in addition. I'm not sure how the mechanics of structure blocks precisely work, but that should do the job. Just make sure any blocks you are specifying also exist in materials.cfg.

ehx-v1 commented 6 years ago

You probably mean the command block. Structure blocks were introduced in 1.10, and the topic is about 1.8. In fact, the command blocks (with testruin commands added by the mod) are executed as soon as the player is within render distance, so it would make little sense checking for them as in the generated area they should all be resolved. They would rather be relevant if unloaded chunks were populated as well. But I recently realized that's not how MCDungeon works.

JiFish commented 6 years ago

and the topic is about 1.8

My mistake! I lost track.

But I recently realized that's not how MCDungeon works.

Yup, so long as the blocks generated by the command block are on the list you're all good. :)