Remove difficult mobs

Post Reply
paulvdv
Member
Posts: 20
Joined: Sat Sep 22, 2018 11:01

Remove difficult mobs

by paulvdv » Post

Hello,
I am looking for a tool to remove difficult mobs. For example when somebody brings many dragons in the game. Or cars what are owned by somebody. I saw the admin_tools mod, but it does not work for me. viewtopic.php?f=11&t=1144 I did install version 1.01, minetest starts, but I cannot remove anything. Does somebody know another way to remove mobs in an easy way? The only way I know is to remove the mod and then remove them. But that's not nice.

(I am the admin of a new public server where much is possible, named: "Voor iedereen, for everybody",)

Bye,
Paul

User avatar
TalkLounge
Member
Posts: 313
Joined: Sun Mar 26, 2017 12:42
GitHub: TalkLounge
In-game: TalkLounge
Location: Germany

Re: Remove difficult mobs

by TalkLounge » Post

From minetest wiki:

/clearobjects [full|quick]—Clears all objects/entities (removes all dropped items, mobs and possibly more). Note this may crash the server or slow it down to a crawl for 10 to more than 60 seconds

/clearobjects quick
Removes only loaded objects

/clearobjects full
Removes all objects on map
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de

trainwrecktony
Member
Posts: 67
Joined: Sun Jun 08, 2014 05:24
In-game: trainwrecktony
Location: NJ USA
Contact:

Re: Remove difficult mobs

by trainwrecktony » Post

that mod is ancient i'd suggest Maptools https://github.com/minetest-mods/maptools it has a pick that destroys anything and additional things like unbreakable blocks neither available to regular users by crafting. use /giveme pick_admin

The pick will kill mobs and other entities but you may want to look into the mob itself to limit the spawn or hatching
Are you using this version of the dragon? https://github.com/blert2112/mobs_dragon
You can edit the init.lua the spawn section is in this format

mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height)
You can disable the spawn all together but avoid unknown entities by commenting out the code with either -- at every line or --[[ at begining and --]] at end of code

Code: Select all

--[[ spawn in the wild
-------------------------------------------------------------------------------
mobs:spawn_specific("mobs_dragon:dragon_lg_red",
	{"air"},
	{"default:lava_source"},
	20, 10, 300, 15000, 2, -100, 11000
)

mobs:spawn_specific("mobs_dragon:dragon_lg_black",
	{"air"},
	{"default:obsidian"},
	20, 10, 300, 15000, 2, -100, 11000
)

mobs:spawn_specific("mobs_dragon:dragon_lg_green",
	{"air"},
	{"default:cactus"},
	20, 10, 300, 15000, 2, -100, 11000
)

mobs:spawn_specific("mobs_dragon:dragon_lg_blue",
	{"air"},
	{"default:water_source"},
	20, 10, 300, 15000, 2, -100, 11000
)--]]
-------------------------------------------------------------------------------
Similarily with the egg code you can disable the function commenting out the code between after_place_node = function(pos, placer, itemstack) and end

Code: Select all

-- dropped eggs for hatching ridable dragons
-------------------------------------------------------------------------------
minetest.register_node("mobs_dragon:dragon_egg", {
	description = "Dragon Egg",
	drawtype = "mesh",
	mesh = "egg.b3d",
	tiles = {"dmobs_egg.png"},
	paramtype = "light",
	sunlight_propagates = true,
	is_ground_content = false,
	groups = {fleshy=3, dig_immediate=3},
	sounds = default.node_sound_leaves_defaults(),
	--[[after_place_node = function(pos, placer, itemstack)
		-- is alter built correctly?
		local p = {x = pos.x, y = pos.y - 1, z = pos.z}
		local name1
		for x1 = -1,1 do
			for z1 = -1,1 do
				p.x = pos.x + x1
				p.z = pos.z + z1
				local name2 = minetest.get_node(p).name
				if x1 == -1 and z1 == -1 then			-- get name of one of the surrounding nodes
					name1 = minetest.get_node(p).name
				elseif x1 == 0 and z1 == 0 then			-- is center node obsidian?
					if name2 ~= "default:obsidian" then return end
				else
					if name2 ~= name1 then return end	-- do the rest of the surrounding nodes match the original sample?
				end
			end
		end

		-- determine which dragon to spawn depending on what the "alter" is made of
		local which_dragon
		if name1 == "default:lava_source" then which_dragon = "red"
		elseif name1 == "default:obsidian" then which_dragon = "black"
		elseif name1 == "default:cactus" then which_dragon = "green"
		elseif name1 == "default:water_source" then which_dragon = "blue"
		else return
		end

		-- 10 seconds after the egg is placed, spawn the appropriate dragon
		minetest.after(10, function(pos, dragon, pname)
			-- remove egg
			minetest.remove_node(pos)
			-- spawn dragon
			local ent = minetest.add_entity(pos, "mobs_dragon:dragon_sm_"..dragon)
			-- get dragon object and set owner name
			local obj = ent:get_luaentity()
			obj.tamed = true
			obj.owner = pname

			if use_whistle == true then
				-- not used because use_whistle should not be set to true
				local dcount = #tamed_dragons[pname]
				tamed_dragons[pname][dcount+1] = ent
			else
				-- set dragon order and state (and therefore animation) to stand
				-- dragon will wander off if you don't do this
				obj.order = "stand"
				obj.state = "stand"
			end
		end, pos, which_dragon, placer:get_player_name())
	end--]]
})
You can also disable the dragons from dropping eggs, edit large.lua find the drops = { code for each dragon and comment it out or change to something else available

Code: Select all

--drops = {
--		{name = "mobs_dragon:dragon_egg", chance = 0.5, min = 1, max = 1},
--	}

drops = {
		{name = "mobs:meat_raw", chance = 1, min = 1, max = 1},
	}
Server Owner trainwrecktony.serveminecraft.net:30000 irc.freenode.net ##minetest-trainwrecktony

IhrFussel
Member
Posts: 69
Joined: Tue Nov 22, 2016 12:54
GitHub: IhrFussel
IRC: IhrFussel
In-game: IhrFussel

Re: Remove difficult mobs

by IhrFussel » Post

TalkLounge wrote:From minetest wiki:

/clearobjects quick
Removes only loaded objects
This is false info and I had to correct people many times on this subject already.

The quick mode still deletes every object from the map just not instantly but whenever you load the other mapblocks from the DB.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests