JAS Part 2 - ProjectZulu/JustAnotherSpawner GitHub Wiki
The default folder is where we find the CreatureType.CFG, EH, LH, and other goodies.
- Creature Types
- Entity Handler
- BIOME groups
- Living groups
- World Global Properties
- Goto Walkthrough Part 2
Creature types are "groups" of creatures that have a similar function or attribute. For example, the "Ambient" creature type has creatures that basically don't interfere with game play. They don't attack or run, they don't provide food, etc. This is not ALWAYS true as Modders can make mobs as they wish, but you get the idea.
There are several groups that are of course standard with Minecraft. Since you are using JAS we are of course assuming that a VANILLA (unchanged, unmodified, untouched) Minecraft is not what your looking for. Those, like myself, use so many mods we find it makes more sense to add custom groups to satisfy our needs. Yes, you can make your own groups, you can even get rid of the standard groups, which I highly recommend if you are starting out especially as it allows you to have a clean spawning slate to work with without removing mobs (we will discuss this at length later).
TIP: Changing the default groups can be advantageous, especially if you are using a lot of mob mods or just new to JAS. by setting the "Spawn Cap" to 1, and creating a new group with the spawn cap you want (like 70) you will have almost nothing spawning. All the mobs will default to the default groups, so setting those to spawn cap 1 SHOULD cause only a few mobs to spawn and then you can determine if you have a mod conflict.
"TYPE_NAME": { <---this is the name of the group
"Spawn Rate": 1,
"Spawn Cap": 15,
"Chunk Spawn Chance": 0.0,
"Spawn Medium": "air",
"Iterations Per Chunk": 3,
"Iterations Per Pack": 4,
"Spawn Tag": "!solidside(1,{0,0,0},{0,-1,0})||liquid({0,0,0},{0,0,0})||normal({0,0,0},{0,0,0})||normal({0,0,0},{0,1,0})||!opaque({0,0,0},{0,-1,0})",
"Default Biome Cap": -1,
"Biome Caps": {}
},
"Spawn Rate": 1, // Integer that determines how often all entities belonging to this GROUP will spawn in GAME ticks
"Spawn Cap": 15, // Integer that determines the max amount of this GROUP that can spawn passively
"Chunk Spawn Chance": 0.0, // 0 = never and 1 = always try to spawn entity on new chunk being generated.
"Spawn Medium": "air", // The material the spawn block must be for this entity to spawn
"Iterations Per Chunk": 3, // Integer that determines number of spawn attempts that will be made to spawn in new chunks
"Iterations Per Pack": 4, // Integer that determines number of spawn attempts that will be made to spawn in group
"Spawn Tag": "!solidside(1,{0,0,0},{0,-1,0})||liquid({0,0,0},{0,0,0})||normal({0,0,0},{0,0,0})||normal({0,0,0},{0,1,0})||!opaque({0,0,0},{0,-1,0})", // see spawn tags
"Default Biome Cap": -1, // Default biome cap, -1 being non existent. A Biomecap is a cap over a 3x3 chunk square
"Biome Caps": {} // Set biome cap for specific biomes
Don't worry if any of that was confusing, we will keep breaking it down further as we move along.
In a previous section we covered the SaveConfigGson.cfg, file and in this file there is a line. "Use_Universal_Entity_CFG": false, <---setting this to false causes each mod with mobs to create its own separate cfg file in the EntityHandler folder. This means that animals+ will have its own cfg for its own mobs, BOP will have its own.
if "Use_Universal_Entity_CFG": True, <---setting this to true causes ALL mods with mods to be put in a singel cfg file called Universal.cfg. there is NO difference in the function of the file in either format. I personally prefer the latter as it makes searching easier.
EntityHandler's hold spawn data for each entity, including whether JAS should take control or if it should spawn depending on the mod it belongs to. E.g. some mods have their own spawning system built in and that means they will handle their own mobs unless you tell JAS to do it. For an EntityHandler to have JAS handle the entity (hence entityhandler) the 'shouldSpawn' field must be true and the entityType must not be set to a valid group like MONSTER. Some mods also require you to use a NBT tag for some or all of the mobs tow correctly be handled in JAS (like MOC), these specific issues will be discussed and why.
Each group as we see, has its own settings for CAP, where the entities can spawn, etc. If you put an entity in multiple groups it will become subject to two different group requirements and could cause issues.
It is of course possible for and entity to belong to more than one group. One must understand the purpose of both the groups and entities relationship.
A) Groups for a common set of rules and conditions for ALL entities that belong to that group and the group settings tell the group what to do to the entity is has named.
B) Entities that belong to a group are subject to the conditions and rules that affect the group but entities are NEVER "members" of a group. Meaning the group simple controls ALL mobs of that same title, its not like a certain number are "members" of a group and others are not even though they are the same mob.
e.g. If a skeleton belongs to 2 groups, BADGUYS and UNDEAD the skeleton is subject to the conditions and rules of both groups at the same time so if BADGUYS has a setting that says there can only be 2 skeletons in existence and UNDEAD says there can be 200 then if UNDEAD calls skeletons first it will allow 200 and then when BADGUYS calls it will then call to destroy 198 so there are 2 left. If the groups run in reverse order there will be 2 called for BADGUYS, then UNDEAD will call 198 more.
If there are other requirements to the group like spawn medium, etc it could crash your world.
That being said, we will show you how to take a creature, change its name so it can belong to multiple groups but JAS treats each one as a different entity... Yeah, you can do that with JAS.
Most of these fields are absent and must be added by the user and populated with data to use.
"Creeper": {
"Type-Enabled": "MONSTER-false",
"Spawn Operand": "OR",
"Spawn Tag": "",
"Despawn Tags": "",
"PostSpawn Tags": "",
"Entity Cap": "",
"Min Despawn Range": 60,
"Max Despawn Range": 60,
"Despawn Age": 600,
"Despawn Rate": 30,
"Entity Cap": 20,
"Contents": [
"Creeper"
],
},
"Creeper" <--the name of the entity we are working with
"Type-Enabled": "MONSTER-false",<--- TRUE means JAS WILL take control. MONSTER is the group and false says don't take control so whatever normally controls it (vanilla spawner in this case) that will spawn it. This in turn can affect caps JAS is controlling.
Spawn Operand OR <---- if your doing OR commands like spawn here OR spawn if this happens you need OR. Also, if you are putting spawn commands in SpawnListEntry with OR, then OR here as well.
Spawn Tag <---Sets conditions for spawning the entity like what block should be spawned on, how much light, should there be visible sky, etc.
Despawn Tags <---Sets conditions for despawning like if light is so high or low, if a certain time of day has occurred, etc. If you are using only instant despawn tags then you must also have despawn even if it is empty. The difference is that despawn puts the entity on a despawn list that may not occur for a while and there is still a chance that the entity will not despawn right away (persistence)
PostSpawn Tags<---Some entities can't be controlled until after they spawn with NBT commands. An example would be many MOC mobs. Keep in mind that even though JAS is doing all the spawning for all mobs, JAS is NOT rewriting the code for other mods so whatever they may have for spawn conditions, etc may occur regardless of JAS. In the case of some MOC mobs this is what occurs and this allows JAS to still control the mob after it has spawned but BEFORE it has actually been placed in the world..
Entity Cap <---Max number of this entity PERIOD, no matter how many chunks are spawned.
Min Despawn Range <--- Minimum range before being eligible for despawning.
Max Despawn Range <--- Range this entity should instantly despawn at.
Despawn Age<--- Minimum age before being eligible for despawning.
Despawn Rate<---- Rate at which this entity should despawn once eligible.
They control the biome speciifc spawnlist settings such as spawn weight, and min and max chunks spawns. The configuration files are found under JustAnotherSpawner\WorldSettings\<saveName>\SpawnListEntries\
usually divided by modID.
"SPAWN_LIST_ENTRIES": {
"Aether": {
"AMBIENT": {
"Bat": {
"Weight-PassivePackMax-ChunkPackMin-ChunkPackMax":0-4-0-4", (see below)
"Spawn Operand": "OR", // Whether SpawnListEntry SpawnTags is && or || with EntityHandler SpawnTags.
"Spawn Tag": "", <---Sets conditions for spawning the entity like how much light is needed.
"PostSpawn Tags": "" <---Some entities can't be controlled until after they spawned but before they have been placed.
}
},
}
}
Note: If you are wanting to make set conditions to a mob for a specific biome, this is where you would do it.
Structure spawns are configured via the StructureSpawns.cfg configuration file. Each structure has its own spawnlist of entities. They are edited in the same manner as biome spawn list entries. If a structure spawnlist is empty it defaults to the biome spawn list.
##BIOME Groups
Every Biome is listed here, or it should be anyway. Any mod that has a Biome will have that Biome listed here. There are three sections to this:
- Biome Mappings which is the list of all biomes currently recognized by Minecraft given the mods you are running. This will show the entire biome as recognized by Minecraft.
"biomesoplenty.common.biome.overridden.BiomeGenBOPForest.ForestHills": "ForestHills",
Reads as ForestHills from the Biomes O Plenty mod.
2)"Attribute Groups" which is sets of biomes in groups much like creatypes but here, the group name and the biomes belonging to that group are listed together. You can you the group name in place of the individual biome to set conditions for all the biomes in the group.
3)"Biome Groups" which is also a set of biomes listed in a group format. when referencing the groups from an attribute group vs a Biome group you use a different call _____________ . Also, only Attribute Groups is prepopulated with groups. for now, we need understand that using groups to reference multiple biomes and work with groups of entities will be essential to creating a solid Minecraft experience. As such, it gets lots of detail later.
Note: using groups is a great way to assign mobs to multiple biomes easily and makes for adding more later easier as well. for e.g. a bimoe group of "HOTandHOSTILE" could contain 10 biomes and "HOTandCRAZY" could contain 10 biomes, 3 of which are the same as HOTandHOSTILE, thus allowing the same mobs to spawn in the same biomes but have different conditions, etc.
WARNING: don't confuse the aforementioned with group caps, creating different conditions for the same biome and having the same mob have different conditions is not saying your putting a mob in different groups where the tags can conflict.
##LIVING Groups
Much like BIOME Groups, LIVING Groups is a list of every entity recognized by JAS. This can be an essential list to understand as it should be one of the first places to look if an entity is spawning when you think it should not. Does JAS even have control ?
It also reads like the BIOME Groups section Biome Mappings. i.e. "CreeperDespair": "MonsterGirlMod.CreeperDespair"
is the MonsterGirl mod for creeper called CreeperDespair.
There is also a little known section at the very end called "AttributeGroups" and it has similiar usage as the Biome Attribute groups. It allows you to group entities and set attributes for them, even if those entities belong to different "spawning" groups. In this fashion, a hostile and an ambient mob could share similar attributes. of course I'm just thinking things like what makes them instant despawn, but then again I'm not the creative one around here.
##World Global Properties
Properties of a global nature, pretty straight forward. this section outlines the minimum distance a mob can be before it is up to despawn, how far before it instant despawns, etc.
Note: yes, you guessed it. a mob can have individual settings for despawn etc assigned to them.
"Min_Despawn_Distance": 24,
"Instant_Despawn_Distance": 64,
"Min_Despawn_Time": 300
"Min_Despawn_Distance": 24, <----Just as it reads, what is the minimum distance from the player an entity can be before it is eligible to be despawned? Remember, between 16 - 32 blocks away mobs spawn randomly and from 32 - 128 they spawn but don't move yet they still take up space on the spawn list and consume resources.
"Instant_Despawn_Distance": 64, <-----What is the distance at which an entity can despawn INSTANTLY ? yeah, there is a tag for instant despawn, but it is only effective if the entity also has a regular despawn tag as well. don't worry we will see all this in action. "Min_Despawn_Time": 300 <----Finally, what is the minimum amount of time before an entity is able to get on the despawn list? There are factors to this as well, the entity or group can have separate despawn times, or there can be other settings or factors that can be set to alter or negate this.