Skip to content

Instantly share code, notes, and snippets.

@Amaz1
Amaz1 / init.lua
Created April 17, 2018 13:46
Schroedinger's Crash
-- Idea suggested by Jordach, inspired by Fuchs
-- http://irc.minetest.net/minetest-hub/2018-04-17#i_5281811
minetest.register_node("schroedingerscrash:schroedinger", {
description = "Schroedinger's Crash",
tiles = {"default_cloud.png^default_obsidian_shard.png^(" ..
"default_mese_crystal_fragment.png^[transform4)"},
groups = {cracky = 1},
on_place = function(itemstack, placer, pointed_thing)
if math.random() > 0.5 then
minetest.item_place_node(itemstack, placer, pointed_thing)
@Amaz1
Amaz1 / biomes.lua
Created December 14, 2017 12:09
Biome and Height maps for Minetest: Third Age
return {
{99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99
@Amaz1
Amaz1 / init.lua
Created November 25, 2017 14:25
Floatland portal
-- License: MIT
-- Copyright 2017 Amaz
--Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
--The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR T
@Amaz1
Amaz1 / spawn.lua
Last active March 9, 2022 00:52
Spawning in floatlands!
local noise_b = minetest.get_mapgen_setting_noiseparams("mgv7_np_floatland_base")
local noise_h = minetest.get_mapgen_setting_noiseparams("mgv7_np_float_base_height")
local noise_m = minetest.get_mapgen_setting_noiseparams("mgv7_np_mountain")
local floatland_y = minetest.get_mapgen_setting("mgv7_floatland_level")
local mount_height = minetest.get_mapgen_setting("mgv7_float_mount_height")
local mount_dens = minetest.get_mapgen_setting("mgv7_float_mount_density")
-- Based on these two funcs:
-- https://github.com/minetest/minetest/blob/28841961ba91b943b7478704181604fa3e24e81e/src/mapgen_v7.cpp#L415
-- https://github.com/minetest/minetest/blob/28841961ba91b943b7478704181604fa3e24e81e/src/mapgen_v7.cpp#L428
@Amaz1
Amaz1 / machines.lua
Last active January 2, 2017 16:45 — forked from octacian/machines.lua
ME Chest
-- microexpansion/machines.lua
local function chest_formspec(start_id, listname)
if not listname then
listname = "main"
end
return "size[8,10]" ..
default.gui_bg ..
default.gui_bg_img ..
default.gui_slots ..
minetest.register_chatcommand("cc", {
params = "<colour> <message>",
description = "Send coloured chat",
func = function(name, param)
local colour, message = string.match(param, "([^ ]+) (.+)")
minetest.chat_send_all("<" .. name .. "> " .. minetest.colorize(colour, message))
end
})
@Amaz1
Amaz1 / init.lua
Created May 20, 2015 13:28
nametag_healthbar
--nametag_healthbar, made by Amaz.
--This sets the player's nametag to a colour depending on his/her health.
--License: WTFPL
local count = 0
minetest.register_globalstep(function(dtime)
count = count + dtime
if count > 5 then
count = 0
local players = minetest.get_connected_players()
diff --git a/mods/lottpotion/cauldron.lua b/mods/lottpotion/cauldron.lua
index bd68834..f422c8e 100644
--- a/mods/lottpotion/cauldron.lua
+++ b/mods/lottpotion/cauldron.lua
@@ -3,10 +3,10 @@ minetest.register_node("lottpotion:cauldron_full",{
description= "Filled Cauldron",
tiles = {"lottpotion_cauldron_top.png", "lottpotion_cauldron_side.png", "lottpotion_cauldron_side.png",
"lottpotion_cauldron_side.png", "lottpotion_cauldron_side.png", "lottpotion_cauldron_side.png"},
+ paramtype = "light",
paramtype2 = "facedir",
sudo apt-get install git-core build-essential libirrlicht-dev cmake libpng12-dev libbz2-dev libjpeg8-dev libgl1-mesa-dev && git clone http://github.com/rubenwardy/nodeboxeditor && cd nodeboxeditor && cmake . && make -j2 && ./bin/nodeboxeditor
minetest.register_biome({
--The name of the biome. This needs to be unique.
name = "beach",
--The name of the surface node.
node_top = "default:sand",
--How far the surface node goes down.
depth_top = 2,
--The node underneath the surface nodes.
node_filler = "default:sandstone",
--How far the filler nodes go down. (After they end, stone starts.)