-
Notifications
You must be signed in to change notification settings - Fork 9
Custom Mob Effects
To customize the properties of a mob effect you are adding to a biome, you must create a new mob effect object. This is done similarly to block, block replacement, and biome objects using the forMobEffect
command:
effect = forMobEffect("minecraft:strength")
This command takes one argument which is the resource location of the mob effect. You can find a list of them here. From here you can customize the the various properties of this effect with the set
command
-
"amplifier" - Sets the level of the potion effect. 0 corresponds to level one, 1 to level two and so on. Takes an integer argument defaulting to 0.
-
"duration" - The duration of the applied effect in ticks. There are 20 ticks in a second (for a server running at full speed). Takes an integer argument defaulting to 200.
-
"interval" - The interval, in ticks, after which the effect is reapplied. You can use this to make the effect continuous or intermittent. For example, if the duration is 100 ticks, you can set the interval to 98 ticks so that the effect is reapplied before the previous one expires. Takes an integer argument defaulting to 198.
-
"chance" - The random chance that the effect is actually applied after the interval. This can be used to make the effect appear more random and not just on a fixed timer. Takes a float argument between 0 and 1 defaulting to 1.
-
"visibleParticles" - If the particles from the effect should be visible. Takes a boolean argument defaulting to false.
-
"showIcon" - If the icon for the mob effect should be displayed on the player HUD. Takes a boolean argument defaulting to true.
Example: This applies strength II for 5 seconds every 10 seconds (with a 1/2 chance of actually applying).
strength = forMobEffect("minecraft:strength")
strength.set("amplifier", 1)
strength.set("duration", 100)
strength.set("interval", 200)
strength.set("chance", 0.5)
strength.set("visibleParticles", true)
plains = forBiomes("minecraft:plains")
plains.addMobEffect("minecraft:player", strength)
BiomeTweaker has been updated to 1.18. Please see the links below. Pages for previous versions can be found above.