Initial load

This commit is contained in:
maikerumine 2016-10-28 19:58:31 -04:00
commit 94f243c250
31 changed files with 2550 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
EXTRA_REF/textures410.zip Normal file

Binary file not shown.

20
README.txt Normal file

@ -0,0 +1,20 @@
Minetest 0.4 mod: jt_mods
==========================
License of source code:
-----------------------
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
http://www.gnu.org/licenses/lgpl-2.1.html
License of media (textures and sounds)
--------------------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/

125
admintnt.lua Normal file

@ -0,0 +1,125 @@
--mod: admin tnt for survival server
--Just Test Mods created by maikerumine
--inspired by Andrey "lag01" the creator of the original Just Test server.
-- Minetest 0.4.14 mod: "jt_mods"
-- namespace: jt_mods
--https://github.com/maikerumine
--License:
--~~~~~~~~
--Code:
--(c) Copyright 2016 maikerumine; modified zlib-License
--see "LICENSE.txt" for details.
--Media(if not stated differently):
--(c) Copyright (2014-2016) maikerumine; CC-BY-SA 3.0
minetest.register_node("jt_mods:admin_tnt_fake", {
description = "Fake Admin TNT",
tiles = {"admin_tnt_top.png", "admin_tnt_bottom.png", "admin_tnt_side.png"},
groups = {choppy = 2,immortal = 1},
--drop = 'jt_mods:admin_tnt_fake',
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, puncher)
local meta = minetest.get_meta(pos)
meta:set_string("owner", puncher:get_player_name() or "")
meta:set_string("infotext", "Fake TNT (placed by " ..
meta:get_string("owner") .. ")")
end,
})
minetest.register_node("jt_mods:admin_tnt", {
description = "ADMIN TNT Changes to tnt after 12 hour timer.",
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"admin_tnt_top.png", "admin_tnt_bottom.png", "admin_tnt_side.png"},
is_ground_content = false,
groups = {cracky = 0,choppy = 1},
drop ='jt_mods:admin_tnt_fake',
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
meta:set_string("owner", placer:get_player_name() or "")
meta:set_string("infotext", "ADMIN TNT (placed by " ..
meta:get_string("owner") .. ")")
minetest.sound_play("tnt_ignite", {pos=pos})
minetest.after(60, function()
minetest.sound_play("tnt_ignite", {pos=pos})
end)
end,
on_punch = function(pos, node, puncher)
if puncher:get_wielded_item():get_name() == "jt_mods:griefer_soul_block" then
minetest.sound_play("tnt_ignite", {pos=pos})
--minetest.set_node(pos, {name="tnt:tnt_burning"}) --sets to instant explosion
minetest.set_node(pos, {name="tnt:tnt"}) --sets to regular tnt for controlled demolition
boom(pos, 0)
end
end,
on_dig = function(pos, node, puncher)
if puncher:get_wielded_item():get_name() == "default:axe_mese" then
minetest.sound_play("tnt_ignite", {pos=pos})
minetest.set_node(pos, {name="tnt:tnt_burning"})
boom(pos, 0)
minetest.after(2, function()
minetest.sound_play("tnt_ignite", {pos=pos})
minetest.set_node(pos, {name="jt_mods:admin_tnt_fake"})
end)
end
end,
})
minetest.register_node("jt_mods:admin_tnt_fast", {
description = "ADMIN TNT Changes to tnt after 60 second hour timer",
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"admin_tnt_top.png^heart.png", "admin_tnt_bottom.png^default_mineral_copper.png^heart.png", "admin_tnt_side.png^default_rail.png"},
is_ground_content = false,
groups = {cracky = 0},
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
meta:set_string("owner", placer:get_player_name() or "")
meta:set_string("infotext", "ADMIN TNT FAST (placed by " ..
meta:get_string("owner") .. ")")
end,
on_punch = function(pos, node, puncher)
if puncher:get_wielded_item():get_name() == "jt_mods:griefer_soul_block" then
minetest.sound_play("tnt_ignite", {pos=pos})
minetest.set_node(pos, {name="tnt:tnt_burning"})
--minetest.set_node(pos, {name="tnt:tnt"})
boom(pos, 0)
end
end,
})
minetest.register_abm({
nodenames = {"jt_mods:admin_tnt"},
interval = 43200,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
minetest.sound_play("tnt_ignite", {pos=pos})
if node.name == "jt_mods:admin_tnt" then
minetest.set_node(pos, {name="tnt:tnt_burning"})
boom(pos, 0)
end
--end
end,
})
minetest.register_abm({
nodenames = {"jt_mods:admin_tnt_fast"},
interval = 60,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
minetest.sound_play("tnt_ignite", {pos=pos})
if node.name == "jt_mods:admin_tnt_fast" then
--minetest.set_node(pos, {name="tnt:tnt_boom"})
minetest.set_node(pos, {name="tnt:tnt_burning"})
boom(pos, 0)
end
--end
end,
})

29
aliases.lua Normal file

@ -0,0 +1,29 @@
-- mods/jt_mods/aliases.lua
--Just Test Mods created by maikerumine
--inspired by Andrey "lag01" the creator of the original Just Test server.
-- Minetest 0.4.14 mod: "jt_mods"
-- namespace: jt_mods
--https://github.com/maikerumine
--License:
--~~~~~~~~
--Code:
--(c) Copyright 2016 maikerumine; modified zlib-License
--see "LICENSE.txt" for details.
--Media(if not stated differently):
--(c) Copyright (2014-2016) maikerumine; CC-BY-SA 3.0
minetest.register_alias("default:lag_block", "jt_mods:lag_block")
minetest.register_alias("default:lag_ice", "jt_mods:lag_ice")
minetest.register_alias("default:griefer_soul_block", "jt_mods:griefer_soul_block")
minetest.register_alias("default:meselamp_white", "jt_mods:meselamp_white")
minetest.register_alias("default:handle", "jt_mods:handle")
minetest.register_alias("default:griefer_soul", "jt_mods:griefer_soul")
minetest.register_alias("default:pick_obsidian", "jt_mods:pick_obsidian")
minetest.register_alias("default:pick_admin", "jt_mods:pick_admin")
minetest.register_alias("default:crushing_furnace", "jt_mods:crushing_furnace")
minetest.register_alias("default:crushing_furnace_active", "jt_mods:crushing_furnace_active")
minetest.register_alias("default:admin_tnt_fake", "jt_mods:admin_tnt_fake")
minetest.register_alias("default:admin_tnt_fast", "jt_mods:admin_tnt_fast")
minetest.register_alias("default:admin_tnt", "jt_mods:admin_tnt")

77
antigrief.lua Normal file

@ -0,0 +1,77 @@
-- ANTI GRIEF by rnd
-- Copyright 2016 rnd
--Edited by maikerumine for TNT
----------------------------------------------------------------------------
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------------
--TNT only below 150!
function no_tnt_above(name)
local tnt_on_place=minetest.registered_craftitems[name];--.on_place;
local tnt_after_place_node = minetest.registered_nodes[name];--.after_place_node;
--after_place_node = func(pos, placer, itemstack, pointed_thing)
if tnt_on_place and tnt_on_place.on_place then
tnt_on_place=tnt_on_place.on_place;
minetest.registered_craftitems[name].on_place=function(itemstack, placer, pointed_thing)
local pos = pointed_thing.above
if pos.y>-150 then
minetest.log("action","ANTI GRIEF " .. placer:get_player_name() .. " tried to place " .. name .. " at " .. minetest.pos_to_string(pos));
return itemstack
else
--return tnt_on_place(itemstack, placer, pointed_thing)
end
end
return;
end
if tnt_after_place_node then
tntafter_place_node=tnt_after_place_node.after_place_node
local table = minetest.registered_nodes[name];
local table2 = {}
for i,v in pairs(table) do
table2[i] = v
end
table2.after_place_node=function(pos, placer, itemstack, pointed_thing)
--after_place_node = func(pos, placer, itemstack, pointed_thing)
local pos = pointed_thing.above
if pos.y>-150 then
minetest.log("action","ANTI GRIEF " .. placer:get_player_name() .. " tried to place " .. name .. " at " .. minetest.pos_to_string(pos));
minetest.set_node(pos, {name = "air"});
--return itemstack
end
end
minetest.register_node(":"..name, table2)
return;
end
return;
end
minetest.after(0,
function ()
no_tnt_above("tnt:tnt");
end
)

176
crafting.lua Normal file

@ -0,0 +1,176 @@
-- mods/jt_mods/crafting.lua
--Just Test Mods created by maikerumine
--inspired by Andrey "lag01" the creator of the original Just Test server.
-- Minetest 0.4.14 mod: "jt_mods"
-- namespace: jt_mods
--https://github.com/maikerumine
--License:
--~~~~~~~~
--Code:
--(c) Copyright 2016 maikerumine; modified zlib-License
--see "LICENSE.txt" for details.
--Media(if not stated differently):
--(c) Copyright (2014-2016) maikerumine; CC-BY-SA 3.0
--hehe change up the craft ;-)
minetest.register_craft({
output = 'default:desert_cobble 8',
recipe = {
{'default:cobble', 'default:cobble', 'default:cobble'},
{'default:cobble', 'dye:red', 'default:cobble'},
{'default:cobble', 'default:cobble', 'default:cobble'},
}
})
minetest.register_craft({
output = 'default:desert_sand 8',
recipe = {
{'default:sand', 'default:sand', 'default:sand'},
{'default:sand', 'dye:orange', 'default:sand'},
{'default:sand', 'default:sand', 'default:sand'},
}
})
-- Minetest 0.4 mod: apple_sapling
-- Craft a tree sapling from dirt and apple.
--
-- maikerumine
minetest.register_craft({
output = 'default:sapling',
recipe = {
{"default:dirt", "default:dirt", "default:dirt"},
{"default:dirt", "default:apple", "default:dirt"},
{"default:dirt", "default:dirt", "default:dirt"},
},
})
--Lag Block
--maikerumine
minetest.register_craft({
output = 'jt_mods:lag_block',
recipe = {
{"default:dirt_with_grass", "default:desert_stonebrick", "default:bronze_ingot"},
{"default:diamondblock", "default:ice", "default:snowblock"},
{"default:pick_diamond", "default:sandstonebrick", "default:obsidian"},
},
})
minetest.register_craft({
output = 'jt_mods:lag_ice',
recipe = {
{'default:snowblock', 'default:snowblock', 'default:snowblock'},
{'default:snowblock', 'bucket:bucket_water', 'default:snowblock'},
{'default:snowblock', 'default:snowblock', 'default:snowblock'},
}
})
minetest.register_craft({
output = 'default:ice',
recipe = {
{'jt_mods:lag_ice', 'jt_mods:lag_ice', 'jt_mods:lag_ice'},
{'jt_mods:lag_ice', 'bucket:bucket_water', 'jt_mods:lag_ice'},
{'jt_mods:lag_ice', 'jt_mods:lag_ice', 'jt_mods:lag_ice'},
}
})
minetest.register_craft({
output = 'default:dirt_with_grass 4',
recipe = {
{"default:dirt", "default:grass_1", "default:dirt"},
{"default:grass_1", "bones:bones", "default:grass_1"},
{"default:dirt", "default:grass_1", "default:dirt"},
},
})
-- Minetest 0.4 mod: bone_collector
-- Bones can be crafted to clay, sand or coal to motivate players clear the playground.
--
-- See README.txt for licensing and other information.
minetest.register_craft({
output = 'default:clay_lump',
recipe = {
{"bones:bones", "", ""},
{"", "", ""},
{"", "", ""},
},
})
minetest.register_craft({
output = 'default:gravel',
recipe = {
{"", "", ""},
{"", "", ""},
{"bones:bones", "bones:bones", "bones:bones"},
},
})
minetest.register_craft({
output = 'default:sand',
recipe = {
{"bones:bones", "", "bones:bones"},
{"", "bones:bones", ""},
{"bones:bones", "", "bones:bones"},
},
})
minetest.register_craft({
output = 'default:coal_lump',
recipe = {
{"", "bones:bones", ""},
{"bones:bones", "bones:bones", "bones:bones"},
{"", "bones:bones", ""},
},
})
minetest.register_craft({
output = 'default:dirt',
recipe = {
{"bones:bones", "bones:bones", "bones:bones"},
{"bones:bones", "bones:bones", "bones:bones"},
{"bones:bones", "bones:bones", "bones:bones"},
},
})
--[[
minetest.register_craft({
output = 'jt_mods:pick_obsidian',
recipe = {
{'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
{'', 'jt_mods:handle', ''},
{'', 'jt_mods:handle', ''},
}
})
minetest.register_craft({
output = 'jt_mods:handle',
recipe = {
{'default:steel_ingot', 'jt_mods:griefer_soul', 'default:steel_ingot'},
{'default:steel_ingot', 'jt_mods:griefer_soul', 'default:steel_ingot'},
{'default:steel_ingot', 'jt_mods:griefer_soul', 'default:steel_ingot'},
}
})
]]
minetest.register_craft({
output = 'jt_mods:meselamp_white 1',
recipe = {
{'', 'default:mese_crystal',''},
{'default:mese_crystal', 'default:obsidian_glass', 'default:mese_crystal'},
}
})
minetest.register_craft({
output = 'jt_mods:griefer_soul_block',
recipe = {
{'jt_mods:griefer_soul', 'jt_mods:griefer_soul', 'jt_mods:griefer_soul'},
{'jt_mods:griefer_soul', 'jt_mods:griefer_soul', 'jt_mods:griefer_soul'},
{'jt_mods:griefer_soul', 'jt_mods:griefer_soul', 'jt_mods:griefer_soul'},
}
})
minetest.register_craft({
output = 'jt_mods:admin_tnt',
recipe = {
{'default:wood', 'tnt:gunpowder', 'default:wood'},
{'tnt:gunpowder', 'jt_mods:griefer_soul_block', 'tnt:gunpowder'},
{'default:wood', 'tnt:gunpowder', 'default:wood'},
}
})

24
craftitems.lua Normal file

@ -0,0 +1,24 @@
-- mods/jt_mods/craftitems.lua
--Just Test Mods created by maikerumine
--inspired by Andrey "lag01" the creator of the original Just Test server.
-- Minetest 0.4.14 mod: "jt_mods"
-- namespace: jt_mods
--https://github.com/maikerumine
--License:
--~~~~~~~~
--Code:
--(c) Copyright 2016 maikerumine; modified zlib-License
--see "LICENSE.txt" for details.
--Media(if not stated differently):
--(c) Copyright (2014-2016) maikerumine; CC-BY-SA 3.0
minetest.register_craftitem("jt_mods:handle", {
description = "Handle for Tools",
inventory_image = "default_stick.png^[colorize:black:150"
})
minetest.register_craftitem("jt_mods:griefer_soul", {
description = "Griefer Soul",
inventory_image = "default_coal_lump.png^[colorize:red:120",
})

321
crushingfurnace.lua Normal file

@ -0,0 +1,321 @@
--CrushingFurnace mod by sfan5
--v1.1
--Added to jt_mods 20160814 maikerumine
local function get_furnace_active_formspec(pos, percent)
local formspec =
"size[8,9]"..
"image[2,2;1,1;crushingfurnace_crush_bg.png^[lowpart:"..
(100-percent)..":crushingfurnace_crush_fg.png]"..
"list[current_name;fuel;2,3;1,1;]"..
"list[current_name;src;2,1;1,1;]"..
"list[current_name;dst;5,1;2,2;]"..
"list[current_player;main;0,5;8,4;]"
return formspec
end
local furnace_inactive_formspec =
"size[8,9]"..
"image[2,2;1,1;crushingfurnace_crush_bg.png]"..
"list[current_name;fuel;2,3;1,1;]"..
"list[current_name;src;2,1;1,1;]"..
"list[current_name;dst;5,1;2,2;]"..
"list[current_player;main;0,5;8,4;]"
local crushingfurnace_receipes = {
--input output time
{"default:cobble", "default:gravel", 180},
{"default:gravel", "default:sand", 90},
--{"default:sand", "default:dirt", 5},
}
function crushingfurnace_get_craft_result(input)
if input.method ~= "cooking" then return nil end
if input.width ~= 1 then return nil end
for _, e in ipairs(crushingfurnace_receipes) do
if e[1] == input.items[1]:get_name() then
local outstack = input.items[1]
outstack:take_item()
return {item = ItemStack(e[2]), time=e[3]}, {items = {outstack}}
end
end
return {item = ItemStack(""), time=0}, {items = ItemStack("")}
end
minetest.register_node("jt_mods:crushing_furnace", {
description = "Crushing Furnace [[3 min for gravel, 1.5 min for sand.]] IS PROTECTED!",
tiles = {"default_furnace_top.png", "default_furnace_bottom.png", "default_furnace_side.png",
"default_furnace_side.png", "default_furnace_side.png", "crushingfurnace_front.png"},
paramtype2 = "facedir",
groups = {cracky=2},
legacy_facedir_simple = true,
sounds = default.node_sound_stone_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", furnace_inactive_formspec)
meta:set_string("infotext", "Crushing Furnace")
local inv = meta:get_inventory()
inv:set_size("fuel", 1)
inv:set_size("src", 1)
inv:set_size("dst", 4)
end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory()
if not inv:is_empty("fuel") then
return false
elseif not inv:is_empty("dst") then
return false
elseif not inv:is_empty("src") then
return false
end
return true
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then --mm added is protectrd
return 0
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if listname == "fuel" then
if minetest.get_craft_result({method="fuel",width=1,items={stack}}).time ~= 0 then
if inv:is_empty("src") then
meta:set_string("infotext","Crushing Furnace is empty")
end
return stack:get_count()
else
return 0
end
elseif listname == "src" then
return stack:get_count()
elseif listname == "dst" then
return 0
end
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
if minetest.is_protected(pos, player:get_player_name()) then --mm added is protectrd
return 0
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local stack = inv:get_stack(from_list, from_index)
if to_list == "fuel" then
if minetest.get_craft_result({method="fuel",width=1,items={stack}}).time ~= 0 then
if inv:is_empty("src") then
meta:set_string("infotext","Crushing Furnace is empty")
end
return count
else
return 0
end
elseif to_list == "src" then
return count
elseif to_list == "dst" then
return 0
end
end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then
return 0
end
return stack:get_count()
end,
})
minetest.register_node("jt_mods:crushing_furnace_active", {
tiles = {"default_furnace_top.png", "default_furnace_bottom.png", "default_furnace_side.png",
"default_furnace_side.png", "default_furnace_side.png", "crushingfurnace_front_active.png"},
paramtype2 = "facedir",
light_source = 8,
drop = "jt_mods:crushing_furnace",
groups = {cracky=2, not_in_creative_inventory=1,hot=1},
legacy_facedir_simple = true,
sounds = default.node_sound_stone_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", furnace_inactive_formspec)
meta:set_string("infotext", "Crushing Furnace");
local inv = meta:get_inventory()
inv:set_size("fuel", 1)
inv:set_size("src", 1)
inv:set_size("dst", 4)
end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory()
if not inv:is_empty("fuel") then
return false
elseif not inv:is_empty("dst") then
return false
elseif not inv:is_empty("src") then
return false
end
return true
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then --mm added is protectrd
return 0
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if listname == "fuel" then
if minetest.get_craft_result({method="fuel",width=1,items={stack}}).time ~= 0 then
if inv:is_empty("src") then
meta:set_string("infotext","Crushing Furnace is empty")
end
return stack:get_count()
else
return 0
end
elseif listname == "src" then
return stack:get_count()
elseif listname == "dst" then
return 0
end
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
if minetest.is_protected(pos, player:get_player_name()) then --mm added is protectrd
return 0
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local stack = inv:get_stack(from_list, from_index)
if to_list == "fuel" then
if minetest.get_craft_result({method="fuel",width=1,items={stack}}).time ~= 0 then
if inv:is_empty("src") then
meta:set_string("infotext","Crushing Furnace is empty")
end
return count
else
return 0
end
elseif to_list == "src" then
return count
elseif to_list == "dst" then
return 0
end
end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then
return 0
end
return stack:get_count()
end,
})
function hacky_swap_node(pos,name)
local node = minetest.get_node(pos)
local meta = minetest.get_meta(pos)
if node.name == name then
return
end
local meta0 = meta:to_table()
node.name = name
minetest.set_node(pos,node)
meta = minetest.get_meta(pos)
meta:from_table(meta0)
end
minetest.register_abm({
nodenames = {"jt_mods:crushing_furnace","jt_mods:crushing_furnace_active"},
interval = 1.0,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local meta = minetest.get_meta(pos)
for i, name in ipairs({
"fuel_totaltime",
"fuel_time",
"src_totaltime",
"src_time"
}) do
if meta:get_string(name) == "" then
meta:set_float(name, 0.0)
end
end
local inv = meta:get_inventory()
local srclist = inv:get_list("src")
local cooked = nil
local aftercooked
if srclist then
cooked, aftercooked = crushingfurnace_get_craft_result({method = "cooking", width = 1, items = srclist})
end
local was_active = false
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
was_active = true
meta:set_float("fuel_time", meta:get_float("fuel_time") + 1)
meta:set_float("src_time", meta:get_float("src_time") + 1)
if cooked and cooked.item and meta:get_float("src_time") >= cooked.time then
-- check if there's room for output in "dst" list
if inv:room_for_item("dst",cooked.item) then
-- Put result in "dst" list
inv:add_item("dst", cooked.item)
-- take stuff from "src" list
inv:set_stack("src", 1, aftercooked.items[1])
else
print("Could not insert '"..cooked.item:to_string().."'")
end
meta:set_string("src_time", 0)
end
end
if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then
local percent = math.floor(meta:get_float("fuel_time") /
meta:get_float("fuel_totaltime") * 100)
meta:set_string("infotext","Crushing Furnace active: "..percent.."%")
hacky_swap_node(pos,"jt_mods:crushing_furnace_active")
meta:set_string("formspec", get_furnace_active_formspec(pos, percent))
return
end
local fuel = nil
local afterfuel
local cooked = nil
local fuellist = inv:get_list("fuel")
local srclist = inv:get_list("src")
if srclist then
cooked = crushingfurnace_get_craft_result({method = "cooking", width = 1, items = srclist})
end
if fuellist then
fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist})
end
if fuel.time <= 0 then
meta:set_string("infotext", "Crushing Furnace out of fuel")
hacky_swap_node(pos, "jt_mods:crushing_furnace")
meta:set_string("formspec", furnace_inactive_formspec)
return
end
if cooked.item:is_empty() then
if was_active then
meta:set_string("infotext", "Crushing Furnace is empty")
hacky_swap_node(pos, "jt_mods:crushing_furnace")
meta:set_string("formspec", furnace_inactive_formspec)
end
return
end
meta:set_string("fuel_totaltime", fuel.time)
meta:set_string("fuel_time", 0)
inv:set_stack("fuel", 1, afterfuel.items[1])
end,
})
minetest.register_craft({
output = 'jt_mods:crushing_furnace',
recipe = {
{'default:cobble', 'default:steelblock', 'default:cobble'},
{'', 'default:diamondblock', ''},
{'default:stonebrick', 'default:cobble', 'default:stonebrick'},
}
})

