Go to file
Tai @ Flex 63db51ef0e use a craftable cobweb for it 2016-10-01 12:55:43 +01:00
.gitignore ignores 2016-09-29 16:03:38 +01:00
LICENSE.txt license information 2016-09-29 16:25:48 +01:00
README.md Update README.md 2016-09-29 16:34:06 +01:00
command.lua refactor add nssm as demo 2016-09-29 21:03:42 +01:00
depends.txt initial commit 2016-09-29 16:03:02 +01:00
description.txt Info files 2016-09-29 16:29:58 +01:00
init.lua refactor add nssm as demo 2016-09-29 21:03:42 +01:00
mod.conf initial commit 2016-09-29 16:03:02 +01:00
screenshot.png Info files 2016-09-29 16:29:58 +01:00
settings.lua make craft recipe conditional 2016-09-30 13:41:48 +01:00
spawndefs.lua use a craftable cobweb for it 2016-10-01 12:55:43 +01:00
trap.lua make craft recipe conditional 2016-09-30 13:41:48 +01:00

README.md

Minetest Mod : Spawn Trap

Add a block that will start spawning mobs when a player is near.

License

(C) 2016 Tai "DuCake" Kedzierski

Provided under LGPLv3 - see LICENSE.txt or https://www.gnu.org/licenses/lgpl.html for the full text.

This software is Free Software : you can distribute, change and distribute the modified versions of this software provided that the copyright notice and license remain unchanged, and you provide the source code of the modifications to whomever asks.

You are not compelled to license your own software under the same license, provided that the source code to your software does not directly incorporate parts of the source code of this software.

Spawn Trap

The type of mob spawned depends on the block that is placed underneath the trap.

node -> mob correspondencies are defined in spawndefs.lua

You do not need to add any dependencies to depends.txt per mob mod.

Place a spawnstep:spawntrap node directly on top of a node as configured in spawndefs.lua and the corresponding mob will spawn.

To dig traps, you need the digsawntrap privilege.

You can change the spawn trap's texture in spawndefs.lua

/spawnto command

You can use the /spawnto command to spawn a specific mob near a player.

/spawnto Player2 mobs_monster:dirt_monster

If you defined a monster in spawndefs.lua, you can use its shortname:

-- definition in spawndefs.lua:

	stonem = {
	  node="default:stone",
	  mob="mobs_monster:stone_monster",
	}

-- example command

	/spawnto Player2 stonem

Requires the spawner privilege.