Skip to content
pWn3d1337 edited this page Mar 7, 2019 · 4 revisions

Allows to add Entity spawn entries and remove them from crafttweaker.

Requires Crafttweaker obviously.

General Syntax: spawntabletweaker.addSpawn("modid:registryname", weight(int), min mobs (int), maximum mobs (int), CREATURE_TYPE, [biome names Array]);

registryName is the entity registry name as string, for example: "minecraft:zombie_pigman" or "techguns:supermutantbasic"

weight is the spawn weight of the entity,

min and max: mobs can spawn in groups and this defines the min and max size of a group, 1 and 1 means exactly one mob will spawn.

type is an enum constant the game uses and has to be passed as string, the following values are allowed: "MONSTER", "CREATURE", "AMBIENT" or "WATER_CREATURE";

Example .zs script:


//spawns zombie pigmans in plains biomes
spawntabletweaker.addSpawn("minecraft:zombie_pigman", 20, 1, 1, "MONSTER", ["minecraft:plains"]);

//adds iron golem spawns to all biomes without the biome dictionary tags "nether" and "end"
spawntabletweaker.addSpawnTagsBlacklist("minecraft:villager_golem", 20, 1, 1, "MONSTER", ["NETHER","END"]);

//remove sheeps from the plains biome
spawntabletweaker.removeSpawn("minecraft:sheep", "CREATURE", ["minecraft:plains"]);

//remove enderman from ALL biomes
spawntabletweaker.removeSpawn("minecraft:enderman", "MONSTER");

//add modded npcs to spawn in all biomes with tag "END"
spawntabletweaker.addSpawnTagsWhitelist("techguns:supermutantbasic", 5, 1, 1, "MONSTER", ["END"]);
Clone this wiki locally
You can’t perform that action at this time.