2
depends.txt Normal file

@ -0,0 +1,2 @@
default
bones

32
init.lua Normal file

@ -0,0 +1,32 @@
--Just Test Mods created by maikerumine
--inspired by Andrey "lag01" the creator of the original Just Test server.
-- Minetest 0.4.14 mod: "jt_mods"
-- namespace: jt_mods
--https://github.com/maikerumine
--License:
--~~~~~~~~
--Code:
--(c) Copyright 2016 maikerumine; modified zlib-License
--see "LICENSE.txt" for details.
--Media(if not stated differently):
--(c) Copyright (2014-2016) maikerumine; CC-BY-SA 3.0
-- Load files
dofile(minetest.get_modpath("jt_mods").."/aliases.lua")
dofile(minetest.get_modpath("jt_mods").."/admintnt.lua")
dofile(minetest.get_modpath("jt_mods").."/craftitems.lua")
dofile(minetest.get_modpath("jt_mods").."/crafting.lua")
dofile(minetest.get_modpath("jt_mods").."/crushingfurnace.lua")
dofile(minetest.get_modpath("jt_mods").."/mapgen.lua")
dofile(minetest.get_modpath("jt_mods").."/nodes.lua")
dofile(minetest.get_modpath("jt_mods").."/tools.lua")
dofile(minetest.get_modpath("jt_mods").."/thaw.lua")
--SERVER SIDE
dofile(minetest.get_modpath("jt_mods").."/shutdown.lua")
dofile(minetest.get_modpath("jt_mods").."/antigrief.lua")

