#Making mobs spawn in a dimension

1 messages · Page 1 of 1 (latest)

rain axle
#

Hey! I am making a Doctor Who themed modpack and I've been using datapacks to fix compatibility. Let's assume I have a mod that adds the planet Gallifrey as a custom dimension, and the Doctor Who Regeneration mod which alongside other things adds some Time Lord mobs. Is there a way for me to spawn the said mobs in the biome of the custom dimension?

spare crow
#

yes you have to add the mob to the spawn definitions of all biomes in your dimension

rain axle
#

oh it's a dimension from another existing mod

spare crow
#

ooh ok yea that's fine. You can just replace the biome files of said dimension with your own datapack. Have you ever made a datapack before?

rain axle
#

yeah, mostly recipes

#

so I'm guessing I need to make a json file with the same content as what's in the mod

#

and add mobs spawning?

spare crow
#

indeed

#

you should put that file in the same namespace and subfolders and give it the same name

#

now you just need to know the original files

rain axle
#

I unpacked the jar file with winrar lol

spare crow
#

that's exactly what I was suggesting

#

:P

rain axle
#

really useful for learning how to make recipes

spare crow
#

indeed

rain axle
#

assuming I'd be adding mobs to the wild endevour and dry lands biomes, what should I do?

#

Also hoping i structured it correctly lol

spare crow
#

if you want the mob to spawn in the whole dimension you should add it to all the biomes in that dimension
biomes are located under data/<namespace>/worldgen/biome
-# depending a little on the minecraft version you use

rain axle
#

ohh

#

1.20.1

#

probably should've mentioned that

spare crow
rain axle
#

yeah makes sense

#

I'm like REALLY new to this lol started yesterday

spare crow
#

Yea no problem, we all once started there and you're already doing a really good job

rain axle
#

oh I see the section where I need to put the mob type for ambient spawning

#

what is the weight parameter?

spare crow
# rain axle what is the weight parameter?

once it tries to spawn a mob it looks for all mobs in it's category. The weight value determines what chance that specific mob has to be selected. You can calculate the chance in percentage using current_mob_weight / sum_of_all_weight_values_in_it's_category * 100

rain axle
#

so assuming I'd want the Time Lord Guard to spawn more often I'd need it to have a higher weight parameter than a Council Member, right?

spare crow
#

exactly

#

higher weight = more likely to spawn but with the side effect that other all the rest will spawn less likely

rain axle
#

me casually forgetting i genuienly have VSC installed and for some reasong using notepad for like 10 minutes 😭

rain axle
#

@spare crow I added a piece of code to the datapack to make the mob spawn and it just straight up makes the entire world lag out when stepping into the dimension

#

like the ms ticks just stops in place

#

also I can't see any of the mobs actually spawning :c

#

I think this is like really bad? lol

#

and it crashes when exiting btw

spare crow
#

uugh maybe it's spawning way to many mobs?

#

try decreasing the weight value

#

Otherwise it's probably an issue with the mod

rain axle
#

ughhh

#

it's so weird

spare crow
#

anything in your logs?

rain axle
#

I'm going to be honest

#

I have no idea how to read through logs lol

rain axle
#

I made it work by tying the spawning to a structure instead

spare crow
# rain axle I have no idea how to read through logs lol

Well that's the fun part, 80% of what's in the log is actually completely useless and unreadable since minecraft's code is obfuscated (will change soon). What you're basically looking for are keywords that give tips on what's happening