Go to file
Robert Zenz 10a4fdbad3 Fixed texture orientation for all models. 2016-01-17 13:06:25 +01:00
deps Updated dependencies. 2016-01-17 12:48:54 +01:00
doc Added corners. 2015-11-03 22:27:58 +01:00
mods Fixed texture orientation for all models. 2016-01-17 13:06:25 +01:00
.gitmodules Added everything. 2015-05-01 21:31:40 +02:00
LICENSE Added everything. 2015-05-01 21:31:40 +02:00
Makefile Updated Makefile. 2016-01-17 12:31:34 +01:00
README Added ABM example. 2015-05-02 11:31:28 +02:00
README.md Added everything. 2015-05-01 21:31:40 +02:00

README.md

minetest-australopithecus-worldgen-utils

A util collection for everything around the mapgen.

Ramps

The Ramps mod allwos to easily create, register and place ramps in the world during or after world generation. You can even inject ramps into already existing games, for example minetest-game. You simply need to add something like this to the init.lua (and copy the worldgen-utils mode into the game, obviously):

local nodes = {}

nodes = tableutil.merge(nodes, ramputil.register_ramps_for_node("default:dirt_with_grass", "worldgen_utils:dirt_with_grass", true, 6))
nodes = tableutil.merge(nodes, ramputil.register_ramps_for_node("default:stone", "worldgen_utils:stone", true, 6))
nodes = tableutil.merge(nodes, ramputil.register_ramps_for_node("default:dirt", "worldgen_utils:dirt", true, 6))

minetest.register_on_generated(function(minp, maxp, seed)
	local manipulator = MapManipulator:new()
	
	rampgen.run(manipulator, minp, maxp, nodes)
	
	manipulator:set_data()
end)

You can also register an ABM/callback on some node and use the run_on_node function directly:

some_node.after_dig_node(function(pos, oldnode, oldmetadata, digger)
	local manipulator = DirectMapManipulator:new()

	for x = pos.x - 1, pos.x + 1, 1 do
		for z = pos.z - 1, pos.z + 1, 1 do
			for y = pos.y - 1, pos.y + 1, 1 do
				rampgen.run_on_node(manipulator, x, z, y, nodes)
			end
		end
	end
end