1500
mapgen.lua Normal file

File diff suppressed because it is too large Load Diff

57
nodes.lua Normal file

@ -0,0 +1,57 @@
-- mods/jt_mods/nodes.lua
--Just Test Mods created by maikerumine
--inspired by Andrey "lag01" the creator of the original Just Test server.
-- Minetest 0.4.14 mod: "jt_mods"
-- namespace: jt_mods
--https://github.com/maikerumine
--License:
--~~~~~~~~
--Code:
--(c) Copyright 2016 maikerumine; modified zlib-License
--see "LICENSE.txt" for details.
--Media(if not stated differently):
--(c) Copyright (2014-2016) maikerumine; CC-BY-SA 3.0
--maikerumine added
minetest.register_node("jt_mods:lag_block", {
description = "Show this around town to sho you love the original Just Test. REMEMBER THE TEST. Lag, This is a dedication block to your ideas, your server, and you. My skuchayem i lyubyat vas. WE MISS AND LOVE YOU!",
tiles = {"default_water.png^treeprop.png^heart.png"},
is_ground_content = false,
walkable = false,
light_source = default.LIGHT_MAX,
groups = {immortal=1,cracky=1,not_in_creative_inventory = 1},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("jt_mods:lag_ice", {
description = "Lag's Ice --THIS WILL MELT IN SUNLIGHT--",
tiles = {"default_ice.png^default_glass_detail.png^[colorize:blue:80"},
is_ground_content = false,
paramtype = "light",
groups = {cracky = 1, puts_out_fire = 1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("jt_mods:griefer_soul_block", {
description = "A Block Of Griefer Souls",
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"bones_front.png^[colorize:red:120", "bones_front.png^[colorize:red:120", "bones_front.png^[colorize:red:120"},
is_ground_content = false,
groups = {cracky = 2, stone = 1,dig_immediate=2},
sounds =default.node_sound_wood_defaults(),
})
minetest.register_node("jt_mods:meselamp_white", {
description = "Mese Lamp White",
drawtype = "glasslike",
tiles = {"light.png^default_obsidian_glass.png"},
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky = 2},
sounds =default.node_sound_glass_defaults(),
light_source = default.LIGHT_MAX,
})

114
shutdown.lua Normal file

@ -0,0 +1,114 @@
--Just Test Mods created by maikerumine
--inspired by Andrey "lag01" the creator of the original Just Test server.
-- Minetest 0.4.14 mod: "jt_mods"
-- namespace: jt_mods
--https://github.com/maikerumine
--License:
--~~~~~~~~
--Code:
--(c) Copyright 2016 maikerumine; modified zlib-License
--see "LICENSE.txt" for details.
--Media(if not stated differently):
--(c) Copyright (2014-2016) maikerumine; CC-BY-SA 3.0
jt_mods = {}
--Fixer's code--v
--Modified by maikerumine
-- Time to shut down server.
-- jt_mods is twice a day: at 06:05 and 18:05
local H = 18
local X = 18
local Y = 19
local Z = 19
local M = 55
local N = 00
-- Day to shut down server.
-- jt_mods is daily shutdown
-- 1=Sunday, ..., 7=Saturday, nil=Shutdown daily
local D = nil
local timer = 0
minetest.register_globalstep(function(dtime)
timer = timer + dtime
if timer < 1 then return end
timer = 0
local t = os.date("*t")
if ((t.hour == H or t.hour == X) and (t.min == M) and (t.sec <= 2)
and ((D == nil) or (t.wday == D))) then
minetest.chat_send_all("Scheduled shutdown. 1900 Eastern Time Zone"
.."Shutting down in FIVE minutes. ALL PLAYER FILES WILL RESET")
minetest.chat_send_all("STORE YOUR ITEMS WITHIN 4 MINUTES AND LOG OUT TO SAVE YOUR XP!!!!!!!. ".."Shutting down in FIVE minutes.")
--minetest.after(2, minetest.request_shutdown)
end
if ((t.hour == Y or t.hour == Z) and (t.min ==N) and (t.sec <= 2)
and ((D == nil) or (t.wday == D))) then
minetest.chat_send_all("SHUTTING SERVER DOWN NOW!"
.." Please come back in a few while map is backed-up.")
minetest.chat_send_all("5 SHUTTING SERVER DOWN NOW! Please log off to save you XP!"
.." Please come back in a few while map is backed--up.")
minetest.chat_send_all("4 SHUTTING SERVER DOWN NOW! Please log off to save you XP!"
.." Please come back in a few while map is backed---up.")
minetest.chat_send_all("3 SHUTTING SERVER DOWN NOW! Please log off to save you XP!"
.." Please come back in a few while map is backed----up.")
minetest.chat_send_all("2 SHUTTING SERVER DOWN NOW! Please log off to save you XP!Please log off to save you XP!Please log off to save you XP!Please log off to save you XP!Please log off to save you XP!Please log off to save you XP!Please log off to save you XP!Please log off to save you XP!"
.." Please come back in a few while map is backed-----up.")
minetest.chat_send_all("1 SHUTTING SERVER DOWN NOW!"
.." Please come back in a few while map is backed------up.")
minetest.after(5, minetest.request_shutdown)
end
end)
--[[
minetest.register_globalstep(function(dtime)
timer = timer + dtime
if timer < 1 then return end
timer = 0
local t = os.date("*t")
if ((t.hour == H or t.hour == X or t.hour == Y or t.hour == Z) and (t.min ==N) and (t.sec <= 2)
and ((D == nil) or (t.wday == D))) then
minetest.chat_send_all("SHUTTING SERVER DOWN NOW!"
.." Please come back in a minute.")
minetest.chat_send_all("SHUTTING SERVER DOWN NOW!"
.." Please come back in a minute.")
minetest.chat_send_all("SHUTTING SERVER DOWN NOW!"
.." Please come back in a minute.")
minetest.chat_send_all("SHUTTING SERVER DOWN NOW!"
.." Please come back in a minute.")
minetest.chat_send_all("SHUTTING SERVER DOWN NOW!"
.." Please come back in a minute.")
minetest.after(2, minetest.request_shutdown)
end
end)
]]
--MAPFIX CODE
minetest.register_chatcommand("mapfix", {
params = "<size>",
description = "Recalculate the flowing liquids of a chunk",
func = function(name, param)
local pos = minetest.get_player_by_name(name):getpos()
local size = tonumber(param) or 40
if size > 50 and not minetest.check_player_privs(name, {server=true}) then
return false, "You need the server privilege to exceed the radius of 50 blocks"
end
local minp, maxp = {x = math.floor(pos.x - size), y = math.floor(pos.y - size), z = math.floor(pos.z - size)}, {x = math.ceil(pos.x + size), y = math.ceil(pos.y + size), z = math.ceil(pos.z + size)}
local vm = minetest.get_voxel_manip()
vm:read_from_map(minp, maxp)
vm:calc_lighting()
vm:update_liquids()
vm:write_to_map()
vm:update_map()
return true, "Done."
end,
})

Binary file not shown.

After

(image error) Size: 171 B

BIN
textures/admin_tnt_side.png Normal file

Binary file not shown.

After

(image error) Size: 235 B

BIN
textures/admin_tnt_top.png Normal file

Binary file not shown.

After

(image error) Size: 282 B

Binary file not shown.

After

(image error) Size: 213 B

Binary file not shown.

After

(image error) Size: 380 B

Binary file not shown.

After

(image error) Size: 610 B

Binary file not shown.

After

(image error) Size: 882 B

Binary file not shown.

After

(image error) Size: 335 B

Binary file not shown.

After

(image error) Size: 388 B

Binary file not shown.

After

(image error) Size: 128 B

Binary file not shown.

After

(image error) Size: 258 B

BIN
textures/light.png Normal file

Binary file not shown.

After

(image error) Size: 143 B

BIN
textures/treeprop.png Normal file

Binary file not shown.

After

(image error) Size: 403 B

28
thaw.lua Normal file

@ -0,0 +1,28 @@
-- mods/jt_mods/thaw.lua
--Just Test Mods created by maikerumine
--inspired by Andrey "lag01" the creator of the original Just Test server.
-- Minetest 0.4.14 mod: "jt_mods"
-- namespace: jt_mods
--https://github.com/maikerumine
--License:
--~~~~~~~~
--Code:
--(c) Copyright 2016 maikerumine; modified zlib-License
--see "LICENSE.txt" for details.
--Media(if not stated differently):
--(c) Copyright (2014-2016) maikerumine; CC-BY-SA 3.0
-- melt lag_ice around light sources
minetest.register_abm({
nodenames = {"jt_mods:lag_ice"},
interval = 30,
chance = 10,
action = function(pos, node, active_object_count, active_object_count_wider)
if node.name == "jt_mods:lag_ice" then
minetest.set_node(pos, {name="default:water_source"})
end
--end
end,
})

45
tools.lua Normal file

@ -0,0 +1,45 @@
-- mods/jt_mods/tools.lua
--Just Test Mods created by maikerumine
--inspired by Andrey "lag01" the creator of the original Just Test server.
-- Minetest 0.4.14 mod: "jt_mods"
-- namespace: jt_mods
--https://github.com/maikerumine
--License:
--~~~~~~~~
--Code:
--(c) Copyright 2016 maikerumine; modified zlib-License
--see "LICENSE.txt" for details.
--Media(if not stated differently):
--(c) Copyright (2014-2016) maikerumine; CC-BY-SA 3.0
minetest.register_tool("jt_mods:pick_obsidian", {
description = "Obsidian Pickaxe",
inventory_image = "jt_mods_tool_obsidianpick.png",
tool_capabilities = {
full_punch_interval = 0.1,
max_drop_level=3,
groupcaps={
cracky = {times={[1]=0.3, [2]=0.2, [3]=0.05}, uses=3, maxlevel=3},
},
damage_groups = {fleshy=6},
},
})
minetest.register_tool("jt_mods:pick_admin", {
description = "ADMIN Obsidian Pickaxe",
inventory_image = "jt_mods_tool_obsidianpick.png",
tool_capabilities = {
full_punch_interval = 0.1,
max_drop_level=3,
groupcaps={
cracky = {times={[1]=0.3, [2]=0.2, [3]=0.05}, uses=3000, maxlevel=3},
crumbly = {times={[1]=0.3, [2]=0.2, [3]=0.05}, uses=3000, maxlevel=3},
snappy = {times={[1]=0.3, [2]=0.2, [3]=0.05}, uses=3000, maxlevel=3},
},
damage_groups = {fleshy=60},
},
})