Skip to content
Kai Jiang edited this page Jan 11, 2017 · 26 revisions

Examples

First, let me show some examples for you:

# Stop mob spawning on trees except for spiders.
woodlogs & !mob:spider

# Greatly reduce the chance of spawning Enderman in "The End" dimension.
dim:TheEnd & chance:0.95

# Hostile mobs will not spawn in your wooden house anymore.
material:wood & mobtype:monster

# Peaceful plains. Enjoy!
biome: plains

# Hellish desert. Becareful!
@biometype:SANDY, mob:Ghast, mob:PigZombie, weight:300

Available Tags in "blacklistRules"

# Tag for wood logs.
"woodlogs"

# Tag for the mob spawn position (feet position),
# all integers in the config file should not exceed 9 digits.
"position" ":" range "," range "," range
range = "*" | integer | integer "-" integer

# Tag for the spawn block, damageValue is a range type.
"block" ":" modID ":" blockName [ ":" damageValue ]

# Tag for the material of spawn block.
# For example, "material:WOOD" includes wood logs / planks / stairs, etc.
"material" ":" blockMaterialName

# Tag for mob, mobName is a case insensitive string removing space characters.
# mobClassName is name of Java class file.
# Example: "mob:zombie | mob:EntityCreeper".
"mob" ":" (mobName | mobFullName | mobClassName)
mobFullName = modID "." mobName # (for vanilla mobs, mobFullName is just the mobName)

# Tag for mob type
"mobtype" ":" ("monster" | "animal" | "ambient" | "water")

# Tag for dimension, dimensionID is the integer ID of the dimension.
# dimensionName is a case insensitive string removing space characters.
# Example: "dim:theEnd"
"dim" ":" (dimensionID | dimensionName)

# Tag for random chance (for this rule to be considered).
# probability is a real number from 0.0 to 1.0
"chance" ":" probability

# Tag for biome, biomeID is the integer ID of the biome.
# biomeName is a case insensitive string removing space characters.
# Example: "biome:BirchForestM"
"biome" ":" (biomeID | biomeName)

# Tag for biome type. For example, "biometype:SANDY"
"biometype" ":" biometypeName

# Tag for the moon phase, can be a range number from 0 to 7, or a moon phase name.
"moonphase" ":" (moonPhaseName | range)
moonPhaseName = "fullmoon" | "waninggibbous" | "lastquarter" | "waningcrescent"
              | "newmoon" | "waxingcrescent" | "firstquarter" | "waxinggibbous"

# Tag for the game tick in a day, range from 0 to 23999.
"daytime" ":" range

# Tag for the light level, can specify the light type (mixed / sky / block).
"light" ":" range ["," lightType]
lightType = "mixed" | "sky" | "block"

Operators

and = "&" | "&&"
or = "|" | "||"
not = "~" | "!"
parentheses = "(" | ")"

Adding/Overriding Spawning Entries

If the first character of any rule is "@", the rule will be treated as a spawning entry. The format is:

@tag1, tag2, ..., tagN

You can use "biome", "biometype", "mob", "weight", "count" tags in spawning entry. The format of "biome", "biometype", "mob" have been explained before, the others are:

# The weighted chance of this spawning entry being selected
# The weights of zombies / skeletons / creepers / spiders in vanilla are both 100
"weight" ":" integer

# The size of spawning group. In vanilla it is 4-4
"count" ":" range

Using Whitelist

If the first character of any rule is "-", the rule will be treated as a whitelist.

For example, if you put "-block:minecraft:log:0" after "woodlogs", then mobs can spawn on oak logs.

woodlogs
-block:minecraft:log:0

The rules are applied line by line, if there is conflict between blacklist and whitelist, the latter rule will override the former rule.

Q & A

How to decrease the spawn rate for some mobs, while increase the spawn rate for other mobs?

Increase the overall spawn rate (set the extraSpawningTries), then use the black list rule and the "chance" tag to reduce the spawn rate for some mobs.

Can I check whether the syntax of my rules are correct?

Check the console or your game log file, search for the log output tagged with "[nmsot]" or "[nmsot/nmsot]". If there is no warning or error, OK, your black list rules are successfully loaded without syntax error.

Clone this wiki locally
You can’t perform that action at this time.