Fix indentation in mcl_mobs/api.txt

This commit is contained in:
cora 2022-05-21 00:14:42 +02:00
parent 2b63866c14
commit 5dafeaadc6
1 changed files with 439 additions and 437 deletions

View File

@ -44,7 +44,7 @@ functions needed for the mob to work properly which contains the following:
'passive' when true allows animals to defend themselves when hit,
otherwise they amble onwards.
'walk_velocity' is the speed that your mob can walk around.
'run_velocity' is the speed your mob can run with, usually when attacking.
'run_velocity'is the speed your mob can run with, usually when attacking.
'walk_chance' has a 0-100 chance value your mob will walk from standing,
set to 0 for jumping mobs only.
'jump' when true allows your mob to jump updwards.
@ -66,13 +66,13 @@ functions needed for the mob to work properly which contains the following:
walking, 0 to turn off height fear.
'fall_speed' has the maximum speed the mob can fall at, default is -10.
'fall_damage' when true causes falling to inflict damage.
'water_damage' holds the damage per second infliced to mobs when standing in
'water_damage'holds the damage per second infliced to mobs when standing in
water (default: 0).
'lava_damage' holds the damage per second inflicted to mobs when standing
in lava (default: 8).
'fire_damage' holds the damage per second inflicted to mobs when standing
in fire (default: 1).
'light_damage' holds the damage per second inflicted to mobs when it's too
'light_damage'holds the damage per second inflicted to mobs when it's too
bright (above 13 light).
'suffocation' when true causes mobs to suffocate inside solid blocks (2 damage per second).
'floats' when set to 1 mob will float in water, 0 has them sink.
@ -119,7 +119,7 @@ functions needed for the mob to work properly which contains the following:
attacking.
'dogshoot_switch' allows switching between attack types by using timers
(1 for shoot, 2 for dogfight)
'dogshoot_count_max' contains how many seconds before switching from
'dogshoot_count_max'contains how many seconds before switching from
dogfight to shoot.
'dogshoot_count2_max' contains how many seconds before switching from shoot
to dogfight.
@ -136,7 +136,7 @@ functions needed for the mob to work properly which contains the following:
in minetest.conf is not false).
'immune_to' is a table that holds specific damage when being hit by
certain items e.g.
{"default:sword_wood", 0} -- causes no damage.
{"default:sword_wood",0} -- causes no damage.
{"default:gold_lump", -10} -- heals by 10 health points.
{"default:coal_block", 20} -- 20 damage when hit on head with coal blocks.
@ -194,9 +194,10 @@ functions needed for the mob to work properly which contains the following:
'punch2' animations.
'animation' holds a table containing animation names and settings for use with mesh models:
'stand_start' start frame for when mob stands still.
{
'stand_start'start frame for when mob stands still.
'stand_end' end frame of stand animation.
'stand_speed' speed of animation in frames per second.
'stand_speed'speed of animation in frames per second.
'walk_start' when mob is walking around.
'walk_end'
'walk_speed'
@ -206,19 +207,20 @@ functions needed for the mob to work properly which contains the following:
'fly_start' when a mob is flying.
'fly_end'
'fly_speed'
'punch_start' when a mob melee attacks.
'punch_start'when a mob melee attacks.
'punch_end'
'punch_speed'
'punch2_start' alternative melee attack animation.
'punch2_end'
'punch2_speed'
'shoot_start' shooting animation.
'shoot_start'shooting animation.
'shoot_end'
'shoot_speed'
'die_start' death animation
'die_end'
'die_speed'
'die_loop' when set to false stops the animation looping.
}
Using '_loop = false' setting will stop any of the above animations from
looping.
@ -237,7 +239,7 @@ functions needed for the mob to work properly which contains the following:
'rain_damage' damage per second if mob is standing in rain (default: 0)
'sunlight_damage' holds the damage per second inflicted to mobs when they
are in direct sunlight
'spawn_small_alternative': name of a smaller mob to use as replacement if
'spawn_small_alternative' name of a smaller mob to use as replacement if
spawning fails due to space requirements
'glow' same as in entity definition
'child' if true, spawn mob as child
@ -303,7 +305,7 @@ enhance mob functionality and have them do many interesting things:
'on_die' a function that is called when the mob is killed; the
parameters are (self, pos). Return true to skip the builtin
death animation and death effects
'on_rightclick' its same as in minetest.register_entity()
'on_rightclick'its same as in minetest.register_entity()
'on_blast' is called when an explosion happens near mob when using TNT
functions, parameters are (object, damage) and returns
(do_damage, do_knockback, drops)
@ -314,13 +316,13 @@ enhance mob functionality and have them do many interesting things:
'on_breed' called when two similar mobs breed, paramaters are
(parent1, parent2) objects, return false to stop child from
being resized and owner/tamed flags and child textures being
applied. Function itself must spawn new child mob.
applied.Function itself must spawn new child mob.
'on_grown' is called when a child mob has grown up, only paramater is
(self).
'do_punch' called when mob is punched with paramaters (self, hitter,
time_from_last_punch, tool_capabilities, direction), return
false to stop punch damage and knockback from taking place.
'custom_attack' when set this function is called instead of the normal mob
'custom_attack'when set this function is called instead of the normal mob
melee attack, parameters are (self, to_attack).
'on_die' a function that is called when mob is killed (self, pos)
'do_custom' a custom function that is called every tick while mob is
@ -341,9 +343,9 @@ for each mob.
damage at all (cannot exceed self.breath_max). Breath
decreases by 1 each second while in a node with drowning
damage and increases by 1 each second otherwise.
'self.texture_list' contains list of all mob textures
'self.texture_list'contains list of all mob textures
'self.child_texture' contains mob child texture when growing up
'self.base_texture' contains current skin texture which was randomly
'self.base_texture'contains current skin texture which was randomly
selected from textures list
'self.gotten' this is used to track whether some special item has been
gotten from the mob, for example, wool from sheep.
@ -412,7 +414,7 @@ command which uses above names to make settings clearer:
For each mob that spawns with this function is a field in mobs.spawning_mobs.
It tells if the mob should spawn or not. Default is true. So other mods can
It tells if the mob should spawn or not.Default is true.So other mods can
only use the API of this mod by disabling the spawning of the default mobs in
this mod.
@ -420,7 +422,7 @@ this mod.
mobs:spawn_abm_check(pos, node, name)
This global function can be changed to contain additional checks for mobs to
spawn e.g. mobs that spawn only in specific areas and the like. By returning
spawn e.g. mobs that spawn only in specific areas and the like.By returning
true the mob will not spawn.
'pos' holds the position of the spawning mob
@ -452,7 +454,7 @@ This function registers a arrow for mobs with the attack type shoot.
'name' is the name of the arrow
'definition' is a table with the following values:
'visual' same is in minetest.register_entity()
'visual_size' same is in minetest.register_entity()
'visual_size'same is in minetest.register_entity()
'textures' same is in minetest.register_entity()
'velocity' the velocity of the arrow
'drop' if set to true any arrows hitting a node will drop as item
@ -488,7 +490,7 @@ This function registers a spawn egg which can be used by admin to properly spawn
'name' this is the name of your new mob to spawn e.g. "mob:sheep"
'description' the name of the new egg you are creating e.g. "Spawn Sheep"
'background' the texture displayed for the egg in inventory
'background'the texture displayed for the egg in inventory
'addegg' would you like an egg image in front of your texture (1 = yes,
0 = no)
'no_creative' when set to true this stops spawn egg appearing in creative
@ -504,7 +506,7 @@ mobs:boom(self, pos, radius)
'radius' radius of explosion (typically set to 3)
This function generates an explosion which removes nodes in a specific radius
and damages any entity caught inside the blast radius. Protection will limit
and damages any entity caught inside the blast radius.Protection will limit
node destruction but not entity damage.
@ -548,7 +550,7 @@ mobs:protect(self, clicker)
This function can be used to right-click any tamed mob with mobs:protector item,
this will protect the mob from harm inside of a protected area from other
players. Will return true when mob right-clicked with mobs:protector item.
players.Will return true when mob right-clicked with mobs:protector item.
'self' mob information
'clicker' player information
@ -584,7 +586,7 @@ This function allows an attached player to move the mob around and animate it at
same time.
'self' mob information
'move_animation' string containing movement animation e.g. "walk"
'move_animation'string containing movement animation e.g. "walk"
'stand_animation' string containing standing animation e.g. "stand"
'can_fly' if true then jump and sneak controls will allow mob to fly
up and down
@ -602,7 +604,7 @@ controls.
'can_shoot' true if mob can fire arrow (sneak and left mouse button
fires)
'arrow_entity' name of arrow entity used for firing
'move_animation' string containing name of pre-defined animation e.g. "walk"
'move_animation'string containing name of pre-defined animation e.g. "walk"
or "fly" etc.
'stand_animation' string containing name of pre-defined animation e.g.
"stand" or "blink" etc.
@ -629,7 +631,7 @@ Certain variables need to be set before using the above functions:
'self.accel' acceleration speed
'self.terrain_type' integer containing terrain mob can walk on
(1 = water, 2 or 3 = land)
'self.driver_attach_at' position offset for attaching player to mob
'self.driver_attach_at'position offset for attaching player to mob
'self.driver_eye_offset' position offset for attached player view
'self.driver_scale' sets driver scale for mobs larger than {x=1, y=1}
@ -648,7 +650,7 @@ External Settings for "minetest.conf"
multiplied by this number), defaults to 1.0.
'mob_spawn_chance' multiplies chance of all mobs spawning and can be set
to 0.5 to have mobs spawn more or 2.0 to spawn less.
e.g. 1 in 7000 * 0.5 = 1 in 3500 so better odds of
e.g.1 in 7000 * 0.5 = 1 in 3500 so better odds of
spawning.
'mobs_spawn' if false then mobs no longer spawn without spawner or
spawn egg.