AtomicStryker's Infernal Mobs

AtomicStryker's Infernal Mobs

34M Downloads

[1.12.2] Template Ruins not carrying over Spawner NBT Data

akisephila opened this issue ยท 4 comments

commented

Attempting to create a custom dungeon. Issue is, when I attempt to generate the structure I built, all spawners disregard their NBT Data and become Pig Spawners. Chests with items in them are fine, so I don't know why it's happening specifically just with spawners.

commented

What does the template rule say in the resulting file?
Logfiles when parsing your structure?
I don't generally support 1.12 anymore

commented

I don't know anything about template rules, that wasn't included in the tutorial video. The file is written as follows:

``# Created by Ruins mod version 17.2 Ingame Parser

authoring Player: deadlyAdder_

TEMPLATE PARAMETER SETTINGS:

criterion expression specifying mod ids required to load template

may include plus (AND), minus (AND NOT), comma (OR), and parentheses

all required mods listed must be present; no prohibited mods can be

requiredMods=

likelihood this template will be chosen relative to all others

e.g., a weight=6 template is chosen 3X as often as one with weight=2

weight=1

list of dimensions in which this template may spawn, even if generic

one or more dimension names, separated by commas (blank = all)

dimensionsToSpawnIn=

list of other biomes in which this template may spawn

biome corresponding to directory is always assumed, listed or not

generic templates should leave this list empty

biomesToSpawnIn=

criterion expression specifying types of biome where template spawns

this is in addition to those explicitly listed as biomesToSpawnIn

generic templates should leave this list empty

biomeTypesToSpawnIn=

list of biomes in which this template may not spawn

takes precedence over biomeTypesToSpawnIn, but NOT biomesToSpawnIn

should be empty if biomeTypesToSpawnIn is empty

biomesToNotSpawnIn=

depth template is pushed down into the surface when built

offset is min/max range of random additional bury depth

embed_into_distance=0
random_height_offset=0,0

whitelist/blacklist of block types on which template may be built

specify one, not both; leave the other empty (both empty = allow all)

acceptable_target_blocks=
unacceptable_target_blocks=flowing_water,water,flowing_lava,lava

size of template (#layers, #rows per layer, #blocks per row)

dimensions=5,7,12

max number of missing blocks allowed in surface beneath template

allowable_overhang=0

depth/height limit affected by terrain leveling

also maximum bumpiness tolerated in surface beneath template

max_leveling=2

padding applied to all sides of template horizontal footprint

expands area affected by terrain leveling (-1 = no leveling)

leveling_buffer=0

do not rotate template randomly when built (1 = no rotation)

preventRotation=0

treat water/lava blocks as air and protect them from rule0 (1 = yes)

preserve_water=0
preserve_lava=0

minimum distance this template must have from instances of itself

uniqueMinDistance=0

min/max distances this template can be from world spawn (0 = no limit)

only applies to overworld--i.e., dimension 0

spawnMinDistance=0
spawnMaxDistance=0

other template built nearby whenever this one is

syntax: ;;;[;]

may be used more than once to specify multiple neighbors

adjoining_template=

rule1=0,100,minecraft:stone-0
rule2=0,100,minecraft:mossy_cobblestone-0
rule3=0,100,minecraft:cobblestone-0
rule4=0,100,minecraft:stonebrick-2
rule5=0,100,minecraft:stonebrick-1
rule6=0,100,minecraft:stonebrick-0
rule7=0,100,minecraft:stonebrick-3
rule8=0,100,minecraft:mob_spawner-0
rule9=0,100,IInventory;minecraft:chest;minestuckuniverse:dungeon_key#1#0#13-3
rule10=0,100,minestuck:frog_statue_replica-2

layer
1,1,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1
1,1,1,1,1,1,1,1,1,1,1,1
endlayer

layer
3,4,6,2,5,2,6,5,4,2,3,2
4,0,0,0,0,4,0,0,0,0,0,4
3,0,6,3,0,3,0,0,0,0,0,4
4,0,5,6,0,0,0,0,8,0,7,2
5,0,6,5,6,2,0,0,0,0,0,5
0,0,2,3,6,5,0,0,0,0,0,2
4,6,6,2,4,6,4,3,6,2,5,4
endlayer

layer
6,5,3,6,3,6,5,6,2,6,3,3
3,0,0,0,0,3,0,0,0,0,0,5
6,0,3,3,0,2,0,0,0,0,0,2
4,0,3,6,0,0,0,0,0,0,9,5
3,0,3,3,3,6,0,0,0,0,0,3
0,0,5,6,4,4,0,0,0,0,0,3
3,4,5,4,4,3,2,3,4,6,2,5
endlayer

layer
3,4,2,3,3,3,6,6,3,6,4,4
6,6,2,3,5,5,0,0,0,0,0,4
3,2,4,5,5,4,0,0,0,0,0,4
2,2,2,2,4,4,0,0,0,0,0,3
5,5,4,3,3,3,0,0,0,0,0,3
5,2,3,3,2,3,0,0,0,0,0,2
6,3,2,2,3,4,4,4,5,4,4,3
endlayer

layer
0,0,0,0,0,2,4,4,3,5,3,4
0,0,0,0,0,2,3,3,4,2,3,2
0,0,0,0,0,4,2,4,3,5,3,3
0,10,0,0,0,3,5,4,3,6,2,4
0,0,0,0,0,2,3,5,3,3,2,2
0,0,0,0,0,4,3,4,4,3,4,3
0,0,0,0,0,5,3,2,4,4,4,2
endlayer``

commented

Ah, the halcyon days of 1.12. Prior to that, block entities (or, as they were called back then, tile entities--still often used in the code) were exceptional things, and Ruins was designed to recognize the few blocks using them and handle those special cases explicitly. By 1.12, though, block entities were in full swing, and /parseruin struggled to keep up with all the changes.

The good news is there's a pretty simple workaround. Ruins has a bypass mechanism with which you can skip the problematic special mob spawner block handling and use generic block entity parsing. Edit your config/ruins.txt config file to replace the line...
teblocks=
...with...
teblocks=mob_spawner
...and reparse your ruin to create a new template file. Note this change only applies to brand new worlds you create after the edit. If you want it to apply to an already-existing world (and you probably do--presumably, the world containing the structure you're trying to capture), you'll have to also manually delete the ruins.txt file in the world's save folder.

If all goes well, that should fix the problem you're seeing. The Ruins config change is only necessary for the world in which you're using the /parseruin command; once the template file is created, any world can use it, even without a modified ruins.txt file.

commented

I managed to find a separate workaround involving command blocks that replace themselves with the spawners desired when the structure spawns in, but this information is very helpful for future reference. Thanks a ton!