Compare commits
3 Commits
master
...
add_clearm
Author | SHA1 | Date |
---|---|---|
cora | 23c9c7b652 | |
cora | ce315d0726 | |
cora | d07f92b09a |
|
@ -418,11 +418,7 @@ minetest.register_entity(":__builtin:item", {
|
||||||
end
|
end
|
||||||
local stack = ItemStack(itemstring)
|
local stack = ItemStack(itemstring)
|
||||||
if minetest.get_item_group(stack:get_name(), "compass") > 0 then
|
if minetest.get_item_group(stack:get_name(), "compass") > 0 then
|
||||||
if string.find(stack:get_name(), "_lodestone") then
|
stack:set_name("mcl_compass:16")
|
||||||
stack:set_name("mcl_compass:18_lodestone")
|
|
||||||
else
|
|
||||||
stack:set_name("mcl_compass:18")
|
|
||||||
end
|
|
||||||
itemstring = stack:to_string()
|
itemstring = stack:to_string()
|
||||||
self.itemstring = itemstring
|
self.itemstring = itemstring
|
||||||
end
|
end
|
||||||
|
|
|
@ -101,6 +101,29 @@ local mod_worlds = minetest.get_modpath("mcl_worlds") ~= nil
|
||||||
local mod_armor = minetest.get_modpath("mcl_armor") ~= nil
|
local mod_armor = minetest.get_modpath("mcl_armor") ~= nil
|
||||||
local mod_experience = minetest.get_modpath("mcl_experience") ~= nil
|
local mod_experience = minetest.get_modpath("mcl_experience") ~= nil
|
||||||
|
|
||||||
|
--Helper function to clear all mobs because /clearobjects removes too much
|
||||||
|
local function is_mob(o)
|
||||||
|
return o.type == "ambient" or o.type == "animal" or o.type == "monster" or o.type == "npc"
|
||||||
|
end
|
||||||
|
minetest.register_chatcommand("clearmobs",{
|
||||||
|
privs={maphack=true},
|
||||||
|
params = "<all>|<nametagged>|<range>",
|
||||||
|
description=S("Removes all spawned mobs except nametagged and tamed ones. all removes all mobs, nametagged only nametagged ones and with the range paramter all mobs in a distance of the current player are removed."),
|
||||||
|
func=function(n,param)
|
||||||
|
local p = minetest.get_player_by_name(n)
|
||||||
|
local num=tonumber(param)
|
||||||
|
for _,o in pairs(minetest.luaentities) do
|
||||||
|
if is_mob(o) then
|
||||||
|
if param == "all" or
|
||||||
|
( param == "nametagged" and o.nametag ) or
|
||||||
|
( param == "" and not o.nametag and not o.tamed ) or
|
||||||
|
( num and num > 0 and vector.distance(p:get_pos(),o.object:get_pos()) <= num ) then
|
||||||
|
o.object:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end})
|
||||||
|
|
||||||
----For Water Flowing:
|
----For Water Flowing:
|
||||||
local enable_physics = function(object, luaentity, ignore_check)
|
local enable_physics = function(object, luaentity, ignore_check)
|
||||||
if luaentity.physical_state == false or ignore_check == true then
|
if luaentity.physical_state == false or ignore_check == true then
|
||||||
|
|
|
@ -1,204 +1,180 @@
|
||||||
--lua locals
|
--lua locals
|
||||||
local get_node = minetest.get_node
|
local get_node = minetest.get_node
|
||||||
local get_item_group = minetest.get_item_group
|
local get_item_group = minetest.get_item_group
|
||||||
local get_node_light = minetest.get_node_light
|
local get_node_light = minetest.get_node_light
|
||||||
local find_nodes_in_area_under_air = minetest.find_nodes_in_area_under_air
|
local find_nodes_in_area_under_air = minetest.find_nodes_in_area_under_air
|
||||||
local get_biome_name = minetest.get_biome_name
|
local new_vector = vector.new
|
||||||
local get_objects_inside_radius = minetest.get_objects_inside_radius
|
|
||||||
local get_connected_players = minetest.get_connected_players
|
|
||||||
local minetest_get_perlin = minetest.get_perlin
|
|
||||||
|
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
local math_floor = math.floor
|
local get_biome_name = minetest.get_biome_name
|
||||||
local math_ceil = math.ceil
|
local max = math.max
|
||||||
local math_cos = math.cos
|
local get_objects_inside_radius = minetest.get_objects_inside_radius
|
||||||
local math_sin = math.sin
|
local vector_distance = vector.distance
|
||||||
local math_round = function(x) return (x > 0) and math_floor(x + 0.5) or math_ceil(x - 0.5) end
|
|
||||||
|
|
||||||
--local vector_distance = vector.distance
|
|
||||||
local vector_new = vector.new
|
|
||||||
local vector_floor = vector.floor
|
|
||||||
|
|
||||||
local table_copy = table.copy
|
|
||||||
local table_remove = table.remove
|
|
||||||
|
|
||||||
local pairs = pairs
|
|
||||||
|
|
||||||
-- range for mob count
|
-- range for mob count
|
||||||
local aoc_range = 32
|
local aoc_range = 32
|
||||||
|
--[[
|
||||||
|
|
||||||
|
THIS IS THE BIG LIST OF ALL BIOMES - used for programming/updating mobs
|
||||||
|
|
||||||
|
underground:
|
||||||
|
"FlowerForest_underground",
|
||||||
|
"JungleEdge_underground",local spawning_position = spawning_position_list[math.random(1,#spawning_position_list)]
|
||||||
|
"ColdTaiga_underground",
|
||||||
|
"IcePlains_underground",
|
||||||
|
"IcePlainsSpikes_underground",
|
||||||
|
"MegaTaiga_underground",
|
||||||
|
"Taiga_underground",
|
||||||
|
"ExtremeHills+_underground",
|
||||||
|
"JungleM_underground",
|
||||||
|
"ExtremeHillsM_underground",
|
||||||
|
"JungleEdgeM_underground",
|
||||||
|
|
||||||
|
ocean:
|
||||||
|
"RoofedForest_ocean",
|
||||||
|
"JungleEdgeM_ocean",
|
||||||
|
"BirchForestM_ocean",
|
||||||
|
"BirchForest_ocean",
|
||||||
|
"IcePlains_deep_ocean",
|
||||||
|
"Jungle_deep_ocean",
|
||||||
|
"Savanna_ocean",
|
||||||
|
"MesaPlateauF_ocean",
|
||||||
|
"ExtremeHillsM_deep_ocean",
|
||||||
|
"Savanna_deep_ocean",
|
||||||
|
"SunflowerPlains_ocean",
|
||||||
|
"Swampland_deep_ocean",
|
||||||
|
"Swampland_ocean",
|
||||||
|
"MegaSpruceTaiga_deep_ocean",
|
||||||
|
"ExtremeHillsM_ocean",
|
||||||
|
"JungleEdgeM_deep_ocean",
|
||||||
|
"SunflowerPlains_deep_ocean",
|
||||||
|
"BirchForest_deep_ocean",
|
||||||
|
"IcePlainsSpikes_ocean",
|
||||||
|
"Mesa_ocean",
|
||||||
|
"StoneBeach_ocean",
|
||||||
|
"Plains_deep_ocean",
|
||||||
|
"JungleEdge_deep_ocean",
|
||||||
|
"SavannaM_deep_ocean",
|
||||||
|
"Desert_deep_ocean",
|
||||||
|
"Mesa_deep_ocean",
|
||||||
|
"ColdTaiga_deep_ocean",
|
||||||
|
"Plains_ocean",
|
||||||
|
"MesaPlateauFM_ocean",
|
||||||
|
"Forest_deep_ocean",
|
||||||
|
"JungleM_deep_ocean",
|
||||||
|
"FlowerForest_deep_ocean",
|
||||||
|
"MushroomIsland_ocean",
|
||||||
|
"MegaTaiga_ocean",
|
||||||
|
"StoneBeach_deep_ocean",
|
||||||
|
"IcePlainsSpikes_deep_ocean",
|
||||||
|
"ColdTaiga_ocean",
|
||||||
|
"SavannaM_ocean",
|
||||||
|
"MesaPlateauF_deep_ocean",
|
||||||
|
"MesaBryce_deep_ocean",
|
||||||
|
"ExtremeHills+_deep_ocean",
|
||||||
|
"ExtremeHills_ocean",
|
||||||
|
"MushroomIsland_deep_ocean",
|
||||||
|
"Forest_ocean",
|
||||||
|
"MegaTaiga_deep_ocean",
|
||||||
|
"JungleEdge_ocean",
|
||||||
|
"MesaBryce_ocean",
|
||||||
|
"MegaSpruceTaiga_ocean",
|
||||||
|
"ExtremeHills+_ocean",
|
||||||
|
"Jungle_ocean",
|
||||||
|
"RoofedForest_deep_ocean",
|
||||||
|
"IcePlains_ocean",
|
||||||
|
"FlowerForest_ocean",
|
||||||
|
"ExtremeHills_deep_ocean",
|
||||||
|
"MesaPlateauFM_deep_ocean",
|
||||||
|
"Desert_ocean",
|
||||||
|
"Taiga_ocean",
|
||||||
|
"BirchForestM_deep_ocean",
|
||||||
|
"Taiga_deep_ocean",
|
||||||
|
"JungleM_ocean",
|
||||||
|
|
||||||
|
water or beach?
|
||||||
|
"MesaPlateauFM_sandlevel",
|
||||||
|
"MesaPlateauF_sandlevel",
|
||||||
|
"MesaBryce_sandlevel",
|
||||||
|
"Mesa_sandlevel",
|
||||||
|
|
||||||
|
beach:
|
||||||
|
"FlowerForest_beach",
|
||||||
|
"Forest_beach",
|
||||||
|
"StoneBeach",
|
||||||
|
"ColdTaiga_beach_water",
|
||||||
|
"Taiga_beach",
|
||||||
|
"Savanna_beach",
|
||||||
|
"Plains_beach",
|
||||||
|
"ExtremeHills_beach",
|
||||||
|
"ColdTaiga_beach",
|
||||||
|
"Swampland_shore",
|
||||||
|
"MushroomIslandShore",
|
||||||
|
"JungleM_shore",
|
||||||
|
"Jungle_shore",
|
||||||
|
|
||||||
|
dimension biome:
|
||||||
|
"Nether",
|
||||||
|
"End",
|
||||||
|
|
||||||
|
Overworld regular:
|
||||||
|
"Mesa",
|
||||||
|
"FlowerForest",
|
||||||
|
"Swampland",
|
||||||
|
"Taiga",
|
||||||
|
"ExtremeHills",
|
||||||
|
"Jungle",
|
||||||
|
"Savanna",
|
||||||
|
"BirchForest",
|
||||||
|
"MegaSpruceTaiga",
|
||||||
|
"MegaTaiga",
|
||||||
|
"ExtremeHills+",
|
||||||
|
"Forest",
|
||||||
|
"Plains",
|
||||||
|
"Desert",
|
||||||
|
"ColdTaiga",
|
||||||
|
"MushroomIsland",
|
||||||
|
"IcePlainsSpikes",
|
||||||
|
"SunflowerPlains",
|
||||||
|
"IcePlains",
|
||||||
|
"RoofedForest",
|
||||||
|
"ExtremeHills+_snowtop",
|
||||||
|
"MesaPlateauFM_grasstop",
|
||||||
|
"JungleEdgeM",
|
||||||
|
"ExtremeHillsM",
|
||||||
|
"JungleM",
|
||||||
|
"BirchForestM",
|
||||||
|
"MesaPlateauF",
|
||||||
|
"MesaPlateauFM",
|
||||||
|
"MesaPlateauF_grasstop",
|
||||||
|
"MesaBryce",
|
||||||
|
"JungleEdge",
|
||||||
|
"SavannaM",
|
||||||
|
]]--
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--do mobs spawn?
|
|
||||||
local mobs_spawn = minetest.settings:get_bool("mobs_spawn", true) ~= false
|
local mobs_spawn = minetest.settings:get_bool("mobs_spawn", true) ~= false
|
||||||
|
-- count how many mobs of one type are inside an area
|
||||||
|
|
||||||
|
local count_mobs = function(pos,mobtype)
|
||||||
local noise_params = {
|
|
||||||
offset = 0,
|
|
||||||
scale = 3,
|
|
||||||
spread = {
|
|
||||||
x = 301,
|
|
||||||
y = 50,
|
|
||||||
z = 304,
|
|
||||||
},
|
|
||||||
seed = 100,
|
|
||||||
octaves = 3,
|
|
||||||
persistence = 0.5,
|
|
||||||
}
|
|
||||||
|
|
||||||
-- THIS IS THE BIG LIST OF ALL BIOMES - used for programming/updating mobs
|
|
||||||
-- Also used for missing parameter
|
|
||||||
-- Please update the list when adding new biomes!
|
|
||||||
|
|
||||||
local list_of_all_biomes = {
|
|
||||||
|
|
||||||
-- underground:
|
|
||||||
|
|
||||||
"FlowerForest_underground",
|
|
||||||
"JungleEdge_underground",
|
|
||||||
"ColdTaiga_underground",
|
|
||||||
"IcePlains_underground",
|
|
||||||
"IcePlainsSpikes_underground",
|
|
||||||
"MegaTaiga_underground",
|
|
||||||
"Taiga_underground",
|
|
||||||
"ExtremeHills+_underground",
|
|
||||||
"JungleM_underground",
|
|
||||||
"ExtremeHillsM_underground",
|
|
||||||
"JungleEdgeM_underground",
|
|
||||||
|
|
||||||
-- ocean:
|
|
||||||
|
|
||||||
"RoofedForest_ocean",
|
|
||||||
"JungleEdgeM_ocean",
|
|
||||||
"BirchForestM_ocean",
|
|
||||||
"BirchForest_ocean",
|
|
||||||
"IcePlains_deep_ocean",
|
|
||||||
"Jungle_deep_ocean",
|
|
||||||
"Savanna_ocean",
|
|
||||||
"MesaPlateauF_ocean",
|
|
||||||
"ExtremeHillsM_deep_ocean",
|
|
||||||
"Savanna_deep_ocean",
|
|
||||||
"SunflowerPlains_ocean",
|
|
||||||
"Swampland_deep_ocean",
|
|
||||||
"Swampland_ocean",
|
|
||||||
"MegaSpruceTaiga_deep_ocean",
|
|
||||||
"ExtremeHillsM_ocean",
|
|
||||||
"JungleEdgeM_deep_ocean",
|
|
||||||
"SunflowerPlains_deep_ocean",
|
|
||||||
"BirchForest_deep_ocean",
|
|
||||||
"IcePlainsSpikes_ocean",
|
|
||||||
"Mesa_ocean",
|
|
||||||
"StoneBeach_ocean",
|
|
||||||
"Plains_deep_ocean",
|
|
||||||
"JungleEdge_deep_ocean",
|
|
||||||
"SavannaM_deep_ocean",
|
|
||||||
"Desert_deep_ocean",
|
|
||||||
"Mesa_deep_ocean",
|
|
||||||
"ColdTaiga_deep_ocean",
|
|
||||||
"Plains_ocean",
|
|
||||||
"MesaPlateauFM_ocean",
|
|
||||||
"Forest_deep_ocean",
|
|
||||||
"JungleM_deep_ocean",
|
|
||||||
"FlowerForest_deep_ocean",
|
|
||||||
"MushroomIsland_ocean",
|
|
||||||
"MegaTaiga_ocean",
|
|
||||||
"StoneBeach_deep_ocean",
|
|
||||||
"IcePlainsSpikes_deep_ocean",
|
|
||||||
"ColdTaiga_ocean",
|
|
||||||
"SavannaM_ocean",
|
|
||||||
"MesaPlateauF_deep_ocean",
|
|
||||||
"MesaBryce_deep_ocean",
|
|
||||||
"ExtremeHills+_deep_ocean",
|
|
||||||
"ExtremeHills_ocean",
|
|
||||||
"MushroomIsland_deep_ocean",
|
|
||||||
"Forest_ocean",
|
|
||||||
"MegaTaiga_deep_ocean",
|
|
||||||
"JungleEdge_ocean",
|
|
||||||
"MesaBryce_ocean",
|
|
||||||
"MegaSpruceTaiga_ocean",
|
|
||||||
"ExtremeHills+_ocean",
|
|
||||||
"Jungle_ocean",
|
|
||||||
"RoofedForest_deep_ocean",
|
|
||||||
"IcePlains_ocean",
|
|
||||||
"FlowerForest_ocean",
|
|
||||||
"ExtremeHills_deep_ocean",
|
|
||||||
"MesaPlateauFM_deep_ocean",
|
|
||||||
"Desert_ocean",
|
|
||||||
"Taiga_ocean",
|
|
||||||
"BirchForestM_deep_ocean",
|
|
||||||
"Taiga_deep_ocean",
|
|
||||||
"JungleM_ocean",
|
|
||||||
|
|
||||||
-- water or beach?
|
|
||||||
|
|
||||||
"MesaPlateauFM_sandlevel",
|
|
||||||
"MesaPlateauF_sandlevel",
|
|
||||||
"MesaBryce_sandlevel",
|
|
||||||
"Mesa_sandlevel",
|
|
||||||
|
|
||||||
-- beach:
|
|
||||||
|
|
||||||
"FlowerForest_beach",
|
|
||||||
"Forest_beach",
|
|
||||||
"StoneBeach",
|
|
||||||
"ColdTaiga_beach_water",
|
|
||||||
"Taiga_beach",
|
|
||||||
"Savanna_beach",
|
|
||||||
"Plains_beach",
|
|
||||||
"ExtremeHills_beach",
|
|
||||||
"ColdTaiga_beach",
|
|
||||||
"Swampland_shore",
|
|
||||||
"MushroomIslandShore",
|
|
||||||
"JungleM_shore",
|
|
||||||
"Jungle_shore",
|
|
||||||
|
|
||||||
-- dimension biome:
|
|
||||||
|
|
||||||
"Nether",
|
|
||||||
"End",
|
|
||||||
|
|
||||||
-- Overworld regular:
|
|
||||||
|
|
||||||
"Mesa",
|
|
||||||
"FlowerForest",
|
|
||||||
"Swampland",
|
|
||||||
"Taiga",
|
|
||||||
"ExtremeHills",
|
|
||||||
"Jungle",
|
|
||||||
"Savanna",
|
|
||||||
"BirchForest",
|
|
||||||
"MegaSpruceTaiga",
|
|
||||||
"MegaTaiga",
|
|
||||||
"ExtremeHills+",
|
|
||||||
"Forest",
|
|
||||||
"Plains",
|
|
||||||
"Desert",
|
|
||||||
"ColdTaiga",
|
|
||||||
"MushroomIsland",
|
|
||||||
"IcePlainsSpikes",
|
|
||||||
"SunflowerPlains",
|
|
||||||
"IcePlains",
|
|
||||||
"RoofedForest",
|
|
||||||
"ExtremeHills+_snowtop",
|
|
||||||
"MesaPlateauFM_grasstop",
|
|
||||||
"JungleEdgeM",
|
|
||||||
"ExtremeHillsM",
|
|
||||||
"JungleM",
|
|
||||||
"BirchForestM",
|
|
||||||
"MesaPlateauF",
|
|
||||||
"MesaPlateauFM",
|
|
||||||
"MesaPlateauF_grasstop",
|
|
||||||
"MesaBryce",
|
|
||||||
"JungleEdge",
|
|
||||||
"SavannaM",
|
|
||||||
}
|
|
||||||
|
|
||||||
-- count how many mobs are in an area
|
|
||||||
local function count_mobs(pos)
|
|
||||||
local num = 0
|
local num = 0
|
||||||
for _,object in pairs(get_objects_inside_radius(pos, aoc_range)) do
|
local objs = get_objects_inside_radius(pos, aoc_range)
|
||||||
if object and object:get_luaentity() and object:get_luaentity()._cmi_is_mob then
|
for n = 1, #objs do
|
||||||
num = num + 1
|
local obj = objs[n]:get_luaentity()
|
||||||
|
if obj and obj.name and obj._cmi_is_mob then
|
||||||
|
-- count hostile mobs only
|
||||||
|
if mobtype == "hostile" then
|
||||||
|
if obj.spawn_class == "hostile" then
|
||||||
|
num = num + 1
|
||||||
|
end
|
||||||
|
-- count passive mobs only
|
||||||
|
else
|
||||||
|
num = num + 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return num
|
return num
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -239,73 +215,11 @@ WARNING: BIOME INTEGRATION NEEDED -> How to get biome through lua??
|
||||||
|
|
||||||
--this is where all of the spawning information is kept
|
--this is where all of the spawning information is kept
|
||||||
local spawn_dictionary = {}
|
local spawn_dictionary = {}
|
||||||
local summary_chance = 0
|
|
||||||
|
|
||||||
function mobs:spawn_setup(def)
|
|
||||||
if not mobs_spawn then return end
|
|
||||||
|
|
||||||
if not def then
|
|
||||||
minetest.log("warning", "Empty mob spawn setup definition")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local name = def.name
|
|
||||||
if not name then
|
|
||||||
minetest.log("warning", "Missing mob name")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local dimension = def.dimension or "overworld"
|
|
||||||
local type_of_spawning = def.type_of_spawning or "ground"
|
|
||||||
local biomes = def.biomes or list_of_all_biomes
|
|
||||||
local min_light = def.min_light or 0
|
|
||||||
local max_light = def.max_light or (minetest.LIGHT_MAX + 1)
|
|
||||||
local chance = def.chance or 1000
|
|
||||||
local aoc = def.aoc or aoc_range
|
|
||||||
local min_height = def.min_height or mcl_mapgen.overworld.min
|
|
||||||
local max_height = def.max_height or mcl_mapgen.overworld.max
|
|
||||||
local day_toggle = def.day_toggle
|
|
||||||
local on_spawn = def.on_spawn
|
|
||||||
local check_position = def.check_position
|
|
||||||
|
|
||||||
-- chance/spawn number override in minetest.conf for registered mob
|
|
||||||
local numbers = minetest.settings:get(name)
|
|
||||||
if numbers then
|
|
||||||
numbers = numbers:split(",")
|
|
||||||
chance = tonumber(numbers[1]) or chance
|
|
||||||
aoc = tonumber(numbers[2]) or aoc
|
|
||||||
if chance == 0 then
|
|
||||||
minetest.log("warning", string.format("[mobs] %s has spawning disabled", name))
|
|
||||||
return
|
|
||||||
end
|
|
||||||
minetest.log("action", string.format("[mobs] Chance setting for %s changed to %s (total: %s)", name, chance, aoc))
|
|
||||||
end
|
|
||||||
|
|
||||||
if chance < 1 then
|
|
||||||
chance = 1
|
|
||||||
minetest.log("warning", "Chance shouldn't be less than 1 (mob name: " .. name ..")")
|
|
||||||
end
|
|
||||||
|
|
||||||
spawn_dictionary[#spawn_dictionary + 1] = {
|
|
||||||
name = name,
|
|
||||||
dimension = dimension,
|
|
||||||
type_of_spawning = type_of_spawning,
|
|
||||||
biomes = biomes,
|
|
||||||
min_light = min_light,
|
|
||||||
max_light = max_light,
|
|
||||||
chance = chance,
|
|
||||||
aoc = aoc,
|
|
||||||
min_height = min_height,
|
|
||||||
max_height = max_height,
|
|
||||||
day_toggle = day_toggle,
|
|
||||||
check_position = check_position,
|
|
||||||
on_spawn = on_spawn,
|
|
||||||
}
|
|
||||||
summary_chance = summary_chance + chance
|
|
||||||
end
|
|
||||||
|
|
||||||
function mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_light, max_light, interval, chance, aoc, min_height, max_height, day_toggle, on_spawn)
|
function mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_light, max_light, interval, chance, aoc, min_height, max_height, day_toggle, on_spawn)
|
||||||
|
|
||||||
|
--print(dump(biomes))
|
||||||
|
|
||||||
-- Do mobs spawn at all?
|
-- Do mobs spawn at all?
|
||||||
if not mobs_spawn then
|
if not mobs_spawn then
|
||||||
return
|
return
|
||||||
|
@ -324,7 +238,180 @@ function mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_ligh
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.log("action", string.format("[mobs] Chance setting for %s changed to %s (total: %s)", name, chance, aoc))
|
minetest.log("action",
|
||||||
|
string.format("[mobs] Chance setting for %s changed to %s (total: %s)", name, chance, aoc))
|
||||||
|
end
|
||||||
|
|
||||||
|
--[[
|
||||||
|
local spawn_action
|
||||||
|
spawn_action = function(pos, node, active_object_count, active_object_count_wider, name)
|
||||||
|
|
||||||
|
local orig_pos = table.copy(pos)
|
||||||
|
-- is mob actually registered?
|
||||||
|
if not mobs.spawning_mobs[name]
|
||||||
|
or not minetest.registered_entities[name] then
|
||||||
|
minetest.log("warning", "Mob spawn of "..name.." failed, unknown entity or mob is not registered for spawning!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- additional custom checks for spawning mob
|
||||||
|
if mobs:spawn_abm_check(pos, node, name) == true then
|
||||||
|
minetest.log("info", "Mob spawn of "..name.." at "..minetest.pos_to_string(pos).." failed, ABM check rejected!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- count nearby mobs in same spawn class
|
||||||
|
local entdef = minetest.registered_entities[name]
|
||||||
|
local spawn_class = entdef and entdef.spawn_class
|
||||||
|
if not spawn_class then
|
||||||
|
if entdef.type == "monster" then
|
||||||
|
spawn_class = "hostile"
|
||||||
|
else
|
||||||
|
spawn_class = "passive"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local in_class_cap = count_mobs(pos, "!"..spawn_class) < MOB_CAP[spawn_class]
|
||||||
|
-- do not spawn if too many of same mob in area
|
||||||
|
if active_object_count_wider >= max_per_block -- large-range mob cap
|
||||||
|
or (not in_class_cap) -- spawn class mob cap
|
||||||
|
or count_mobs(pos, name) >= aoc then -- per-mob mob cap
|
||||||
|
-- too many entities
|
||||||
|
minetest.log("info", "Mob spawn of "..name.." at "..minetest.pos_to_string(pos).." failed, too crowded!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- if toggle set to nil then ignore day/night check
|
||||||
|
if day_toggle ~= nil then
|
||||||
|
|
||||||
|
local tod = (minetest.get_timeofday() or 0) * 24000
|
||||||
|
|
||||||
|
if tod > 4500 and tod < 19500 then
|
||||||
|
-- daylight, but mob wants night
|
||||||
|
if day_toggle == false then
|
||||||
|
-- mob needs night
|
||||||
|
minetest.log("info", "Mob spawn of "..name.." at "..minetest.pos_to_string(pos).." failed, mob needs light!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
else
|
||||||
|
-- night time but mob wants day
|
||||||
|
if day_toggle == true then
|
||||||
|
-- mob needs day
|
||||||
|
minetest.log("info", "Mob spawn of "..name.." at "..minetest.pos_to_string(pos).." failed, mob needs daylight!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- spawn above node
|
||||||
|
pos.y = pos.y + 1
|
||||||
|
|
||||||
|
-- only spawn away from player
|
||||||
|
local objs = minetest.get_objects_inside_radius(pos, 24)
|
||||||
|
|
||||||
|
for n = 1, #objs do
|
||||||
|
|
||||||
|
if objs[n]:is_player() then
|
||||||
|
-- player too close
|
||||||
|
minetest.log("info", "Mob spawn of "..name.." at "..minetest.pos_to_string(pos).." failed, player too close!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- mobs cannot spawn in protected areas when enabled
|
||||||
|
if not spawn_protected
|
||||||
|
and minetest.is_protected(pos, "") then
|
||||||
|
minetest.log("info", "Mob spawn of "..name.." at "..minetest.pos_to_string(pos).." failed, position is protected!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- are we spawning within height limits?
|
||||||
|
if pos.y > max_height
|
||||||
|
or pos.y < min_height then
|
||||||
|
minetest.log("info", "Mob spawn of "..name.." at "..minetest.pos_to_string(pos).." failed, out of height limit!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- are light levels ok?
|
||||||
|
local light = minetest.get_node_light(pos)
|
||||||
|
if not light
|
||||||
|
or light > max_light
|
||||||
|
or light < min_light then
|
||||||
|
minetest.log("info", "Mob spawn of "..name.." at "..minetest.pos_to_string(pos).." failed, bad light!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- do we have enough space to spawn mob?
|
||||||
|
local ent = minetest.registered_entities[name]
|
||||||
|
local width_x = max(1, math.ceil(ent.collisionbox[4] - ent.collisionbox[1]))
|
||||||
|
local min_x, max_x
|
||||||
|
if width_x % 2 == 0 then
|
||||||
|
max_x = math.floor(width_x/2)
|
||||||
|
min_x = -(max_x-1)
|
||||||
|
else
|
||||||
|
max_x = math.floor(width_x/2)
|
||||||
|
min_x = -max_x
|
||||||
|
end
|
||||||
|
|
||||||
|
local width_z = max(1, math.ceil(ent.collisionbox[6] - ent.collisionbox[3]))
|
||||||
|
local min_z, max_z
|
||||||
|
if width_z % 2 == 0 then
|
||||||
|
max_z = math.floor(width_z/2)
|
||||||
|
min_z = -(max_z-1)
|
||||||
|
else
|
||||||
|
max_z = math.floor(width_z/2)
|
||||||
|
min_z = -max_z
|
||||||
|
end
|
||||||
|
|
||||||
|
local max_y = max(0, math.ceil(ent.collisionbox[5] - ent.collisionbox[2]) - 1)
|
||||||
|
|
||||||
|
for y = 0, max_y do
|
||||||
|
for x = min_x, max_x do
|
||||||
|
for z = min_z, max_z do
|
||||||
|
local pos2 = {x = pos.x+x, y = pos.y+y, z = pos.z+z}
|
||||||
|
if minetest.registered_nodes[node_ok(pos2).name].walkable == true then
|
||||||
|
-- inside block
|
||||||
|
minetest.log("info", "Mob spawn of "..name.." at "..minetest.pos_to_string(pos).." failed, too little space!")
|
||||||
|
if ent.spawn_small_alternative ~= nil and (not minetest.registered_nodes[node_ok(pos).name].walkable) then
|
||||||
|
minetest.log("info", "Trying to spawn smaller alternative mob: "..ent.spawn_small_alternative)
|
||||||
|
spawn_action(orig_pos, node, active_object_count, active_object_count_wider, ent.spawn_small_alternative)
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- tweak X/Y/Z spawn pos
|
||||||
|
if width_x % 2 == 0 then
|
||||||
|
pos.x = pos.x + 0.5
|
||||||
|
end
|
||||||
|
if width_z % 2 == 0 then
|
||||||
|
pos.z = pos.z + 0.5
|
||||||
|
end
|
||||||
|
pos.y = pos.y - 0.5
|
||||||
|
|
||||||
|
local mob = minetest.add_entity(pos, name)
|
||||||
|
minetest.log("action", "Mob spawned: "..name.." at "..minetest.pos_to_string(pos))
|
||||||
|
|
||||||
|
if on_spawn then
|
||||||
|
|
||||||
|
local ent = mob:get_luaentity()
|
||||||
|
|
||||||
|
on_spawn(ent, pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function spawn_abm_action(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
spawn_action(pos, node, active_object_count, active_object_count_wider, name)
|
||||||
|
end
|
||||||
|
]]--
|
||||||
|
|
||||||
|
local entdef = minetest.registered_entities[name]
|
||||||
|
local spawn_class
|
||||||
|
if entdef.type == "monster" then
|
||||||
|
spawn_class = "hostile"
|
||||||
|
else
|
||||||
|
spawn_class = "passive"
|
||||||
end
|
end
|
||||||
|
|
||||||
--load information into the spawn dictionary
|
--load information into the spawn dictionary
|
||||||
|
@ -336,34 +423,106 @@ function mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_ligh
|
||||||
spawn_dictionary[key]["biomes"] = biomes
|
spawn_dictionary[key]["biomes"] = biomes
|
||||||
spawn_dictionary[key]["min_light"] = min_light
|
spawn_dictionary[key]["min_light"] = min_light
|
||||||
spawn_dictionary[key]["max_light"] = max_light
|
spawn_dictionary[key]["max_light"] = max_light
|
||||||
|
spawn_dictionary[key]["interval"] = interval
|
||||||
spawn_dictionary[key]["chance"] = chance
|
spawn_dictionary[key]["chance"] = chance
|
||||||
spawn_dictionary[key]["aoc"] = aoc
|
spawn_dictionary[key]["aoc"] = aoc
|
||||||
spawn_dictionary[key]["min_height"] = min_height
|
spawn_dictionary[key]["min_height"] = min_height
|
||||||
spawn_dictionary[key]["max_height"] = max_height
|
spawn_dictionary[key]["max_height"] = max_height
|
||||||
spawn_dictionary[key]["day_toggle"] = day_toggle
|
spawn_dictionary[key]["day_toggle"] = day_toggle
|
||||||
|
--spawn_dictionary[key]["on_spawn"] = spawn_abm_action
|
||||||
|
spawn_dictionary[key]["spawn_class"] = spawn_class
|
||||||
|
|
||||||
summary_chance = summary_chance + chance
|
--[[
|
||||||
|
minetest.register_abm({
|
||||||
|
label = name .. " spawning",
|
||||||
|
nodenames = nodes,
|
||||||
|
neighbors = neighbors,
|
||||||
|
interval = interval,
|
||||||
|
chance = floor(max(1, chance * mobs_spawn_chance)),
|
||||||
|
catch_up = false,
|
||||||
|
action = spawn_abm_action,
|
||||||
|
})
|
||||||
|
]]--
|
||||||
end
|
end
|
||||||
|
|
||||||
local two_pi = 2 * math.pi
|
-- compatibility with older mob registration
|
||||||
local function get_next_mob_spawn_pos(pos)
|
-- we're going to forget about this for now -j4i
|
||||||
local distance = math_random(25, 32)
|
--[[
|
||||||
local angle = math_random() * two_pi
|
function mobs:register_spawn(name, nodes, max_light, min_light, chance, active_object_count, max_height, day_toggle)
|
||||||
return {
|
|
||||||
x = math_round(pos.x + distance * math_cos(angle)),
|
mobs:spawn_specific(name, nodes, {"air"}, min_light, max_light, 30,
|
||||||
y = pos.y,
|
chance, active_object_count, -31000, max_height, day_toggle)
|
||||||
z = math_round(pos.z + distance * math_sin(angle))
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
]]--
|
||||||
|
|
||||||
|
|
||||||
|
--Don't disable this yet-j4i
|
||||||
|
-- MarkBu's spawn function
|
||||||
|
|
||||||
|
function mobs:spawn(def)
|
||||||
|
--does nothing for now
|
||||||
|
--[[
|
||||||
|
local name = def.name
|
||||||
|
local nodes = def.nodes or {"group:soil", "group:stone"}
|
||||||
|
local neighbors = def.neighbors or {"air"}
|
||||||
|
local min_light = def.min_light or 0
|
||||||
|
local max_light = def.max_light or 15
|
||||||
|
local interval = def.interval or 30
|
||||||
|
local chance = def.chance or 5000
|
||||||
|
local active_object_count = def.active_object_count or 1
|
||||||
|
local min_height = def.min_height or -31000
|
||||||
|
local max_height = def.max_height or 31000
|
||||||
|
local day_toggle = def.day_toggle
|
||||||
|
local on_spawn = def.on_spawn
|
||||||
|
|
||||||
|
mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, interval,
|
||||||
|
chance, active_object_count, min_height, max_height, day_toggle, on_spawn)
|
||||||
|
]]--
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local axis
|
||||||
|
--inner and outer part of square donut radius
|
||||||
|
local inner = 1
|
||||||
|
local outer = 65
|
||||||
|
local int = {-1,1}
|
||||||
|
local position_calculation = function(pos)
|
||||||
|
|
||||||
|
pos = vector.floor(pos)
|
||||||
|
|
||||||
|
--this is used to determine the axis buffer from the player
|
||||||
|
axis = math.random(0,1)
|
||||||
|
|
||||||
|
--cast towards the direction
|
||||||
|
if axis == 0 then --x
|
||||||
|
pos.x = pos.x + math.random(inner,outer)*int[math.random(1,2)]
|
||||||
|
pos.z = pos.z + math.random(-outer,outer)
|
||||||
|
else --z
|
||||||
|
pos.z = pos.z + math.random(inner,outer)*int[math.random(1,2)]
|
||||||
|
pos.x = pos.x + math.random(-outer,outer)
|
||||||
|
end
|
||||||
|
return(pos)
|
||||||
|
end
|
||||||
|
|
||||||
|
--[[
|
||||||
|
local decypher_limits_dictionary = {
|
||||||
|
["overworld"] = {mcl_vars.mg_overworld_min,mcl_vars.mg_overworld_max},
|
||||||
|
["nether"] = {mcl_vars.mg_nether_min, mcl_vars.mg_nether_max},
|
||||||
|
["end"] = {mcl_vars.mg_end_min, mcl_vars.mg_end_max}
|
||||||
|
}
|
||||||
|
]]--
|
||||||
|
|
||||||
local function decypher_limits(posy)
|
local function decypher_limits(posy)
|
||||||
posy = math_floor(posy)
|
--local min_max_table = decypher_limits_dictionary[dimension]
|
||||||
|
--return min_max_table[1],min_max_table[2]
|
||||||
|
posy = math.floor(posy)
|
||||||
return posy - 32, posy + 32
|
return posy - 32, posy + 32
|
||||||
end
|
end
|
||||||
|
|
||||||
--a simple helper function for mob_spawn
|
--a simple helper function for mob_spawn
|
||||||
local function biome_check(biome_list, biome_goal)
|
local function biome_check(biome_list, biome_goal)
|
||||||
for _, data in pairs(biome_list) do
|
for _,data in ipairs(biome_list) do
|
||||||
if data == biome_goal then
|
if data == biome_goal then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -372,111 +531,125 @@ local function biome_check(biome_list, biome_goal)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local function is_farm_animal(n)
|
|
||||||
return n == "mobs_mc:pig" or n == "mobs_mc:cow" or n == "mobs_mc:sheep" or n == "mobs_mc:chicken" or n == "mobs_mc:horse" or n == "mobs_mc:donkey"
|
--todo mob limiting
|
||||||
end
|
--MAIN LOOP
|
||||||
|
|
||||||
if mobs_spawn then
|
if mobs_spawn then
|
||||||
|
|
||||||
local perlin_noise
|
|
||||||
|
|
||||||
local function spawn_a_mob(pos, dimension, y_min, y_max)
|
|
||||||
local dimension = dimension or mcl_worlds.pos_to_dimension(pos)
|
|
||||||
local goal_pos = get_next_mob_spawn_pos(pos)
|
|
||||||
local spawning_position_list = find_nodes_in_area_under_air(
|
|
||||||
{x = goal_pos.x, y = y_min, z = goal_pos.z},
|
|
||||||
{x = goal_pos.x, y = y_max, z = goal_pos.z},
|
|
||||||
{"group:solid", "group:water", "group:lava"}
|
|
||||||
)
|
|
||||||
if #spawning_position_list <= 0 then return end
|
|
||||||
local spawning_position = spawning_position_list[math_random(1, #spawning_position_list)]
|
|
||||||
|
|
||||||
--hard code mob limit in area to 5 for now
|
|
||||||
if count_mobs(spawning_position) >= 5 then return end
|
|
||||||
|
|
||||||
local gotten_node = get_node(spawning_position).name
|
|
||||||
local gotten_biome = minetest.get_biome_data(spawning_position)
|
|
||||||
if not gotten_node or not gotten_biome then return end
|
|
||||||
gotten_biome = get_biome_name(gotten_biome.biome) --makes it easier to work with
|
|
||||||
|
|
||||||
--add this so mobs don't spawn inside nodes
|
|
||||||
spawning_position.y = spawning_position.y + 1
|
|
||||||
|
|
||||||
--only need to poll for node light if everything else worked
|
|
||||||
local gotten_light = get_node_light(spawning_position)
|
|
||||||
|
|
||||||
local is_water = get_item_group(gotten_node, "water") ~= 0
|
|
||||||
local is_lava = get_item_group(gotten_node, "lava") ~= 0
|
|
||||||
local is_ground = not (is_water or is_lava)
|
|
||||||
local is_grass = minetest.get_item_group(gotten_node,"grass_block") ~= 0
|
|
||||||
local has_bed = minetest.find_node_near(pos,25,{"group:bed"})
|
|
||||||
|
|
||||||
if not is_ground then
|
|
||||||
spawning_position.y = spawning_position.y - 1
|
|
||||||
end
|
|
||||||
|
|
||||||
local mob_def
|
|
||||||
|
|
||||||
--create a disconnected clone of the spawn dictionary
|
|
||||||
--prevents memory leak
|
|
||||||
local mob_library_worker_table = table_copy(spawn_dictionary)
|
|
||||||
|
|
||||||
--grab mob that fits into the spawning location
|
|
||||||
--randomly grab a mob, don't exclude any possibilities
|
|
||||||
perlin_noise = perlin_noise or minetest_get_perlin(noise_params)
|
|
||||||
local noise = perlin_noise:get_3d(spawning_position)
|
|
||||||
local current_summary_chance = summary_chance
|
|
||||||
while #mob_library_worker_table > 0 do
|
|
||||||
local mob_chance_offset = (math_round(noise * current_summary_chance + 12345) % current_summary_chance) + 1
|
|
||||||
local mob_index = 1
|
|
||||||
local mob_chance = mob_library_worker_table[mob_index].chance
|
|
||||||
local step_chance = mob_chance
|
|
||||||
while step_chance < mob_chance_offset do
|
|
||||||
mob_index = mob_index + 1
|
|
||||||
mob_chance = mob_library_worker_table[mob_index].chance
|
|
||||||
step_chance = step_chance + mob_chance
|
|
||||||
end
|
|
||||||
local mob_def = mob_library_worker_table[mob_index]
|
|
||||||
local mob_type = minetest.registered_entities[mob_def.name].type
|
|
||||||
if mob_def
|
|
||||||
and spawning_position.y >= mob_def.min_height
|
|
||||||
and spawning_position.y <= mob_def.max_height
|
|
||||||
and mob_def.dimension == dimension
|
|
||||||
and biome_check(mob_def.biomes, gotten_biome)
|
|
||||||
and gotten_light >= mob_def.min_light
|
|
||||||
and gotten_light <= mob_def.max_light
|
|
||||||
and (is_ground or mob_def.type_of_spawning ~= "ground")
|
|
||||||
and (mob_def.check_position and mob_def.check_position(spawning_position) or true)
|
|
||||||
and (not is_farm_animal(mob_def.name) or is_grass)
|
|
||||||
and (mob_type ~= "npc" or has_bed)
|
|
||||||
then
|
|
||||||
--everything is correct, spawn mob
|
|
||||||
local object = minetest.add_entity(spawning_position, mob_def.name)
|
|
||||||
if object then
|
|
||||||
return mob_def.on_spawn and mob_def.on_spawn(object, pos)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
current_summary_chance = current_summary_chance - mob_chance
|
|
||||||
table_remove(mob_library_worker_table, mob_index)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--MAIN LOOP
|
|
||||||
|
|
||||||
local timer = 0
|
local timer = 0
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
timer = timer + dtime
|
timer = timer + dtime
|
||||||
if timer < 10 then return end
|
if timer >= 8 then
|
||||||
timer = 0
|
timer = 0
|
||||||
for _, player in pairs(get_connected_players()) do
|
for _,player in pairs(minetest.get_connected_players()) do
|
||||||
local pos = player:get_pos()
|
for i = 1,math_random(3,8) do
|
||||||
local dimension = mcl_worlds.pos_to_dimension(pos)
|
repeat -- after this line each "break" means "continue"
|
||||||
-- ignore void and unloaded area
|
local player_pos = player:get_pos()
|
||||||
if dimension ~= "void" and dimension ~= "default" then
|
|
||||||
local y_min, y_max = decypher_limits(pos.y)
|
local _,dimension = mcl_worlds.y_to_layer(player_pos.y)
|
||||||
for i = 1, math_random(1, 4) do
|
|
||||||
spawn_a_mob(pos, dimension, y_min, y_max)
|
if dimension == "void" or dimension == "default" then
|
||||||
|
break -- ignore void and unloaded area
|
||||||
|
end
|
||||||
|
|
||||||
|
local min,max = decypher_limits(player_pos.y)
|
||||||
|
|
||||||
|
local goal_pos = position_calculation(player_pos)
|
||||||
|
|
||||||
|
local spawning_position_list = find_nodes_in_area_under_air(new_vector(goal_pos.x,min,goal_pos.z), vector.new(goal_pos.x,max,goal_pos.z), {"group:solid", "group:water", "group:lava"})
|
||||||
|
|
||||||
|
--couldn't find node
|
||||||
|
if #spawning_position_list <= 0 then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
local spawning_position = spawning_position_list[math_random(1,#spawning_position_list)]
|
||||||
|
|
||||||
|
--Prevent strange behavior/too close to player
|
||||||
|
if not spawning_position or vector_distance(player_pos, spawning_position) < 15 then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
local gotten_node = get_node(spawning_position)
|
||||||
|
local gotten_node_name = gotten_node.name
|
||||||
|
local gotten_node_def = minetest.registered_nodes[gotten_node_name]
|
||||||
|
|
||||||
|
if not gotten_node_name or not gotten_node_def or gotten_node_name == "air" then --skip air nodes
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
if gotten_node_def.use_texture_alpha and gotten_node_def.use_texture_alpha ~= "opaque" then
|
||||||
|
break
|
||||||
|
end --don't spawn on nonopaque nodes
|
||||||
|
|
||||||
|
local leaf = minetest.get_item_group(gotten_node_name,"leaves")
|
||||||
|
if leaf ~= 0 then
|
||||||
|
break end --don't spawn on treetops
|
||||||
|
|
||||||
|
local gotten_biome = minetest.get_biome_data(spawning_position)
|
||||||
|
|
||||||
|
if not gotten_biome then
|
||||||
|
break --skip if in unloaded area
|
||||||
|
end
|
||||||
|
|
||||||
|
gotten_biome = get_biome_name(gotten_biome.biome) --makes it easier to work with
|
||||||
|
|
||||||
|
--grab random mob
|
||||||
|
local mob_def = spawn_dictionary[math.random(1,#spawn_dictionary)]
|
||||||
|
|
||||||
|
if not mob_def then
|
||||||
|
break --skip if something ridiculous happens (nil mob def)
|
||||||
|
end
|
||||||
|
|
||||||
|
--skip if not correct dimension
|
||||||
|
if mob_def.dimension ~= dimension then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
--skip if not in correct biome
|
||||||
|
if not biome_check(mob_def.biomes, gotten_biome) then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
--add this so mobs don't spawn inside nodes
|
||||||
|
spawning_position.y = spawning_position.y + 1
|
||||||
|
|
||||||
|
if spawning_position.y < mob_def.min_height or spawning_position.y > mob_def.max_height then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
--only need to poll for node light if everything else worked
|
||||||
|
local gotten_light = get_node_light(spawning_position)
|
||||||
|
|
||||||
|
--don't spawn if not in light limits
|
||||||
|
if gotten_light < mob_def.min_light or gotten_light > mob_def.max_light then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
local is_water = get_item_group(gotten_node_name, "water") ~= 0
|
||||||
|
local is_lava = get_item_group(gotten_node_name, "lava") ~= 0
|
||||||
|
|
||||||
|
if mob_def.type_of_spawning == "ground" and is_water then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
if mob_def.type_of_spawning == "ground" and is_lava then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
--finally do the heavy check (for now) of mobs in area
|
||||||
|
if count_mobs(spawning_position, mob_def.spawn_class) >= mob_def.aoc then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
--adjust the position for water and lava mobs
|
||||||
|
if mob_def.type_of_spawning == "water" or mob_def.type_of_spawning == "lava" then
|
||||||
|
spawning_position.y = spawning_position.y - 1
|
||||||
|
end
|
||||||
|
|
||||||
|
--everything is correct, spawn mob
|
||||||
|
minetest.add_entity(spawning_position, mob_def.name)
|
||||||
|
until true --this is a safety catch
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
local dim = {"x", "z"}
|
|
||||||
|
|
||||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
|
||||||
|
|
||||||
local function load_schem(filename)
|
|
||||||
local file = io.open(modpath .. "/schems/" .. filename, "r")
|
|
||||||
local data = minetest.deserialize(file:read())
|
|
||||||
file:close()
|
|
||||||
return data
|
|
||||||
end
|
|
||||||
|
|
||||||
local wither_spawn_schems = {}
|
|
||||||
|
|
||||||
for _, d in pairs(dim) do
|
|
||||||
wither_spawn_schems[d] = load_schem("wither_spawn_" .. d .. ".we")
|
|
||||||
end
|
|
||||||
|
|
||||||
local function check_schem(pos, schem)
|
|
||||||
for _, n in pairs(schem) do
|
|
||||||
if minetest.get_node(vector.add(pos, n)).name ~= n.name then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
local function remove_schem(pos, schem)
|
|
||||||
for _, n in pairs(schem) do
|
|
||||||
minetest.remove_node(vector.add(pos, n))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function wither_spawn(pos)
|
|
||||||
for _, d in pairs(dim) do
|
|
||||||
for i = 0, 2 do
|
|
||||||
local p = vector.add(pos, {x = 0, y = -2, z = 0, [d] = -i})
|
|
||||||
local schem = wither_spawn_schems[d]
|
|
||||||
if check_schem(p, schem) then
|
|
||||||
remove_schem(p, schem)
|
|
||||||
minetest.add_entity(vector.add(p, {x = 0, y = 1, z = 0, [d] = 1}), "mobs_mc:wither")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local old_onplace=minetest.registered_nodes[mobs_mc.items.head_wither_skeleton].on_place
|
|
||||||
minetest.registered_nodes[mobs_mc.items.head_wither_skeleton].on_place=function(itemstack,placer,pointed)
|
|
||||||
minetest.after(0, wither_spawn, pointed.above)
|
|
||||||
old_onplace(itemstack,placer,pointed)
|
|
||||||
end
|
|
|
@ -1,4 +0,0 @@
|
||||||
name = mcl_wither_spawning
|
|
||||||
description = Wither Spawning for MineClone2
|
|
||||||
author = Fleckenstein
|
|
||||||
depends = mobs_mc, mcl_heads
|
|
|
@ -1 +0,0 @@
|
||||||
return {{["y"] = 1, ["x"] = 0, ["name"] = "mcl_nether:soul_sand", ["z"] = 0}, {["y"] = 2, ["x"] = 0, ["name"] = "mcl_heads:wither_skeleton", ["z"] = 0, ["param2"] = 2, ["param1"] = 15}, {["y"] = 0, ["x"] = 1, ["name"] = "mcl_nether:soul_sand", ["z"] = 0}, {["y"] = 1, ["x"] = 1, ["name"] = "mcl_nether:soul_sand", ["z"] = 0}, {["y"] = 2, ["x"] = 1, ["name"] = "mcl_heads:wither_skeleton", ["z"] = 0, ["param2"] = 2, ["param1"] = 15}, {["y"] = 1, ["x"] = 2, ["name"] = "mcl_nether:soul_sand", ["z"] = 0}, {["y"] = 2, ["x"] = 2, ["name"] = "mcl_heads:wither_skeleton", ["z"] = 0, ["param2"] = 2, ["param1"] = 15}}
|
|
|
@ -1 +0,0 @@
|
||||||
return {{["y"] = 0, ["x"] = 0, ["name"] = "mcl_nether:soul_sand", ["z"] = 1}, {["y"] = 1, ["x"] = 0, ["name"] = "mcl_nether:soul_sand", ["z"] = 0}, {["y"] = 1, ["x"] = 0, ["name"] = "mcl_nether:soul_sand", ["z"] = 1}, {["y"] = 1, ["x"] = 0, ["name"] = "mcl_nether:soul_sand", ["z"] = 2}, {["y"] = 2, ["x"] = 0, ["name"] = "mcl_heads:wither_skeleton", ["z"] = 0, ["param2"] = 1, ["param1"] = 15}, {["y"] = 2, ["x"] = 0, ["name"] = "mcl_heads:wither_skeleton", ["z"] = 1, ["param2"] = 1, ["param1"] = 15}, {["y"] = 2, ["x"] = 0, ["name"] = "mcl_heads:wither_skeleton", ["z"] = 2, ["param2"] = 1, ["param1"] = 15}}
|
|
|
@ -169,7 +169,6 @@ mobs_mc.follow = {
|
||||||
dog = { mobs_mc.items.rabbit_raw, mobs_mc.items.rabbit_cooked, mobs_mc.items.mutton_raw, mobs_mc.items.mutton_cooked, mobs_mc.items.beef_raw, mobs_mc.items.beef_cooked, mobs_mc.items.chicken_raw, mobs_mc.items.chicken_cooked, mobs_mc.items.rotten_flesh,
|
dog = { mobs_mc.items.rabbit_raw, mobs_mc.items.rabbit_cooked, mobs_mc.items.mutton_raw, mobs_mc.items.mutton_cooked, mobs_mc.items.beef_raw, mobs_mc.items.beef_cooked, mobs_mc.items.chicken_raw, mobs_mc.items.chicken_cooked, mobs_mc.items.rotten_flesh,
|
||||||
-- Mobs Redo items
|
-- Mobs Redo items
|
||||||
"mobs:meat", "mobs:meat_raw" },
|
"mobs:meat", "mobs:meat_raw" },
|
||||||
villager = { "mcl_farming:bread" },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Contents for replace_what
|
-- Contents for replace_what
|
||||||
|
|
|
@ -75,7 +75,6 @@ Origin of those models:
|
||||||
* `mobs_mc_mushroom_brown.png` (CC0)
|
* `mobs_mc_mushroom_brown.png` (CC0)
|
||||||
|
|
||||||
* “Spawn egg” textures (`mobs_mc_spawn_icon_*`) by 22i
|
* “Spawn egg” textures (`mobs_mc_spawn_icon_*`) by 22i
|
||||||
* Llama decor (carpet) textures (`mobs_mc_llama_decor_*`) by erlehmann and rudzik8
|
|
||||||
* Any other texture not mentioned here are licensed under the MIT License
|
* Any other texture not mentioned here are licensed under the MIT License
|
||||||
|
|
||||||
## Sounds
|
## Sounds
|
||||||
|
|
|
@ -42,6 +42,7 @@ mobs:register_mob("mobs_mc:llama", {
|
||||||
{"blank.png", "blank.png", "mobs_mc_llama_gray.png"},
|
{"blank.png", "blank.png", "mobs_mc_llama_gray.png"},
|
||||||
{"blank.png", "blank.png", "mobs_mc_llama_white.png"},
|
{"blank.png", "blank.png", "mobs_mc_llama_white.png"},
|
||||||
{"blank.png", "blank.png", "mobs_mc_llama.png"},
|
{"blank.png", "blank.png", "mobs_mc_llama.png"},
|
||||||
|
-- TODO: Add llama carpet textures (Pixel Perfection seems to use verbatim copy from Minecraft :-( )
|
||||||
},
|
},
|
||||||
visual_size = {x=3, y=3},
|
visual_size = {x=3, y=3},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
|
@ -138,48 +139,50 @@ mobs:register_mob("mobs_mc:llama", {
|
||||||
-- Make sure tamed llama is mature and being clicked by owner only
|
-- Make sure tamed llama is mature and being clicked by owner only
|
||||||
if self.tamed and not self.child and self.owner == clicker:get_player_name() then
|
if self.tamed and not self.child and self.owner == clicker:get_player_name() then
|
||||||
|
|
||||||
-- Place carpet
|
-- Place carpet
|
||||||
if minetest.get_item_group(item:get_name(), "carpet") == 1 and not self.carpet then
|
--[[ TODO: Re-enable this code when carpet textures arrived.
|
||||||
for group, carpetdata in pairs(carpets) do
|
if minetest.get_item_group(item:get_name(), "carpet") == 1 and not self.carpet then
|
||||||
if minetest.get_item_group(item:get_name(), group) == 1 then
|
for group, carpetdata in pairs(carpets) do
|
||||||
if not minetest.is_creative_enabled(clicker:get_player_name()) then
|
if minetest.get_item_group(item:get_name(), group) == 1 then
|
||||||
item:take_item()
|
if not minetest.is_creative_enabled(clicker:get_player_name()) then
|
||||||
clicker:set_wielded_item(item)
|
item:take_item()
|
||||||
|
clicker:set_wielded_item(item)
|
||||||
|
end
|
||||||
|
local substr = carpetdata[2]
|
||||||
|
local tex_carpet = "mobs_mc_llama_decor_"..substr..".png"
|
||||||
|
self.base_texture = table.copy(self.base_texture)
|
||||||
|
self.base_texture[2] = tex_carpet
|
||||||
|
self.object:set_properties({
|
||||||
|
textures = self.base_texture,
|
||||||
|
})
|
||||||
|
self.carpet = item:get_name()
|
||||||
|
self.drops = {
|
||||||
|
{name = mobs_mc.items.leather,
|
||||||
|
chance = 1,
|
||||||
|
min = 0,
|
||||||
|
max = 2,},
|
||||||
|
{name = item:get_name(),
|
||||||
|
chance = 1,
|
||||||
|
min = 1,
|
||||||
|
max = 1,},
|
||||||
|
}
|
||||||
|
return
|
||||||
end
|
end
|
||||||
local substr = carpetdata[2]
|
|
||||||
local tex_carpet = "mobs_mc_llama_decor_"..substr..".png"
|
|
||||||
self.base_texture = table.copy(self.base_texture)
|
|
||||||
self.base_texture[2] = tex_carpet
|
|
||||||
self.object:set_properties({
|
|
||||||
textures = self.base_texture,
|
|
||||||
})
|
|
||||||
self.carpet = item:get_name()
|
|
||||||
self.drops = {
|
|
||||||
{name = mobs_mc.items.leather,
|
|
||||||
chance = 1,
|
|
||||||
min = 0,
|
|
||||||
max = 2,},
|
|
||||||
{name = item:get_name(),
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
}
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
]]
|
||||||
|
|
||||||
-- detatch player already riding llama
|
-- detatch player already riding llama
|
||||||
if self.driver and clicker == self.driver then
|
if self.driver and clicker == self.driver then
|
||||||
|
|
||||||
mobs.detach(clicker, {x = 1, y = 0, z = 1})
|
mobs.detach(clicker, {x = 1, y = 0, z = 1})
|
||||||
|
|
||||||
-- attach player to llama
|
-- attach player to llama
|
||||||
elseif not self.driver then
|
elseif not self.driver then
|
||||||
|
|
||||||
self.object:set_properties({stepheight = 1.1})
|
self.object:set_properties({stepheight = 1.1})
|
||||||
mobs.attach(self, clicker)
|
mobs.attach(self, clicker)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Used to capture llama
|
-- Used to capture llama
|
||||||
elseif not self.driver and clicker:get_wielded_item():get_name() ~= "" then
|
elseif not self.driver and clicker:get_wielded_item():get_name() ~= "" then
|
||||||
|
@ -187,6 +190,8 @@ mobs:register_mob("mobs_mc:llama", {
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
--[[
|
||||||
|
TODO: Enable this code when carpet textures arrived.
|
||||||
on_breed = function(parent1, parent2)
|
on_breed = function(parent1, parent2)
|
||||||
-- When breeding, make sure the child has no carpet
|
-- When breeding, make sure the child has no carpet
|
||||||
local pos = parent1.object:get_pos()
|
local pos = parent1.object:get_pos()
|
||||||
|
@ -208,6 +213,7 @@ mobs:register_mob("mobs_mc:llama", {
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
]]
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -116,14 +116,15 @@ mobs:spawn_specific(
|
||||||
"overworld",
|
"overworld",
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"Desert",
|
|
||||||
"FlowerForest",
|
"FlowerForest",
|
||||||
|
"Swampland",
|
||||||
"Taiga",
|
"Taiga",
|
||||||
"ExtremeHills",
|
"ExtremeHills",
|
||||||
"BirchForest",
|
"BirchForest",
|
||||||
"MegaSpruceTaiga",
|
"MegaSpruceTaiga",
|
||||||
"MegaTaiga",
|
"MegaTaiga",
|
||||||
"ExtremeHills+",
|
"ExtremeHills+",
|
||||||
|
"Forest",
|
||||||
"Plains",
|
"Plains",
|
||||||
"ColdTaiga",
|
"ColdTaiga",
|
||||||
"SunflowerPlains",
|
"SunflowerPlains",
|
||||||
|
|
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 936 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 966 B |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
@ -62,15 +62,9 @@ if minetest.get_mapgen_setting("mg_name") == "v6" then
|
||||||
end
|
end
|
||||||
|
|
||||||
local professions = {
|
local professions = {
|
||||||
unemployed = {
|
|
||||||
name = N("Unemployed"),
|
|
||||||
texture = "mobs_mc_villager.png",
|
|
||||||
trades = nil,
|
|
||||||
},
|
|
||||||
farmer = {
|
farmer = {
|
||||||
name = N("Farmer"),
|
name = N("Farmer"),
|
||||||
texture = "mobs_mc_villager_farmer.png",
|
texture = "mobs_mc_villager_farmer.png",
|
||||||
jobsite = "mcl_composters:composter",
|
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_farming:wheat_item", 18, 22, }, E1 },
|
{ { "mcl_farming:wheat_item", 18, 22, }, E1 },
|
||||||
|
@ -82,19 +76,16 @@ local professions = {
|
||||||
{
|
{
|
||||||
{ { "mcl_farming:pumpkin", 8, 13 }, E1 },
|
{ { "mcl_farming:pumpkin", 8, 13 }, E1 },
|
||||||
{ E1, { "mcl_farming:pumpkin_pie", 2, 3} },
|
{ E1, { "mcl_farming:pumpkin_pie", 2, 3} },
|
||||||
{ E1, { "mcl_core:apple", 2, 3} },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_farming:melon", 7, 12 }, E1 },
|
{ { "mcl_farming:melon", 7, 12 }, E1 },
|
||||||
{ E1, {"mcl_farming:cookie", 5, 7 }, },
|
{ E1, { "mcl_core:apple", 5, 7 }, },
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ E1, { "mcl_mushrooms:mushroom_stew", 6, 10 } }, --FIXME: expert level farmer is supposed to sell sus stews.
|
{ E1, { "mcl_farming:cookie", 6, 10 } },
|
||||||
},
|
{ E1, { "mcl_cake:cake", 1, 1 } },
|
||||||
{
|
|
||||||
{ E1, { "mcl_farming:carrot_item_gold", 3, 10 } },
|
|
||||||
{ E1, { "mcl_potions:speckled_melon", 4, 1 } },
|
|
||||||
TRADE_V6_BIRCH_SAPLING,
|
TRADE_V6_BIRCH_SAPLING,
|
||||||
TRADE_V6_DARK_OAK_SAPLING,
|
TRADE_V6_DARK_OAK_SAPLING,
|
||||||
TRADE_V6_ACACIA_SAPLING,
|
TRADE_V6_ACACIA_SAPLING,
|
||||||
|
@ -104,81 +95,32 @@ local professions = {
|
||||||
fisherman = {
|
fisherman = {
|
||||||
name = N("Fisherman"),
|
name = N("Fisherman"),
|
||||||
texture = "mobs_mc_villager_farmer.png",
|
texture = "mobs_mc_villager_farmer.png",
|
||||||
jobsite = "mcl_barrels:barrel_closed",
|
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_fishing:fish_raw", 6, 6, "mcl_core:emerald", 1, 1 },{ "mcl_fishing:fish_cooked", 6, 6 } },
|
{ { "mcl_fishing:fish_raw", 6, 6, "mcl_core:emerald", 1, 1 }, { "mcl_fishing:fish_cooked", 6, 6 } },
|
||||||
{ { "mcl_mobitems:string", 15, 20 }, E1 },
|
{ { "mcl_mobitems:string", 15, 20 }, E1 },
|
||||||
{ { "mcl_core:coal_lump", 15, 10 }, E1 },
|
{ { "mcl_core:emerald", 3, 11 }, { "mcl_fishing:fishing_rod_enchanted", 1, 1} },
|
||||||
-- FIXME missing: bucket of cod + fish should be cod.
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_fishing:fish_raw", 6, 15,}, E1 },
|
|
||||||
{ { "mcl_fishing:salmon_raw", 6, 6, "mcl_core:emerald", 1, 1 },{ "mcl_fishing:salmon_cooked", 6, 6 } },
|
|
||||||
-- FIXME missing campfire
|
|
||||||
-- {{ "mcl_core:emerald", 1, 2 },{"mcl_campfires:campfire",1,1} },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_fishing:salmon_raw", 6, 13,}, E1 },
|
|
||||||
{ { "mcl_core:emerald", 7, 22 }, { "mcl_fishing:fishing_rod_enchanted", 1, 1} },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_fishing:clownfish_raw", 6, 6,}, E1 },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_fishing:pufferfish_raw", 4, 4,}, E1 },
|
|
||||||
|
|
||||||
{ { "mcl_boats:boat", 1, 1,}, E1 },
|
|
||||||
{ { "mcl_boats:boat_acacia", 1, 1,}, E1 },
|
|
||||||
{ { "mcl_boats:boat_spruce", 1, 1,}, E1 },
|
|
||||||
{ { "mcl_boats:boat_dark_oak", 1, 1,}, E1 },
|
|
||||||
{ { "mcl_boats:boat_birch", 1, 1,}, E1 },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
fletcher = {
|
fletcher = {
|
||||||
name = N("Fletcher"),
|
name = N("Fletcher"),
|
||||||
texture = "mobs_mc_villager_farmer.png",
|
texture = "mobs_mc_villager_farmer.png",
|
||||||
jobsite = "mcl_fletching_table:fletching_table",
|
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_mobitems:string", 15, 20 }, E1 },
|
{ { "mcl_mobitems:string", 15, 20 }, E1 },
|
||||||
{ E1, { "mcl_bows:arrow", 8, 12 } },
|
{ E1, { "mcl_bows:arrow", 8, 12 } },
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
{ { "mcl_core:gravel", 10, 10, "mcl_core:emerald", 1, 1 }, { "mcl_core:flint", 6, 10 } },
|
{ { "mcl_core:gravel", 10, 10, "mcl_core:emerald", 1, 1 }, { "mcl_core:flint", 6, 10 } },
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_core:flint", 26, 26 }, E1 },
|
|
||||||
{ { "mcl_core:emerald", 2, 3 }, { "mcl_bows:bow", 1, 1 } },
|
{ { "mcl_core:emerald", 2, 3 }, { "mcl_bows:bow", 1, 1 } },
|
||||||
},
|
},
|
||||||
{
|
|
||||||
{ { "mcl_mobitems:string", 14, 14 }, E1 },
|
|
||||||
{ { "mcl_core:emerald", 3, 3 }, { "mcl_bows:crossbow", 1, 1 } },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_mobitems:string", 24, 24 }, E1 },
|
|
||||||
{ { "mcl_core:emerald", 7, 21 } , { "mcl_bows:bow_enchanted", 1, 1 } },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
--FIXME: supposed to be tripwire hook{ { "tripwirehook", 24, 24 }, E1 },
|
|
||||||
{ { "mcl_core:emerald", 8, 22 } , { "mcl_bows:crossbow_enchanted", 1, 1 } },
|
|
||||||
{ { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:healing_arrow", 5, 5 } },
|
|
||||||
{ { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:harming_arrow", 5, 5 } },
|
|
||||||
{ { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:night_vision_arrow", 5, 5 } },
|
|
||||||
{ { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:swiftness_arrow", 5, 5 } },
|
|
||||||
{ { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:slowness_arrow", 5, 5 } },
|
|
||||||
{ { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:leaping_arrow", 5, 5 } },
|
|
||||||
{ { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:poison_arrow", 5, 5 } },
|
|
||||||
{ { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:regeneration_arrow", 5, 5 } },
|
|
||||||
{ { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:invisibility_arrow", 5, 5 } },
|
|
||||||
{ { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:water_breathing_arrow", 5, 5 } },
|
|
||||||
{ { "mcl_core:emerald", 2, 2, "mcl_bows:arrow", 5, 5 }, { "mcl_potions:fire_resistance_arrow", 5, 5 } },
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
shepherd ={
|
shepherd ={
|
||||||
name = N("Shepherd"),
|
name = N("Shepherd"),
|
||||||
texture = "mobs_mc_villager_farmer.png",
|
texture = "mobs_mc_villager_farmer.png",
|
||||||
jobsite = "mcl_loom:loom",
|
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_wool:white", 16, 22 }, E1 },
|
{ { "mcl_wool:white", 16, 22 }, E1 },
|
||||||
|
@ -208,262 +150,179 @@ local professions = {
|
||||||
librarian = {
|
librarian = {
|
||||||
name = N("Librarian"),
|
name = N("Librarian"),
|
||||||
texture = "mobs_mc_villager_librarian.png",
|
texture = "mobs_mc_villager_librarian.png",
|
||||||
jobsite = "mcl_villages:stonebrickcarved", --FIXME: lectern
|
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_core:paper", 24, 36 }, E1 },
|
{ { "mcl_core:paper", 24, 36 }, E1 },
|
||||||
{ { "mcl_books:book", 8, 10 }, E1 },
|
{ { "mcl_books:book", 8, 10 }, E1 },
|
||||||
{ { "mcl_core:emerald", 9, 9 }, { "mcl_books:bookshelf", 1 ,1 }},
|
{ { "mcl_core:emerald", 10, 12 }, { "mcl_compass:compass", 1 ,1 }},
|
||||||
{ { "mcl_core:emerald", 5, 64, "mcl_books:book", 1, 1 }, { "mcl_enchanting:book_enchanted", 1 ,1 }},
|
{ { "mcl_core:emerald", 3, 4 }, { "mcl_books:bookshelf", 1 ,1 }},
|
||||||
|
{ { "mcl_core:emerald", 5, 64 }, { "mcl_enchanting:book_enchanted", 1 ,1 }},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_books:written_book", 2, 2 }, E1 },
|
{ { "mcl_books:written_book", 2, 2 }, E1 },
|
||||||
{ { "mcl_core:emerald", 5, 64, "mcl_books:book", 1, 1 }, { "mcl_enchanting:book_enchanted", 1 ,1 }},
|
{ { "mcl_core:emerald", 10, 12 }, { "mcl_clock:clock", 1, 1 } },
|
||||||
{ E1, { "mcl_lanterns:lantern_floor", 1, 1 } },
|
{ E1, { "mcl_core:glass", 3, 5 } },
|
||||||
|
{ { "mcl_core:emerald", 5, 64 }, { "mcl_enchanting:book_enchanted", 1 ,1 }},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_dye:black", 5, 5 }, E1 },
|
{ E1, { "mcl_core:glass", 3, 5 } },
|
||||||
{ { "mcl_core:emerald", 5, 64, "mcl_books:book", 1, 1 }, { "mcl_enchanting:book_enchanted", 1 ,1 }},
|
{ { "mcl_core:emerald", 5, 64 }, { "mcl_enchanting:book_enchanted", 1 ,1 }},
|
||||||
{ E1, { "mcl_core:glass", 4, 4 } },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ E1, { "mcl_books:writable_book", 1, 1 } },
|
{ { "mcl_core:emerald", 5, 64 }, { "mcl_enchanting:book_enchanted", 1 ,1 }},
|
||||||
{ { "mcl_core:emerald", 5, 64, "mcl_books:book", 1, 1 }, { "mcl_enchanting:book_enchanted", 1 ,1 }},
|
|
||||||
{ { "mcl_core:emerald", 4, 4 }, { "mcl_compass:compass", 1 ,1 }},
|
|
||||||
{ { "mcl_core:emerald", 5, 5 }, { "mcl_clock:clock", 1, 1 } },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_core:emerald", 20, 20 }, { "mcl_mobs:nametag", 1, 1 } },
|
{ { "mcl_core:emerald", 20, 22 }, { "mcl_mobs:nametag", 1, 1 } },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cartographer = {
|
cartographer = {
|
||||||
name = N("Cartographer"),
|
name = N("Cartographer"),
|
||||||
texture = "mobs_mc_villager_librarian.png",
|
texture = "mobs_mc_villager_librarian.png",
|
||||||
jobsite = "mcl_cartography_table:cartography_table",
|
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_core:paper", 24, 24 }, E1 },
|
{ { "mcl_core:paper", 24, 36 }, E1 },
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_maps:empty_map", 1, 1 } },
|
|
||||||
},
|
},
|
||||||
{
|
|
||||||
-- compass subject to special checks
|
|
||||||
{ { "xpanes:pane_natural_flat", 1, 1 }, E1 },
|
|
||||||
--{ { "mcl_core:emerald", 13, 13, "mcl_compass:compass", 1, 1 }, { "FIXME:ocean explorer map" 1, 1} },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_compass:compass", 1, 1 }, E1 },
|
|
||||||
--{ { "mcl_core:emerald", 13, 13, "mcl_compass:compass", 1, 1 }, { "FIXME:woodland explorer map" 1, 1} },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_itemframes:item_frame", 1, 1 }},
|
|
||||||
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_white", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_grey", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_silver", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_black", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_red", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_green", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_cyan", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_blue", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_magenta", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_orange", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_purple", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_brown", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_pink", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_lime", 1, 1 }},
|
|
||||||
{ { "mcl_core:emerald", 7, 7}, { "mcl_banners:banner_item_light_blue", 1, 1 }},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
--{ { "mcl_core:emerald", 8, 8}, { "FIXME: globe banner pattern", 1, 1 } },
|
-- subject to special checks
|
||||||
|
{ { "mcl_compass:compass", 1, 1 }, E1 },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
-- TODO: replace with empty map
|
||||||
|
{ { "mcl_core:emerald", 7, 11}, { "mcl_maps:filled_map", 1, 1 } },
|
||||||
|
},
|
||||||
|
|
||||||
-- TODO: special maps
|
-- TODO: special maps
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
armorer = {
|
armorer = {
|
||||||
name = N("Armorer"),
|
name = N("Armorer"),
|
||||||
texture = "mobs_mc_villager_smith.png",
|
texture = "mobs_mc_villager_smith.png",
|
||||||
jobsite = "mcl_core:lava_source", --FIXME: blast furnace
|
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_core:coal_lump", 15, 15 }, E1 },
|
{ { "mcl_core:coal_lump", 16, 24 }, E1 },
|
||||||
{ { "mcl_core:emerald", 5, 5 }, { "mcl_armor:helmet_iron", 1, 1 } },
|
{ { "mcl_core:emerald", 4, 6 }, { "mcl_armor:helmet_iron", 1, 1 } },
|
||||||
{ { "mcl_core:emerald", 9, 9 }, { "mcl_armor:chestplate_iron", 1, 1 } },
|
|
||||||
{ { "mcl_core:emerald", 7, 7 }, { "mcl_armor:leggings_iron", 1, 1 } },
|
|
||||||
{ { "mcl_core:emerald", 4, 4 }, { "mcl_armor:boots_iron", 1, 1 } },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_core:iron_ingot", 4, 4 }, E1 },
|
{ { "mcl_core:iron_ingot", 7, 9 }, E1 },
|
||||||
--{ { "mcl_core:emerald", 36, 36 }, { "FIXME: Bell", 1, 1 } },
|
{ { "mcl_core:emerald", 10, 14 }, { "mcl_armor:chestplate_iron", 1, 1 } },
|
||||||
{ { "mcl_core:emerald", 3, 3 }, { "mcl_armor:leggings_chain", 1, 1 } },
|
|
||||||
{ { "mcl_core:emerald", 1, 1 }, { "mcl_armor:boots_chain", 1, 1 } },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_buckets:bucket_lava", 1, 1 }, E1 },
|
|
||||||
{ { "mcl_core:diamond", 1, 1 }, E1 },
|
|
||||||
{ { "mcl_core:emerald", 1, 1 }, { "mcl_armor:helmet_chain", 1, 1 } },
|
|
||||||
{ { "mcl_core:emerald", 4, 4 }, { "mcl_armor:chestplate_chain", 1, 1 } },
|
|
||||||
{ { "mcl_core:emerald", 5, 5 }, { "mcl_shields:shield", 1, 1 } },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_core:emerald", 19, 33 }, { "mcl_armor:leggings_diamond_enchanted", 1, 1 } },
|
{ { "mcl_core:diamond", 3, 4 }, E1 },
|
||||||
{ { "mcl_core:emerald", 13, 27 }, { "mcl_armor:boots_diamond_enchanted", 1, 1 } },
|
{ { "mcl_core:emerald", 16, 19 }, { "mcl_armor:chestplate_diamond_enchanted", 1, 1 } },
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_core:emerald", 13, 27 }, { "mcl_armor:helmet_diamond_enchanted", 1, 1 } },
|
{ { "mcl_core:emerald", 5, 7 }, { "mcl_armor:boots_chain", 1, 1 } },
|
||||||
{ { "mcl_core:emerald", 21, 35 }, { "mcl_armor:chestplate_diamond_enchanted", 1, 1 } },
|
{ { "mcl_core:emerald", 9, 11 }, { "mcl_armor:leggings_chain", 1, 1 } },
|
||||||
|
{ { "mcl_core:emerald", 5, 7 }, { "mcl_armor:helmet_chain", 1, 1 } },
|
||||||
|
{ { "mcl_core:emerald", 11, 15 }, { "mcl_armor:chestplate_chain", 1, 1 } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
leatherworker = {
|
leatherworker = {
|
||||||
name = N("Leatherworker"),
|
name = N("Leatherworker"),
|
||||||
texture = "mobs_mc_villager_butcher.png",
|
texture = "mobs_mc_villager_butcher.png",
|
||||||
jobsite = "mcl_cauldrons:cauldron",
|
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_mobitems:leather", 9, 12 }, E1 },
|
{ { "mcl_mobitems:leather", 9, 12 }, E1 },
|
||||||
{ { "mcl_core:emerald", 3, 3 }, { "mcl_armor:leggings_leather", 2, 4 } },
|
{ { "mcl_core:emerald", 2, 4 }, { "mcl_armor:leggings_leather", 2, 4 } },
|
||||||
{ { "mcl_core:emerald", 7, 7 }, { "mcl_armor:chestplate_leather", 2, 4 } },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_core:flint", 26, 26 }, E1 },
|
{ { "mcl_core:emerald", 7, 12 }, { "mcl_armor:chestplate_leather_enchanted", 1, 1 } },
|
||||||
{ { "mcl_core:emerald", 5, 5 }, { "mcl_armor:helmet_leather", 2, 4 } },
|
|
||||||
{ { "mcl_core:emerald", 4, 4 }, { "mcl_armor:boots_leather", 2, 4 } },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_mobitems:rabbit_hide", 9, 9 }, E1 },
|
|
||||||
{ { "mcl_core:emerald", 7, 7 }, { "mcl_armor:chestplate_leather", 1, 1 } },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
--{ { "FIXME: scute", 4, 4 }, E1 },
|
|
||||||
{ { "mcl_core:emerald", 8, 10 }, { "mcl_mobitems:saddle", 1, 1 } },
|
{ { "mcl_core:emerald", 8, 10 }, { "mcl_mobitems:saddle", 1, 1 } },
|
||||||
},
|
},
|
||||||
{
|
|
||||||
{ { "mcl_core:emerald", 6, 6 }, { "mcl_mobitems:saddle", 1, 1 } },
|
|
||||||
{ { "mcl_core:emerald", 5, 5 }, { "mcl_armor:helmet_leather", 2, 4 } },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
butcher = {
|
butcher = {
|
||||||
name = N("Butcher"),
|
name = N("Butcher"),
|
||||||
texture = "mobs_mc_villager_butcher.png",
|
texture = "mobs_mc_villager_butcher.png",
|
||||||
jobsite = "mcl_villages:stonebrickcarved", --FIXME: smoker
|
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_mobitems:beef", 14, 14 }, E1 },
|
{ { "mcl_mobitems:beef", 14, 18 }, E1 },
|
||||||
{ { "mcl_mobitems:chicken", 7, 7 }, E1 },
|
{ { "mcl_mobitems:chicken", 14, 18 }, E1 },
|
||||||
{ { "mcl_mobitems:rabbit", 4, 4 }, E1 },
|
|
||||||
{ E1, { "mcl_mobitems:rabbit_stew", 1, 1 } },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_core:coal_lump", 15, 15 }, E1 },
|
{ { "mcl_core:coal_lump", 16, 24 }, E1 },
|
||||||
{ E1, { "mcl_mobitems:cooked_porkchop", 5, 5 } },
|
{ E1, { "mcl_mobitems:cooked_beef", 5, 7 } },
|
||||||
{ E1, { "mcl_mobitems:cooked_chicken", 8, 8 } },
|
{ E1, { "mcl_mobitems:cooked_chicken", 6, 8 } },
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_mobitems:mutton", 7, 7 }, E1 },
|
|
||||||
{ { "mcl_mobitems:beef", 10, 10 }, E1 },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_mobitems:mutton", 7, 7 }, E1 },
|
|
||||||
{ { "mcl_mobitems:beef", 10, 10 }, E1 },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
--{ { "FIXME: Sweet Berries", 10, 10 }, E1 },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
weapon_smith = {
|
weapon_smith = {
|
||||||
name = N("Weapon Smith"),
|
name = N("Weapon Smith"),
|
||||||
texture = "mobs_mc_villager_smith.png",
|
texture = "mobs_mc_villager_smith.png",
|
||||||
jobsite = "mcl_villages:stonebrickcarved", --FIXME: grindstone
|
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_core:coal_lump", 15, 15 }, E1 },
|
{ { "mcl_core:coal_lump", 16, 24 }, E1 },
|
||||||
{ { "mcl_core:emerald", 3, 3 }, { "mcl_tools:axe_iron", 1, 1 } },
|
{ { "mcl_core:emerald", 6, 8 }, { "mcl_tools:axe_iron", 1, 1 } },
|
||||||
{ { "mcl_core:emerald", 7, 21 }, { "mcl_tools:sword_iron_enchanted", 1, 1 } },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_core:iron_ingot", 4, 4 }, E1 },
|
{ { "mcl_core:iron_ingot", 7, 9 }, E1 },
|
||||||
--{ { "mcl_core:emerald", 36, 36 }, { "FIXME: Bell", 1, 1 } },
|
{ { "mcl_core:emerald", 9, 10 }, { "mcl_tools:sword_iron_enchanted", 1, 1 } },
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_core:flint", 7, 9 }, E1 },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_core:diamond", 7, 9 }, E1 },
|
|
||||||
{ { "mcl_core:emerald", 17, 31 }, { "mcl_tools:axe_diamond_enchanted", 1, 1 } },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_core:emerald", 13, 27 }, { "mcl_tools:sword_diamond_enchanted", 1, 1 } },
|
{ { "mcl_core:diamond", 3, 4 }, E1 },
|
||||||
|
{ { "mcl_core:emerald", 12, 15 }, { "mcl_tools:sword_diamond_enchanted", 1, 1 } },
|
||||||
|
{ { "mcl_core:emerald", 9, 12 }, { "mcl_tools:axe_diamond_enchanted", 1, 1 } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tool_smith = {
|
tool_smith = {
|
||||||
name = N("Tool Smith"),
|
name = N("Tool Smith"),
|
||||||
texture = "mobs_mc_villager_smith.png",
|
texture = "mobs_mc_villager_smith.png",
|
||||||
jobsite = "mcl_villages:stonebrickcarved", --FIXME: smithing table
|
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_core:coal_lump", 15, 15 }, E1 },
|
{ { "mcl_core:coal_lump", 16, 24 }, E1 },
|
||||||
{ E1, { "mcl_tools:axe_stone", 1, 1 } },
|
{ { "mcl_core:emerald", 5, 7 }, { "mcl_tools:shovel_iron_enchanted", 1, 1 } },
|
||||||
{ E1, { "mcl_tools:shovel_stone", 1, 1 } },
|
|
||||||
{ E1, { "mcl_tools:pick_stone", 1, 1 } },
|
|
||||||
{ E1, { "mcl_farming:hoe_stone", 1, 1 } },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_core:iron_ingot", 4, 4 }, E1 },
|
{ { "mcl_core:iron_ingot", 7, 9 }, E1 },
|
||||||
--{ { "mcl_core:emerald", 36, 36 }, { "FIXME: Bell", 1, 1 } },
|
{ { "mcl_core:emerald", 9, 11 }, { "mcl_tools:pick_iron_enchanted", 1, 1 } },
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_core:flint", 30, 30 }, E1 },
|
{ { "mcl_core:diamond", 3, 4 }, E1 },
|
||||||
{ { "mcl_core:emerald", 6, 20 }, { "mcl_tools:axe_iron_enchanted", 1, 1 } },
|
{ { "mcl_core:emerald", 12, 15 }, { "mcl_tools:pick_diamond_enchanted", 1, 1 } },
|
||||||
{ { "mcl_core:emerald", 7, 21 }, { "mcl_tools:shovel_iron_enchanted", 1, 1 } },
|
|
||||||
{ { "mcl_core:emerald", 8, 22 }, { "mcl_tools:pick_iron_enchanted", 1, 1 } },
|
|
||||||
{ { "mcl_core:emerald", 4, 4 }, { "mcl_farming:hoe_diamond", 1, 1 } },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_core:diamond", 1, 1 }, E1 },
|
|
||||||
{ { "mcl_core:emerald", 17, 31 }, { "mcl_tools:axe_diamond_enchanted", 1, 1 } },
|
|
||||||
{ { "mcl_core:emerald", 10, 24 }, { "mcl_tools:shovel_diamond_enchanted", 1, 1 } },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
{ { "mcl_core:emerald", 18, 32 }, { "mcl_tools:pick_diamond_enchanted", 1, 1 } },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cleric = {
|
cleric = {
|
||||||
name = N("Cleric"),
|
name = N("Cleric"),
|
||||||
texture = "mobs_mc_villager_priest.png",
|
texture = "mobs_mc_villager_priest.png",
|
||||||
jobsite = "mcl_brewing:stand",
|
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_mobitems:rotten_flesh", 32, 32 }, E1 },
|
{ { "mcl_mobitems:rotten_flesh", 36, 40 }, E1 },
|
||||||
{ E1, { "mesecons:redstone", 2, 2 } },
|
{ { "mcl_core:gold_ingot", 8, 10 }, E1 },
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_core:gold_ingot", 3, 3 }, E1 },
|
{ E1, { "mesecons:redstone", 1, 4 } },
|
||||||
{ E1, { "mcl_dye:blue", 1, 1 } },
|
{ E1, { "mcl_dye:blue", 1, 2 } },
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_mobitems:rabbit_foot", 2, 2 }, E1 },
|
{ E1, { "mcl_nether:glowstone", 1, 3 } },
|
||||||
{ E1, { "mcl_nether:glowstone", 4, 4 } },
|
{ { "mcl_core:emerald", 4, 7 }, { "mcl_throwing:ender_pearl", 1, 1 } },
|
||||||
},
|
|
||||||
{
|
|
||||||
--{ { "FIXME: scute", 4, 4 }, E1 },
|
|
||||||
{ { "mcl_potions:glass_bottle", 9, 9 }, E1 },
|
|
||||||
{ { "mcl_core:emerald", 5, 5 }, { "mcl_throwing:ender_pearl", 1, 1 } },
|
|
||||||
TRADE_V6_RED_SANDSTONE,
|
TRADE_V6_RED_SANDSTONE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_nether:nether_wart_item", 22, 22 }, E1 },
|
{ { "mcl_nether:nether_wart_item", 22, 22 }, E1 },
|
||||||
{ { "mcl_core:emerald", 3, 3 }, { "mcl_experience:bottle", 1, 1 } },
|
{ { "mcl_core:emerald", 3, 3 }, { "mcl_experience:bottle", 1, 1 } },
|
||||||
|
@ -488,42 +347,6 @@ local stand_still = function(self)
|
||||||
self.jump = false
|
self.jump = false
|
||||||
end
|
end
|
||||||
|
|
||||||
local function set_velocity(self, v)
|
|
||||||
local yaw = (self.object:get_yaw() or 0) + self.rotate
|
|
||||||
self.object:set_velocity({
|
|
||||||
x = (math.sin(yaw) * -v),
|
|
||||||
y = self.object:get_velocity().y,
|
|
||||||
z = (math.cos(yaw) * v),
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
local function go_to_pos(entity,b)
|
|
||||||
local s=entity.object:get_pos()
|
|
||||||
local v = { x = b.x - s.x, z = b.z - s.z }
|
|
||||||
local yaw = (math.atan(v.z / v.x) + math.pi / 2) - entity.rotate
|
|
||||||
if b.x > s.x then yaw = yaw + math.pi end
|
|
||||||
entity.object:set_yaw(yaw)
|
|
||||||
set_velocity(entity,entity.follow_velocity)
|
|
||||||
if vector.distance(b,s) < 5 then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function go_home(entity)
|
|
||||||
entity.state = "go_home"
|
|
||||||
local b=entity.bed
|
|
||||||
if not b then return end
|
|
||||||
if go_to_pos(entity,b) then
|
|
||||||
entity.state = "stand"
|
|
||||||
set_velocity(entity,0)
|
|
||||||
entity.object:set_pos(b)
|
|
||||||
local n=minetest.get_node(b)
|
|
||||||
if n and n.name ~= "mcl_beds:bed_red_bottom" then
|
|
||||||
entity.bed=nil --the stormtroopers have killed uncle owen
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local update_max_tradenum = function(self)
|
local update_max_tradenum = function(self)
|
||||||
if not self._trades then
|
if not self._trades then
|
||||||
return
|
return
|
||||||
|
@ -1164,19 +987,11 @@ mobs:register_mob("mobs_mc:villager", {
|
||||||
die_end = 220,
|
die_end = 220,
|
||||||
die_loop = false,
|
die_loop = false,
|
||||||
},
|
},
|
||||||
follow = mobs_mc.follow.villager,
|
|
||||||
view_range = 16,
|
view_range = 16,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
jump = true,
|
jump = true,
|
||||||
walk_chance = DEFAULT_WALK_CHANCE,
|
walk_chance = DEFAULT_WALK_CHANCE,
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
if clicker:get_wielded_item():get_name() == "mcl_farming:bread" then
|
|
||||||
if mobs:feed_tame(self, clicker, 1, true, true) then return end
|
|
||||||
if mobs:protect(self, clicker) then return end
|
|
||||||
end
|
|
||||||
if self.child then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
-- Initiate trading
|
-- Initiate trading
|
||||||
local name = clicker:get_player_name()
|
local name = clicker:get_player_name()
|
||||||
self._trading_players[name] = true
|
self._trading_players[name] = true
|
||||||
|
@ -1218,11 +1033,6 @@ mobs:register_mob("mobs_mc:villager", {
|
||||||
if not self._player_scan_timer then
|
if not self._player_scan_timer then
|
||||||
self._player_scan_timer = 0
|
self._player_scan_timer = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.bed and ( self.state == "go_home" or vector.distance(self.object:get_pos(),self.bed) > 50 ) then
|
|
||||||
go_home(self)
|
|
||||||
end
|
|
||||||
|
|
||||||
self._player_scan_timer = self._player_scan_timer + dtime
|
self._player_scan_timer = self._player_scan_timer + dtime
|
||||||
-- Check infrequently to keep CPU load low
|
-- Check infrequently to keep CPU load low
|
||||||
if self._player_scan_timer > PLAYER_SCAN_INTERVAL then
|
if self._player_scan_timer > PLAYER_SCAN_INTERVAL then
|
||||||
|
|
|
@ -197,6 +197,7 @@ mobs:spawn_specific(
|
||||||
"ExtremeHills+",
|
"ExtremeHills+",
|
||||||
"Forest",
|
"Forest",
|
||||||
"Plains",
|
"Plains",
|
||||||
|
"Desert",
|
||||||
"ColdTaiga",
|
"ColdTaiga",
|
||||||
"MushroomIsland",
|
"MushroomIsland",
|
||||||
"IcePlainsSpikes",
|
"IcePlainsSpikes",
|
||||||
|
@ -289,6 +290,7 @@ mobs:spawn_specific(
|
||||||
"ExtremeHills+",
|
"ExtremeHills+",
|
||||||
"Forest",
|
"Forest",
|
||||||
"Plains",
|
"Plains",
|
||||||
|
"Desert",
|
||||||
"ColdTaiga",
|
"ColdTaiga",
|
||||||
"MushroomIsland",
|
"MushroomIsland",
|
||||||
"IcePlainsSpikes",
|
"IcePlainsSpikes",
|
||||||
|
@ -340,6 +342,9 @@ mobs:spawn_specific(
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"Desert",
|
"Desert",
|
||||||
|
"SavannaM",
|
||||||
|
"Savanna",
|
||||||
|
"Savanna_beach",
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
7,
|
7,
|
||||||
|
@ -354,6 +359,9 @@ mobs:spawn_specific(
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"Desert",
|
"Desert",
|
||||||
|
"SavannaM",
|
||||||
|
"Savanna",
|
||||||
|
"Savanna_beach",
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
7,
|
7,
|
||||||
|
|
|
@ -40,7 +40,7 @@ mcl_weather.nether_dust.add_particlespawners = function(player)
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_weather.nether_dust.delete_particlespawners = function(player)
|
mcl_weather.nether_dust.delete_particlespawners = function(player)
|
||||||
local name=player:get_player_name()
|
local name=player:get_player_name(name)
|
||||||
if mcl_weather.nether_dust.particlespawners[name] then
|
if mcl_weather.nether_dust.particlespawners[name] then
|
||||||
for i=1,3 do
|
for i=1,3 do
|
||||||
minetest.delete_particlespawner(mcl_weather.nether_dust.particlespawners[name][i])
|
minetest.delete_particlespawner(mcl_weather.nether_dust.particlespawners[name][i])
|
||||||
|
|
|
@ -47,6 +47,8 @@ end
|
||||||
|
|
||||||
-- For nodes which ignore sticky sides.
|
-- For nodes which ignore sticky sides.
|
||||||
-- They can't be pulled by sticky pistons and don't interact with slime blocks.
|
-- They can't be pulled by sticky pistons and don't interact with slime blocks.
|
||||||
|
-- TODO: This has NOT any actual effect so far. The actual functionality
|
||||||
|
-- still needs to be implemented.
|
||||||
function mesecon.register_mvps_unsticky(nodename, get_unsticky)
|
function mesecon.register_mvps_unsticky(nodename, get_unsticky)
|
||||||
if get_unsticky == nil then
|
if get_unsticky == nil then
|
||||||
get_unsticky = true
|
get_unsticky = true
|
||||||
|
@ -64,6 +66,9 @@ function mesecon.is_mvps_unsticky(node, pulldir, stack, stackid)
|
||||||
if type(get_unsticky) == "function" then
|
if type(get_unsticky) == "function" then
|
||||||
get_unsticky = get_unsticky(node, pulldir, stack, stackid)
|
get_unsticky = get_unsticky(node, pulldir, stack, stackid)
|
||||||
end
|
end
|
||||||
|
if get_unsticky == nil then
|
||||||
|
get_unsticky = false
|
||||||
|
end
|
||||||
|
|
||||||
return get_unsticky
|
return get_unsticky
|
||||||
end
|
end
|
||||||
|
@ -206,15 +211,7 @@ function mesecon.mvps_push(pos, dir, maximum, player_name, piston_pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
function mesecon.mvps_pull_single(pos, dir, maximum, player_name, piston_pos)
|
function mesecon.mvps_pull_single(pos, dir, maximum, player_name, piston_pos)
|
||||||
local nodes = mesecon.mvps_get_stack(pos, dir, maximum, player_name, piston_pos)
|
return mesecon.mvps_push_or_pull(pos, vector.multiply(dir, -1), dir, maximum, player_name, piston_pos)
|
||||||
|
|
||||||
if not nodes then return end
|
|
||||||
-- ensure sticky pistons; even without slimeblocks attached adhere to the unpullable rule.
|
|
||||||
for id, n in ipairs(nodes) do
|
|
||||||
if not mesecon.is_mvps_unsticky(n.node, dir, nodes, id) then
|
|
||||||
return mesecon.mvps_push_or_pull(pos, vector.multiply(dir, -1), dir, maximum, player_name, piston_pos)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- pos: pos of mvps; stackdir: direction of building the stack
|
-- pos: pos of mvps; stackdir: direction of building the stack
|
||||||
|
@ -360,14 +357,13 @@ function mesecon.mvps_move_objects(pos, dir, nodestack)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Unmovable by design: nodes
|
-- Unmovable by design
|
||||||
mesecon.register_mvps_stopper("mcl_core:barrier")
|
mesecon.register_mvps_stopper("mcl_core:barrier")
|
||||||
mesecon.register_mvps_stopper("mcl_core:realm_barrier")
|
mesecon.register_mvps_stopper("mcl_core:realm_barrier")
|
||||||
mesecon.register_mvps_stopper("mcl_core:void")
|
mesecon.register_mvps_stopper("mcl_core:void")
|
||||||
mesecon.register_mvps_stopper("mcl_core:bedrock")
|
mesecon.register_mvps_stopper("mcl_core:bedrock")
|
||||||
mesecon.register_mvps_stopper("mcl_core:obsidian")
|
mesecon.register_mvps_stopper("mcl_core:obsidian")
|
||||||
mesecon.register_mvps_stopper("mcl_chests:ender_chest")
|
mesecon.register_mvps_stopper("mcl_chests:ender_chest")
|
||||||
mesecon.register_mvps_stopper("mcl_chests:ender_chest_small")
|
|
||||||
mesecon.register_mvps_stopper("mcl_mobspawners:spawner")
|
mesecon.register_mvps_stopper("mcl_mobspawners:spawner")
|
||||||
mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_off")
|
mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_off")
|
||||||
mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_on")
|
mesecon.register_mvps_stopper("mesecons_commandblock:commandblock_on")
|
||||||
|
@ -375,18 +371,9 @@ mesecon.register_mvps_stopper("mcl_portals:portal")
|
||||||
mesecon.register_mvps_stopper("mcl_portals:portal_end")
|
mesecon.register_mvps_stopper("mcl_portals:portal_end")
|
||||||
mesecon.register_mvps_stopper("mcl_portals:end_portal_frame")
|
mesecon.register_mvps_stopper("mcl_portals:end_portal_frame")
|
||||||
mesecon.register_mvps_stopper("mcl_portals:end_portal_frame_eye")
|
mesecon.register_mvps_stopper("mcl_portals:end_portal_frame_eye")
|
||||||
mesecon.register_mvps_stopper("mcl_enchanting:table")
|
|
||||||
mesecon.register_mvps_stopper("mcl_jukebox:jukebox")
|
|
||||||
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_on")
|
|
||||||
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_off")
|
|
||||||
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_inverted_on")
|
|
||||||
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_inverted_off")
|
|
||||||
mesecon.register_mvps_stopper("mcl_banners:hanging_banner")
|
|
||||||
mesecon.register_mvps_stopper("mcl_banners:standing_banner")
|
|
||||||
|
|
||||||
-- Unmovable by technical restrictions.
|
-- Unmovable by technical restrictions.
|
||||||
-- Open formspec would screw up if node is destroyed (minor problem)
|
-- Open formspec would screw up if node is destroyed (minor problem)
|
||||||
-- Would screw up on/off state of trapped chest (big problem)
|
|
||||||
mesecon.register_mvps_stopper("mcl_furnaces:furnace")
|
mesecon.register_mvps_stopper("mcl_furnaces:furnace")
|
||||||
mesecon.register_mvps_stopper("mcl_furnaces:furnace_active")
|
mesecon.register_mvps_stopper("mcl_furnaces:furnace_active")
|
||||||
mesecon.register_mvps_stopper("mcl_hoppers:hopper")
|
mesecon.register_mvps_stopper("mcl_hoppers:hopper")
|
||||||
|
@ -400,39 +387,9 @@ mesecon.register_mvps_stopper("mcl_dispensers:dispenser_down")
|
||||||
mesecon.register_mvps_stopper("mcl_anvils:anvil")
|
mesecon.register_mvps_stopper("mcl_anvils:anvil")
|
||||||
mesecon.register_mvps_stopper("mcl_anvils:anvil_damage_1")
|
mesecon.register_mvps_stopper("mcl_anvils:anvil_damage_1")
|
||||||
mesecon.register_mvps_stopper("mcl_anvils:anvil_damage_2")
|
mesecon.register_mvps_stopper("mcl_anvils:anvil_damage_2")
|
||||||
mesecon.register_mvps_stopper("mcl_chests:chest")
|
-- Would screw up on/off state of trapped chest (big problem)
|
||||||
mesecon.register_mvps_stopper("mcl_chests:chest_small")
|
|
||||||
mesecon.register_mvps_stopper("mcl_chests:chest_left")
|
|
||||||
mesecon.register_mvps_stopper("mcl_chests:chest_right")
|
|
||||||
mesecon.register_mvps_stopper("mcl_chests:trapped_chest")
|
|
||||||
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_small")
|
|
||||||
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_left")
|
|
||||||
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_right")
|
|
||||||
mesecon.register_mvps_stopper("mcl_signs:wall_sign")
|
|
||||||
mesecon.register_mvps_stopper("mcl_signs:standing_sign")
|
|
||||||
mesecon.register_mvps_stopper("mcl_signs:standing_sign22_5")
|
|
||||||
mesecon.register_mvps_stopper("mcl_signs:standing_sign45")
|
|
||||||
mesecon.register_mvps_stopper("mcl_signs:standing_sign67_5")
|
|
||||||
mesecon.register_mvps_stopper("mcl_barrels:barrel_open")
|
|
||||||
mesecon.register_mvps_stopper("mcl_barrels:barrel_closed")
|
|
||||||
|
|
||||||
|
-- Glazed terracotta: unpullable
|
||||||
-- Unmovable by design: objects
|
|
||||||
mesecon.register_mvps_unmov("mcl_enchanting:book")
|
|
||||||
mesecon.register_mvps_unmov("mcl_chests:chest")
|
|
||||||
mesecon.register_mvps_unmov("mcl_banners:hanging_banner")
|
|
||||||
mesecon.register_mvps_unmov("mcl_banners:standing_banner")
|
|
||||||
mesecon.register_mvps_unmov("mcl_signs:text")
|
|
||||||
mesecon.register_mvps_unmov("mcl_mobspawners:doll")
|
|
||||||
mesecon.register_mvps_unmov("mcl_armor_stand:armor_entity")
|
|
||||||
mesecon.register_mvps_unmov("mcl_itemframes:item")
|
|
||||||
mesecon.register_mvps_unmov("mcl_itemframes:map")
|
|
||||||
mesecon.register_mvps_unmov("mcl_paintings:painting")
|
|
||||||
mesecon.register_mvps_unmov("mcl_end:crystal")
|
|
||||||
|
|
||||||
|
|
||||||
-- Unpullable by design: nodes
|
|
||||||
-- Glazed Terracotta
|
|
||||||
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_red")
|
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_red")
|
||||||
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_orange")
|
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_orange")
|
||||||
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_yellow")
|
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_yellow")
|
||||||
|
@ -449,446 +406,6 @@ mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_black")
|
||||||
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_brown")
|
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_brown")
|
||||||
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_light_blue")
|
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_light_blue")
|
||||||
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_pink")
|
mesecon.register_mvps_unsticky("mcl_colorblocks:glazed_terracotta_pink")
|
||||||
-- Beds
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_black_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_black_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_blue_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_blue_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_brown_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_brown_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_cyan_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_cyan_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_green_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_green_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_grey_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_grey_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_light_blue_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_light_blue_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_lime_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_lime_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_magenta_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_magenta_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_orange_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_orange_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_pink_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_pink_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_purple_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_purple_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_red_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_red_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_silver_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_silver_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_white_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_white_bottom")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_yellow_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_beds:bed_yellow_bottom")
|
|
||||||
-- Buttons
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_stone_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_stone_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_wood_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_wood_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_acaciawood_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_acaciawood_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_birchwood_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_birchwood_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_darkwood_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_darkwood_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_sprucewood_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_sprucewood_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_junglewood_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_button:button_junglewood_on")
|
|
||||||
-- Cactus, Sugarcane & Vines
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:cactus")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:reeds")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:vine")
|
|
||||||
-- Cake
|
|
||||||
mesecon.register_mvps_unsticky("mcl_cake:cake_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_cake:cake_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_cake:cake_3")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_cake:cake_4")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_cake:cake_5")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_cake:cake_6")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_cake:cake")
|
|
||||||
-- Carpet
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:black_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:blue_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:brown_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:cyan_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:green_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:grey_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:light_blue_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:lime_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:orange_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:magenta_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:pink_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:purple_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:red_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:silver_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:white_carpet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_wool:yellow_carpet")
|
|
||||||
-- Carved & Jack O'Lantern Pumpkins, Pumpkin & Melon
|
|
||||||
mesecon.register_mvps_unsticky("mcl_farming:pumpkin_face")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_farming:pumpkin_face_light")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_farming:pumpkin")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_farming:melon")
|
|
||||||
-- Chorus Plant & Flower
|
|
||||||
mesecon.register_mvps_unsticky("mcl_end:chorus_plant")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_end:chorus_flower")
|
|
||||||
-- Cobweb
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:cobweb")
|
|
||||||
-- Cocoa
|
|
||||||
mesecon.register_mvps_unsticky("mcl_cocoas:cocoa_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_cocoas:cocoa_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_cocoas:cocoa_3")
|
|
||||||
-- Doors
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:wooden_door_t_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:wooden_door_b_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:wooden_door_t_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:wooden_door_b_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:iron_door_t_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:iron_door_b_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:iron_door_t_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:iron_door_b_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:acacia_door_t_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:acacia_door_b_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:acacia_door_t_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:acacia_door_b_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:birch_door_t_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:birch_door_b_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:birch_door_t_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:birch_door_b_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:dark_oak_door_t_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:dark_oak_door_b_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:dark_oak_door_t_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:dark_oak_door_b_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:spruce_door_t_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:spruce_door_b_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:spruce_door_t_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:spruce_door_b_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:jungle_door_t_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:jungle_door_b_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:jungle_door_t_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_doors:jungle_door_b_2")
|
|
||||||
-- Dragon Egg
|
|
||||||
mesecon.register_mvps_unsticky("mcl_end:dragon_egg")
|
|
||||||
-- Fire
|
|
||||||
mesecon.register_mvps_unsticky("mcl_fire:fire")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_fire:eternal_fire")
|
|
||||||
-- Flower Pots
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_allium")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_azure_bluet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_blue_orchid")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_dandelion")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_fern")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_oxeye_daisy")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_poppy")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_tulip_orange")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_tulip_pink")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_tulip_red")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowerpots:flower_pot_tulip_white")
|
|
||||||
-- Flowers, Lilypad & Dead Bush
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:deadbush")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:allium")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:azure_bluet")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:blue_orchid")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:dandelion")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:double_fern")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:double_fern_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:fern")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:lilac")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:lilac_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:oxeye_daisy")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:peony")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:peony_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:poppy")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:rose_bush")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:rose_bush_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:sunflower")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:sunflower_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:tallgrass")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:double_grass")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:double_grass_top")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:tulip_orange")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:tulip_pink")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:tulip_red")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:tulip_white")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_flowers:waterlily")
|
|
||||||
-- Heads
|
|
||||||
mesecon.register_mvps_unsticky("mcl_heads:creeper")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_heads:skeleton")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_heads:steve")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_heads:wither_skeleton")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_heads:zombie")
|
|
||||||
-- Item Frame
|
|
||||||
mesecon.register_mvps_unsticky("mcl_itemframes:item_frame")
|
|
||||||
-- Ladder
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:ladder")
|
|
||||||
-- Lava & Water
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:lava_source")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:lava_flowing")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:water_source")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:water_flowing")
|
|
||||||
mesecon.register_mvps_unsticky("mclx_core:river_water_source")
|
|
||||||
mesecon.register_mvps_unsticky("mclx_core:river_water_flowing")
|
|
||||||
-- Leaves
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:leaves")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:acacialeaves")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:birchleaves")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:darkleaves")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:spruceleaves")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:jungleleaves")
|
|
||||||
-- Lever
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_walllever:wall_lever_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_walllever:wall_lever_on")
|
|
||||||
-- Mushrooms, Nether Wart & Amethyst
|
|
||||||
mesecon.register_mvps_unsticky("mcl_mushroom:mushroom_brown")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_mushroom:mushroom_red")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_nether:nether_wart_0")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_nether:nether_wart_1")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_nether:nether_wart_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_nether:nether_wart")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_amethyst:amethyst_cluster")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_amethyst:budding_amethyst_block")
|
|
||||||
-- Pressure Plates
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_wood_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_wood_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_stone_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_stone_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_acaciawood_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_acaciawoood_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_birchwood_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_birchwood_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_darkwood_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_darkwood_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_sprucekwood_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_sprucewood_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_junglewood_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_pressureplates:pressure_plate_junglewood_off")
|
|
||||||
-- Redstone Comparators
|
|
||||||
mesecon.register_mvps_unsticky("mcl_comparators:comparator_on_sub")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_comparators:comparator_off_sub")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_comparators:comparator_on_comp")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_comparators:comparator_off_comp")
|
|
||||||
-- Redstone Dust
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00000000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00000000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10000000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10000000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01000000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01000000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11000000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11000000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00100000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00100000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10100000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10100000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01100000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01100000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11100000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11100000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00010000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00010000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10010000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10010000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01010000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01010000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11010000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11010000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00110000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00110000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10110000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10110000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10001000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10001000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11001000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11001000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10101000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10101000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11101000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11101000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10011000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10011000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11011000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11011000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10111000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10111000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111000_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111000_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01000100_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01000100_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11000100_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11000100_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01100100_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01100100_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11100100_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11100100_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01010100_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01010100_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11010100_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11010100_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110100_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110100_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110100_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110100_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11001100_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11001100_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11101100_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11101100_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11011100_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11011100_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111100_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111100_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00100010_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00100010_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10100010_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10100010_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01100010_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01100010_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11100010_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11100010_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00110010_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00110010_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10110010_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10110010_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110010_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110010_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110010_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110010_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10101010_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10101010_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11101010_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11101010_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10111010_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10111010_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111010_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111010_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01100110_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01100110_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11100110_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11100110_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110110_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110110_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110110_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110110_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11101110_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11101110_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111110_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111110_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00010001_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00010001_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10010001_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10010001_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01010001_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01010001_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11010001_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11010001_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00110001_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00110001_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10110001_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10110001_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110001_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110001_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110001_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110001_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10011001_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10011001_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11011001_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11011001_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10111001_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10111001_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111001_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111001_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01010101_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01010101_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11010101_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11010101_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110101_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110101_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110101_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110101_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11011101_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11011101_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111101_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111101_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00110011_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_00110011_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10110011_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10110011_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110011_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110011_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110011_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110011_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10111011_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_10111011_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111011_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111011_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110111_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_01110111_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110111_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11110111_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111111_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons:wire_11111111_off")
|
|
||||||
-- Redstone Repeater
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_off_1")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_off_2")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_off_3")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_off_4")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_on_1")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_on_2")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_on_3")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_delayer:delayer_on_4")
|
|
||||||
-- Redstone Torch
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_torch:mesecon_torch_on")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_torch:mesecon_torch_off")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_torch:mesecon_torch_on_wall")
|
|
||||||
mesecon.register_mvps_unsticky("mesecons_torch:mesecon_torch_off_wall")
|
|
||||||
-- Sea Pickle
|
|
||||||
mesecon.register_mvps_unsticky("mcl_ocean:sea_pickle_1_dead_brain_coral_block")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_ocean:sea_pickle_2_dead_brain_coral_block")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_ocean:sea_pickle_3_dead_brain_coral_block")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_ocean:sea_pickle_4_dead_brain_coral_block")
|
|
||||||
-- Shulker chests
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:black_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:blue_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:brown_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:cyan_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:green_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:grey_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:light_blue_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:lime_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:orange_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:magenta_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:pink_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:purple_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:red_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:silver_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:white_shulker_box_small")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_chests:yellow_shulker_box_small")
|
|
||||||
-- Snow
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:snow")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:snow_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:snow_3")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:snow_4")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:snow_5")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:snow_6")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:snow_7")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_core:snow_8")
|
|
||||||
-- Torch
|
|
||||||
mesecon.register_mvps_unsticky("mcl_torches:torch")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_torches:torch_wall")
|
|
||||||
-- Wheat
|
|
||||||
mesecon.register_mvps_unsticky("mcl_farming:wheat")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_farming:wheat_2")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_farming:wheat_3")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_farming:wheat_4")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_farming:wheat_5")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_farming:wheat_6")
|
|
||||||
mesecon.register_mvps_unsticky("mcl_farming:wheat_7")
|
|
||||||
|
|
||||||
-- Includes node heat when moving them
|
-- Includes node heat when moving them
|
||||||
mesecon.register_on_mvps_move(mesecon.move_hot_nodes)
|
mesecon.register_on_mvps_move(mesecon.move_hot_nodes)
|
||||||
|
|
|
@ -10,4 +10,3 @@ local modpath = minetest.get_modpath("mcl_beds")
|
||||||
dofile(modpath .. "/functions.lua")
|
dofile(modpath .. "/functions.lua")
|
||||||
dofile(modpath .. "/api.lua")
|
dofile(modpath .. "/api.lua")
|
||||||
dofile(modpath .. "/beds.lua")
|
dofile(modpath .. "/beds.lua")
|
||||||
dofile(modpath .. "/respawn_anchor.lua")
|
|
|
@ -40,4 +40,3 @@ You will fall asleep when all players are in bed.=Sie werden einschlafen, wenn a
|
||||||
You will fall asleep when @1% of all players are in bed.=Sie werden einschlafen, wenn @1% der Spieler im Bett sind.
|
You will fall asleep when @1% of all players are in bed.=Sie werden einschlafen, wenn @1% der Spieler im Bett sind.
|
||||||
You're in bed.=Sie sind im Bett.
|
You're in bed.=Sie sind im Bett.
|
||||||
Allows you to sleep=Zum Einschafen
|
Allows you to sleep=Zum Einschafen
|
||||||
Respawn Anchor=Seelenanker
|
|
|
@ -40,4 +40,3 @@ You will fall asleep when all players are in bed.=
|
||||||
You will fall asleep when @1% of all players are in bed.=
|
You will fall asleep when @1% of all players are in bed.=
|
||||||
You're in bed.=
|
You're in bed.=
|
||||||
Allows you to sleep=
|
Allows you to sleep=
|
||||||
Respawn Anchor=
|
|
||||||
|
|
|
@ -2,4 +2,4 @@ name = mcl_beds
|
||||||
author = BlockMen
|
author = BlockMen
|
||||||
description =
|
description =
|
||||||
depends = playerphysics
|
depends = playerphysics
|
||||||
optional_depends = mcl_sounds, mcl_worlds, mcl_wool, mcl_dye, mcl_explosions, mcl_weather, mcl_spawn, doc, mesecon
|
optional_depends = mcl_sounds, mcl_worlds, mcl_wool, mcl_dye, mcl_explosions, mcl_weather, mcl_spawn, doc
|
||||||
|
|
|
@ -1,96 +0,0 @@
|
||||||
--TODO: Add sounds for the respawn anchor (charge sounds etc.)
|
|
||||||
|
|
||||||
--Nether ends at y -29077
|
|
||||||
--Nether roof at y -28933
|
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
|
||||||
--local mod_doc = minetest.get_modpath("doc") -> maybe add documentation ?
|
|
||||||
|
|
||||||
for i=0,4 do
|
|
||||||
local nodebox_uncharged = { --Reused the composter nodebox, since it is basicly the same
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
|
|
||||||
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
|
|
||||||
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
|
|
||||||
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
|
|
||||||
{-0.5, -0.5, -0.5, 0.5, -0.47, 0.5}, -- Bottom level, -0.47 because -0.5 is so low that you can see the texture of the block below through
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local nodebox_charged = { --Reused the composter nodebox, since it is basicly the same
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
|
|
||||||
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
|
|
||||||
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
|
|
||||||
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
|
|
||||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local function rightclick(pos, node, player, itemstack)
|
|
||||||
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" and i ~= 4 then
|
|
||||||
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_" .. i+1})
|
|
||||||
itemstack:take_item()
|
|
||||||
elseif mcl_worlds.pos_to_dimension(pos) ~= "nether" then
|
|
||||||
if node.name ~= "mcl_beds:respawn_anchor" then --only charged respawn anchors are exploding in the overworld & end in minecraft
|
|
||||||
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
|
|
||||||
end
|
|
||||||
elseif string.match(node.name, "mcl_beds:respawn_anchor_charged_") then
|
|
||||||
minetest.chat_send_player(player.get_player_name(player), S"New respawn position set!")
|
|
||||||
mcl_spawn.set_spawn_pos(player, pos, nil)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
if i == 0 then
|
|
||||||
minetest.register_node("mcl_beds:respawn_anchor",{
|
|
||||||
description=S("Respawn Anchor"),
|
|
||||||
tiles = {
|
|
||||||
"respawn_anchor_top_off.png",
|
|
||||||
"respawn_anchor_bottom.png",
|
|
||||||
"respawn_anchor_side0.png"
|
|
||||||
},
|
|
||||||
drawtype = "nodebox",
|
|
||||||
node_box = nodebox_uncharged,
|
|
||||||
on_rightclick = rightclick,
|
|
||||||
groups = {pickaxey=1, material_stone=1},
|
|
||||||
_mcl_hardness = 22.5,
|
|
||||||
sounds= mcl_sounds.node_sound_stone_defaults(),
|
|
||||||
})
|
|
||||||
mesecon.register_mvps_stopper("mcl_beds:respawn_anchor")
|
|
||||||
else
|
|
||||||
minetest.register_node("mcl_beds:respawn_anchor_charged_"..i,{
|
|
||||||
description=S("Respawn Anchor"),
|
|
||||||
tiles = {
|
|
||||||
"portal.png",
|
|
||||||
"respawn_anchor_bottom.png",
|
|
||||||
"respawn_anchor_side"..i ..".png"
|
|
||||||
},
|
|
||||||
drawtype = "nodebox",
|
|
||||||
node_box = nodebox_charged,
|
|
||||||
on_rightclick = rightclick,
|
|
||||||
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
|
|
||||||
_mcl_hardness = 22.5,
|
|
||||||
sounds= mcl_sounds.node_sound_stone_defaults(),
|
|
||||||
drop = {
|
|
||||||
max_items = 1,
|
|
||||||
items = {
|
|
||||||
{items = {"mcl_beds:respawn_anchor"}},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
light_source = (4 * i) - 1
|
|
||||||
})
|
|
||||||
mesecon.register_mvps_stopper("mcl_beds:respawn_anchor_charged_"..i)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({ --TODO: Please change this crafting recipe once crying obsidian is implemented!
|
|
||||||
output = "mcl_beds:respawn_anchor",
|
|
||||||
recipe = {
|
|
||||||
{"mcl_core:obsidian", "mcl_core:obsidian", "mcl_core:obsidian"},
|
|
||||||
{"mcl_nether:glowstone", "mcl_nether:glowstone", "mcl_nether:glowstone"},
|
|
||||||
{"mcl_core:obsidian", "mcl_core:obsidian", "mcl_core:obsidian"}
|
|
||||||
}
|
|
||||||
})
|
|
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.4 KiB |
|
@ -1,13 +0,0 @@
|
||||||
mcl_cartography_table
|
|
||||||
-------------------
|
|
||||||
Cartography Tables, by PrairieWind
|
|
||||||
|
|
||||||
Adds Cartography Tables to MineClone 2/5.
|
|
||||||
|
|
||||||
License of source code
|
|
||||||
----------------------
|
|
||||||
LGPLv2.1
|
|
||||||
|
|
||||||
License of media
|
|
||||||
----------------
|
|
||||||
See the main MineClone 2 README.md file.
|
|
|
@ -1,25 +0,0 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
|
||||||
-- Cartography Table Code. Used to create and copy maps. Needs a GUI still.
|
|
||||||
|
|
||||||
minetest.register_node("mcl_cartography_table:cartography_table", {
|
|
||||||
description = S("Cartography Table"),
|
|
||||||
_tt_help = S("Used to create or copy maps"),
|
|
||||||
_doc_items_longdesc = S("Is used to create or copy maps for use.."),
|
|
||||||
tiles = {
|
|
||||||
"cartography_table_top.png", "cartography_table_side3.png",
|
|
||||||
"cartography_table_side3.png", "cartography_table_side2.png",
|
|
||||||
"cartography_table_side3.png", "cartography_table_side1.png"
|
|
||||||
},
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = {choppy=1, deco_block=1, material_wood=1,flammable=1}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mcl_cartography_table:cartography_table",
|
|
||||||
recipe = {
|
|
||||||
{ "mcl_core:paper", "mcl_core:paper", "" },
|
|
||||||
{ "group:wood", "group:wood", "" },
|
|
||||||
{ "group:wood", "group:wood", "" },
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -1,3 +0,0 @@
|
||||||
name = mcl_cartography_table
|
|
||||||
author = PrairieWind
|
|
||||||
description = Adds the cartography table villager workstation to MineClone 2/5. Used to copy and create maps.
|
|
Before Width: | Height: | Size: 610 B |
Before Width: | Height: | Size: 680 B |
Before Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 499 B |
|
@ -1,20 +0,0 @@
|
||||||
# mcl_compass
|
|
||||||
|
|
||||||
# Compass API
|
|
||||||
|
|
||||||
##mcl_compass.stereotype = "mcl_compass:" .. stereotype_frame
|
|
||||||
Default compass craftitem. This is also the image that is shown in the inventory.
|
|
||||||
|
|
||||||
##mcl_compass/init.lua:function mcl_compass.get_compass_itemname(pos, dir, itemstack)
|
|
||||||
Returns the itemname of a compass with needle direction matching the
|
|
||||||
current compass position.
|
|
||||||
|
|
||||||
pos: position of the compass;
|
|
||||||
dir: rotational orientation of the compass;
|
|
||||||
itemstack: the compass including its optional lodestone metadata.
|
|
||||||
|
|
||||||
##mcl_compass/init.lua:function mcl_compass.get_compass_image(pos, dir)
|
|
||||||
-- Returns partial itemname of a compass with needle direction matching compass position.
|
|
||||||
-- Legacy compatibility function for mods using older api.
|
|
||||||
|
|
||||||
|
|
|
@ -1,56 +1,16 @@
|
||||||
|
local stereotype_frame = 18
|
||||||
|
|
||||||
|
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
mcl_compass = {}
|
mcl_compass = {}
|
||||||
|
|
||||||
local compass_types = {
|
|
||||||
{
|
|
||||||
name = "compass",
|
|
||||||
desc = S("Compass"),
|
|
||||||
tt = S("Points to the world origin"),
|
|
||||||
longdesc = S("Compasses are tools which point to the world origin (X=0, Z=0) or the spawn point in the Overworld."),
|
|
||||||
usagehelp = S("A Compass always points to the world spawn point when the player is in the overworld. In other dimensions, it spins randomly."),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "compass_lodestone",
|
|
||||||
desc = S("Lodestone Compass"),
|
|
||||||
tt = S("Points to a lodestone"),
|
|
||||||
longdesc = S("Lodestone compasses resemble regular compasses, but they point to a specific lodestone."),
|
|
||||||
usagehelp = S("A Lodestone compass can be made from an ordinary compass by using it on a lodestone. After becoming a lodestone compass, it always points to its linked lodestone, provided that they are in the same dimension. If not in the same dimension, the lodestone compass spins randomly, similarly to a regular compass when outside the overworld. A lodestone compass can be relinked with another lodestone."),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Number of dynamic compass images (and items registered.)
|
|
||||||
local compass_frames = 32
|
local compass_frames = 32
|
||||||
|
|
||||||
-- The image/item that is craftable and shown in inventories.
|
|
||||||
local stereotype_frame = 18
|
|
||||||
|
|
||||||
-- random compass spinning tick in seconds.
|
|
||||||
-- Increase if there are performance problems.
|
|
||||||
local spin_timer_tick = 0.5
|
|
||||||
|
|
||||||
-- Local aliases to globals for better lua performance
|
|
||||||
local m_deg = math.deg
|
|
||||||
local m_atan2 = math.atan2
|
|
||||||
local m_floor = math.floor
|
|
||||||
local m_rnd = math.random
|
|
||||||
local vec_new = vector.new
|
|
||||||
local string_find = string.find
|
|
||||||
local string_to_pos = minetest.string_to_pos
|
|
||||||
local get_connected_players = minetest.get_connected_players
|
|
||||||
local get_item_group = minetest.get_item_group
|
|
||||||
local setting_get_pos = minetest.setting_get_pos
|
|
||||||
local compass_works = mcl_worlds.compass_works
|
|
||||||
local y_to_layer = mcl_worlds.y_to_layer
|
|
||||||
|
|
||||||
-- Initialize random compass frame for spinning compass. It is updated in
|
|
||||||
-- the compass globalstep function.
|
|
||||||
local random_frame = m_rnd(0, compass_frames-1)
|
|
||||||
|
|
||||||
local function get_far_node(pos, itemstack) --code from minetest dev wiki: https://dev.minetest.net/minetest.get_node, some edits have been made to add a cooldown for force loads
|
local function get_far_node(pos, itemstack) --code from minetest dev wiki: https://dev.minetest.net/minetest.get_node, some edits have been made to add a cooldown for force loads
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
if node.name == "ignore" then
|
if node.name == "ignore" then
|
||||||
local tstamp = tonumber(itemstack:get_meta():get_string("last_forceload"))
|
tstamp = tonumber(itemstack:get_meta():get_string("last_forceload"))
|
||||||
if tstamp == nil then --this is only relevant for new lodestone compasses, the ones that have never performes a forceload yet
|
if tstamp == nil then --this is only relevant for new lodestone compasses, the ones that have never performes a forceload yet
|
||||||
itemstack:get_meta():set_string("last_forceload", tostring(os.time(os.date("!*t"))))
|
itemstack:get_meta():set_string("last_forceload", tostring(os.time(os.date("!*t"))))
|
||||||
tstamp = tonumber(os.time(os.date("!*t")))
|
tstamp = tonumber(os.time(os.date("!*t")))
|
||||||
|
@ -66,183 +26,154 @@ local function get_far_node(pos, itemstack) --code from minetest dev wiki: https
|
||||||
return node
|
return node
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Get compass needle angle.
|
|
||||||
-- Returns the angle that the compass needle should point at expressed in
|
|
||||||
-- 360 degrees divided by the number of possible compass image frames..
|
|
||||||
--
|
|
||||||
-- pos: position of the compass;
|
|
||||||
-- target: position that the needle points towards;
|
|
||||||
-- dir: rotational direction of the compass.
|
|
||||||
--
|
|
||||||
local function get_compass_angle(pos, target, dir)
|
|
||||||
local angle_north = m_deg(m_atan2(target.x - pos.x, target.z - pos.z))
|
|
||||||
if angle_north < 0 then angle_north = angle_north + 360 end
|
|
||||||
local angle_dir = -m_deg(dir)
|
|
||||||
local angle_relative = (angle_north - angle_dir + 180) % 360
|
|
||||||
return m_floor((angle_relative/11.25) + 0.5) % compass_frames
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Get compass image frame.
|
--Not sure spawn point should be dymanic (is it in mc?)
|
||||||
-- Returns the compass image frame with the needle direction matching the
|
--local default_spawn_settings = minetest.settings:get("static_spawnpoint")
|
||||||
-- compass' current position.
|
|
||||||
--
|
-- Timer for random compass spinning
|
||||||
-- pos: position of the compass;
|
local random_timer = 0
|
||||||
-- dir: rotational direction of the compass.
|
local random_timer_trigger = 0.5 -- random compass spinning tick in seconds. Increase if there are performance problems
|
||||||
-- itemstack: the compass including its optional lodestone metadata.
|
|
||||||
--
|
local random_frame = math.random(0, compass_frames-1)
|
||||||
local function get_compass_frame(pos, dir, itemstack)
|
|
||||||
if not string_find(itemstack:get_name(), "_lodestone") then -- normal compass
|
function mcl_compass.get_compass_image(pos, dir, itemstack)
|
||||||
-- Compasses only work in the overworld
|
if not itemstack then
|
||||||
if compass_works(pos) then
|
minetest.log("WARNING: mcl_compass.get_compass_image() was called without itemstack, returning random frame!")
|
||||||
local spawn_pos = setting_get_pos("static_spawnpoint")
|
return random_frame
|
||||||
or vec_new(0, 0, 0)
|
end
|
||||||
return get_compass_angle(pos, spawn_pos, dir)
|
|
||||||
else
|
local lodestone_pos = minetest.string_to_pos(itemstack:get_meta():get_string("pointsto"))
|
||||||
return random_frame
|
|
||||||
end
|
if lodestone_pos then --lodestone meta present
|
||||||
else -- lodestone compass
|
local _, dim = mcl_worlds.y_to_layer(lodestone_pos.y)
|
||||||
local lpos_str = itemstack:get_meta():get_string("pointsto")
|
local _, playerdim = mcl_worlds.y_to_layer(pos.y)
|
||||||
local lpos = string_to_pos(lpos_str)
|
|
||||||
if not lpos then
|
if dim == playerdim then --Check if player and compass target are in the same dimension, above check is just if the diemension is valid for the non lodestone compass
|
||||||
minetest.log("warning", "mcl_compass: invalid lodestone position!")
|
|
||||||
return random_frame
|
if get_far_node(lodestone_pos, itemstack).name == "mcl_compass:lodestone" then --check if lodestone still exists
|
||||||
end
|
local angle_north = math.deg(math.atan2(lodestone_pos.x - pos.x, lodestone_pos.z - pos.z))
|
||||||
local _, l_dim = y_to_layer(lpos.y)
|
if angle_north < 0 then angle_north = angle_north + 360 end
|
||||||
local _, p_dim = y_to_layer(pos.y)
|
local angle_dir = -math.deg(dir)
|
||||||
-- compass and lodestone must be in the same dimension
|
local angle_relative = (angle_north - angle_dir + 180) % 360
|
||||||
if l_dim == p_dim then
|
return math.floor((angle_relative/11.25) + 0.5) % compass_frames .. "_lodestone"
|
||||||
--check if lodestone still exists
|
|
||||||
if get_far_node(lpos, itemstack).name == "mcl_compass:lodestone" then
|
|
||||||
return get_compass_angle(pos, lpos, dir)
|
|
||||||
else -- lodestone got destroyed
|
else -- lodestone got destroyed
|
||||||
return random_frame
|
return random_frame .. "_lodestone"
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
return random_frame .. "_lodestone"
|
||||||
|
end
|
||||||
|
else --no lodestone meta, normal compass....
|
||||||
|
local spawn = {x = 0, y=0, z=0} --before you guys tell me that the normal compass no points to real spawn, it always pointed to 0 0
|
||||||
|
local ssp = minetest.setting_get_pos("static_spawnpoint")
|
||||||
|
if ssp then
|
||||||
|
spawn = ssp
|
||||||
|
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
|
||||||
|
spawn = {x=0,y=0,z=0}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if mcl_worlds.compass_works(pos) then --is the player in the overworld?
|
||||||
|
local angle_north = math.deg(math.atan2(spawn.x - pos.x, spawn.z - pos.z))
|
||||||
|
if angle_north < 0 then angle_north = angle_north + 360 end
|
||||||
|
local angle_dir = -math.deg(dir)
|
||||||
|
local angle_relative = (angle_north - angle_dir + 180) % 360
|
||||||
|
return math.floor((angle_relative/11.25) + 0.5) % compass_frames
|
||||||
else
|
else
|
||||||
return random_frame
|
return random_frame
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Export stereotype item for other mods to use
|
|
||||||
mcl_compass.stereotype = "mcl_compass:" .. stereotype_frame
|
|
||||||
|
|
||||||
--- Get partial compass itemname.
|
|
||||||
-- Returns partial itemname of a compass with needle direction matching compass position.
|
|
||||||
-- Legacy compatibility function for mods using older api.
|
|
||||||
--
|
|
||||||
function mcl_compass.get_compass_image(pos, dir)
|
|
||||||
minetest.log("warning", "mcl_compass: deprecated function " ..
|
|
||||||
"get_compass_image() called, use get_compass_itemname().")
|
|
||||||
local itemstack = ItemStack(mcl_compass.stereotype)
|
|
||||||
return get_compass_frame(pos, dir, itemstack)
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Get compass itemname.
|
|
||||||
-- Returns the itemname of a compass with needle direction matching the
|
|
||||||
-- current compass position.
|
|
||||||
--
|
|
||||||
-- pos: position of the compass;
|
|
||||||
-- dir: rotational orientation of the compass;
|
|
||||||
-- itemstack: the compass including its optional lodestone metadata.
|
|
||||||
--
|
|
||||||
function mcl_compass.get_compass_itemname(pos, dir, itemstack)
|
|
||||||
if not itemstack then
|
|
||||||
minetest.log("warning", "mcl_compass.get_compass_image called without itemstack!")
|
|
||||||
return "mcl_compass:" .. stereotype_frame
|
|
||||||
end
|
|
||||||
local frame = get_compass_frame(pos, dir, itemstack)
|
|
||||||
if itemstack:get_meta():get_string("pointsto") ~= "" then
|
|
||||||
return "mcl_compass:" .. frame .. "_lodestone"
|
|
||||||
else
|
|
||||||
return "mcl_compass:" .. frame
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Timer for randomly spinning compass.
|
|
||||||
-- Gets updated and checked in the globalstep function.
|
|
||||||
local spin_timer = 0
|
|
||||||
|
|
||||||
-- Compass globalstep function.
|
|
||||||
-- * updates random spin counter and random frame of spinning compasses;
|
|
||||||
-- * updates all compasses in player's inventories to match the correct
|
|
||||||
-- needle orientations for their current positions.
|
|
||||||
--
|
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
spin_timer = spin_timer + dtime
|
random_timer = random_timer + dtime
|
||||||
if spin_timer >= spin_timer_tick then
|
|
||||||
random_frame = (random_frame + m_rnd(-1, 1)) % compass_frames
|
if random_timer >= random_timer_trigger then
|
||||||
spin_timer = 0
|
random_frame = (random_frame + math.random(-1, 1)) % compass_frames
|
||||||
|
random_timer = 0
|
||||||
end
|
end
|
||||||
|
for _,player in pairs(minetest.get_connected_players()) do
|
||||||
local compass_nr, compass_frame
|
local function has_compass(player)
|
||||||
local pos, dir, inv
|
for _,stack in pairs(player:get_inventory():get_list("main")) do
|
||||||
for _, player in pairs(get_connected_players()) do
|
if minetest.get_item_group(stack:get_name(), "compass") ~= 0 then
|
||||||
pos = player:get_pos()
|
return true
|
||||||
dir = player:get_look_horizontal()
|
|
||||||
inv = player:get_inventory()
|
|
||||||
for j, stack in pairs(inv:get_list("main")) do
|
|
||||||
compass_nr = get_item_group(stack:get_name(), "compass")
|
|
||||||
if compass_nr ~= 0 then
|
|
||||||
-- check if current compass image still matches true orientation
|
|
||||||
compass_frame = get_compass_frame(pos, dir, stack)
|
|
||||||
if compass_nr - 1 ~= compass_frame then
|
|
||||||
|
|
||||||
if string_find(stack:get_name(), "_lodestone") then
|
|
||||||
stack:set_name("mcl_compass:" .. compass_frame .. "_lodestone")
|
|
||||||
else
|
|
||||||
stack:set_name("mcl_compass:" .. compass_frame)
|
|
||||||
end
|
|
||||||
inv:set_stack("main", j, stack)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if has_compass(player) then
|
||||||
|
local pos = player:get_pos()
|
||||||
|
|
||||||
|
for j,stack in pairs(player:get_inventory():get_list("main")) do
|
||||||
|
if minetest.get_item_group(stack:get_name(), "compass") ~= 0 then
|
||||||
|
local compass_image = mcl_compass.get_compass_image(pos, player:get_look_horizontal(), stack)
|
||||||
|
if minetest.get_item_group(stack:get_name(), "compass")-1 ~= compass_image and minetest.get_item_group(stack:get_name(), "compass")-1 .. "_lodestone" ~=compass_image then --Explaination: First check for normal compasses, secound check for lodestone ones
|
||||||
|
local itemname = "mcl_compass:"..compass_image
|
||||||
|
--minetest.log(os.time(os.date("!*t")))
|
||||||
|
stack:set_name(itemname)
|
||||||
|
player:get_inventory():set_stack("main", j, stack)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
--
|
local images = {}
|
||||||
-- Node and craftitem definitions
|
for frame = 0, compass_frames-1 do
|
||||||
--
|
local s = string.format("%02d", frame)
|
||||||
|
table.insert(images, "mcl_compass_compass_"..s..".png")
|
||||||
|
end
|
||||||
|
|
||||||
local doc_mod = minetest.get_modpath("doc")
|
local doc_mod = minetest.get_modpath("doc")
|
||||||
|
|
||||||
for _, item in pairs(compass_types) do
|
for i,img in ipairs(images) do
|
||||||
local name_fmt, img_fmt
|
local inv = 1
|
||||||
if item.name == "compass" then
|
if i == stereotype_frame then
|
||||||
name_fmt = "mcl_compass:%d"
|
inv = 0
|
||||||
img_fmt = "mcl_compass_compass_%02d.png"
|
|
||||||
elseif item.name == "compass_lodestone" then
|
|
||||||
name_fmt = "mcl_compass:%d_lodestone"
|
|
||||||
img_fmt = "mcl_compass_compass_%02d.png^[colorize:purple:50"
|
|
||||||
end
|
end
|
||||||
for i = 0, compass_frames - 1 do
|
local use_doc, longdesc, tt
|
||||||
local itemstring = string.format(name_fmt, i)
|
--Why is there no usage help? This should be fixed.
|
||||||
local def = {
|
--local usagehelp
|
||||||
description = item.desc,
|
use_doc = i == stereotype_frame
|
||||||
_tt_help = item.tt,
|
if use_doc then
|
||||||
inventory_image = string.format(img_fmt, i),
|
tt = S("Points to the world origin")
|
||||||
wield_image = string.format(img_fmt, i),
|
longdesc = S("Compasses are tools which point to the world origin (X=0, Z=0) or the spawn point in the Overworld.")
|
||||||
groups = {compass = i + 1, tool = 1, disable_repair = 1},
|
end
|
||||||
}
|
local itemstring = "mcl_compass:"..(i-1)
|
||||||
if i == stereotype_frame then
|
minetest.register_craftitem(itemstring, {
|
||||||
def._doc_items_longdesc = item.longdesc
|
description = S("Compass"),
|
||||||
def._doc_items_usagehelp = item.usagehelp
|
_tt_help = tt,
|
||||||
if string.match(itemstring, "lodestone") then
|
_doc_items_create_entry = use_doc,
|
||||||
def.groups.not_in_creative_inventory = 1
|
_doc_items_longdesc = longdesc,
|
||||||
end
|
--_doc_items_usagehelp = usagehelp,
|
||||||
else
|
inventory_image = img,
|
||||||
def._doc_items_create_entry = false
|
wield_image = img,
|
||||||
def.groups.not_in_creative_inventory = 1
|
stack_max = 64,
|
||||||
end
|
groups = {not_in_creative_inventory=inv, compass=i, tool=1, disable_repair=1 }
|
||||||
minetest.register_craftitem(itemstring, table.copy(def))
|
})
|
||||||
|
|
||||||
-- Help aliases. Makes sure the lookup tool works correctly
|
minetest.register_craftitem(itemstring .. "_lodestone", {
|
||||||
if doc_mod and i ~= stereotype_frame then
|
description = S("Lodestone Compass"),
|
||||||
doc.add_entry_alias("craftitems", "mcl_compass:"..(stereotype_frame), "craftitems", itemstring)
|
_tt_help = tt,
|
||||||
end
|
_doc_items_create_entry = use_doc,
|
||||||
|
_doc_items_longdesc = longdesc,
|
||||||
|
--_doc_items_usagehelp = usagehelp,
|
||||||
|
inventory_image = img .. "^[colorize:purple:50",
|
||||||
|
wield_image = img .. "^[colorize:purple:50",
|
||||||
|
stack_max = 64,
|
||||||
|
groups = {not_in_creative_inventory=1, compass=i, tool=1, disable_repair=1 }
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Help aliases. Makes sure the lookup tool works correctly
|
||||||
|
if not use_doc and doc_mod then
|
||||||
|
doc.add_entry_alias("craftitems", "mcl_compass:"..(stereotype_frame-1), "craftitems", itemstring)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "mcl_compass:" .. stereotype_frame,
|
output = "mcl_compass:"..stereotype_frame,
|
||||||
recipe = {
|
recipe = {
|
||||||
{"", "mcl_core:iron_ingot", ""},
|
{"", "mcl_core:iron_ingot", ""},
|
||||||
{"mcl_core:iron_ingot", "mesecons:redstone", "mcl_core:iron_ingot"},
|
{"mcl_core:iron_ingot", "mesecons:redstone", "mcl_core:iron_ingot"},
|
||||||
|
@ -250,19 +181,27 @@ minetest.register_craft({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias("mcl_compass:compass", "mcl_compass:" .. stereotype_frame)
|
minetest.register_craft({
|
||||||
|
output = "mcl_compass:lodestone",
|
||||||
|
recipe = {
|
||||||
|
{"mcl_core:stonebrickcarved","mcl_core:stonebrickcarved","mcl_core:stonebrickcarved"},
|
||||||
|
{"mcl_core:stonebrickcarved", "mcl_core:diamondblock", "mcl_core:stonebrickcarved"},
|
||||||
|
{"mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_alias("mcl_compass:compass", "mcl_compass:"..stereotype_frame)
|
||||||
|
|
||||||
|
-- Export stereotype item for other mods to use
|
||||||
|
mcl_compass.stereotype = "mcl_compass:"..tostring(stereotype_frame)
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("mcl_compass:lodestone",{
|
minetest.register_node("mcl_compass:lodestone",{
|
||||||
description=S("Lodestone"),
|
description=S("Lodestone"),
|
||||||
on_rightclick = function(pos, node, player, itemstack)
|
on_rightclick = function(pos, node, player, itemstack)
|
||||||
local name = itemstack.get_name(itemstack)
|
if itemstack.get_name(itemstack).match(itemstack.get_name(itemstack),"mcl_compass:") then
|
||||||
if string_find(name,"mcl_compass:") then
|
if itemstack.get_name(itemstack) ~= "mcl_compass:lodestone" then
|
||||||
if name ~= "mcl_compass:lodestone" then
|
|
||||||
itemstack:get_meta():set_string("pointsto", minetest.pos_to_string(pos))
|
itemstack:get_meta():set_string("pointsto", minetest.pos_to_string(pos))
|
||||||
local dir = player:get_look_horizontal()
|
|
||||||
local frame = get_compass_frame(pos, dir, itemstack)
|
|
||||||
itemstack:set_name("mcl_compass:" .. frame .. "_lodestone")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -279,12 +218,3 @@ minetest.register_node("mcl_compass:lodestone",{
|
||||||
_mcl_blast_resistance = 6,
|
_mcl_blast_resistance = 6,
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults()
|
sounds = mcl_sounds.node_sound_stone_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mcl_compass:lodestone",
|
|
||||||
recipe = {
|
|
||||||
{"mcl_core:stonebrickcarved","mcl_core:stonebrickcarved","mcl_core:stonebrickcarved"},
|
|
||||||
{"mcl_core:stonebrickcarved", "mcl_core:diamondblock", "mcl_core:stonebrickcarved"},
|
|
||||||
{"mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
# textdomain: mcl_compass
|
# textdomain: mcl_compass
|
||||||
|
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Kompasse sind Werkzeuge, die zum Ursprungspunkt der Welt (X@=0, Z@=0) oder zum Einstiegspunkt der Welt zeigen.
|
||||||
Compass=Kompass
|
Compass=Kompass
|
||||||
Points to the world origin=Zeigt zum Startpunkt der Welt
|
Points to the world origin=Zeigt zum Startpunkt der Welt
|
||||||
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Kompasse sind Werkzeuge, die zum Ursprungspunkt der Welt (X@=0, Z@=0) oder zum Einstiegspunkt der Welt zeigen.
|
|
||||||
A Compass always points to the world spawn point when the player is in the overworld. In other dimensions, it spins randomly.=Ein Kompass zeigt immer zum Weltspawn in der Oberwelt. In sämtlichen anderen Dimensionen dreht er sich zufällig.
|
|
||||||
Lodestone Compass=Leitstein Kompass
|
|
||||||
Points to a lodestone=Zeigt zu einem Leitstein
|
|
||||||
Lodestone compasses resemble regular compasses, but they point to a specific lodestone.=Leitstein Kompasse ähneln normalen Kompassen, aber sie zeigen zu einen spezifischen Leitstein.
|
|
||||||
A Lodestone compass can be made from an ordinary compass by using it on a lodestone. After becoming a lodestone compass, it always points to its linked lodestone, provided that they are in the same dimension. If not in the same dimension, the lodestone compass spins randomly, similarly to a regular compass when outside the overworld. A lodestone compass can be relinked with another lodestone.=Ein Leitstein Kompass kann mit einem normalen Kompass erstellt werden indem man ihn auf einem Leitstein benutzt. Nachdem er ein Leitstein Kompass geworden ist, wird er immer zu seinem Leitstein zeigen, sofern sie in der selben Dimension sind. Wenn sie nicht in der selben Dimension sind, dreht sich der Leitstein Kompass zufällig, wie ein normaler Kompass außerhalb der Oberwelt. Ein Leitstein Kompass kann mit einem anderem Leitstein verknüpft werden.
|
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
# textdomain: mcl_compass
|
# textdomain: mcl_compass
|
||||||
Compass=Brújula
|
|
||||||
Points to the world origin=
|
|
||||||
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Las brújulas son herramientas que apuntan al origen del mundo (X @ = 0, Z @ = 0) o al punto de generación en el mundo.
|
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Las brújulas son herramientas que apuntan al origen del mundo (X @ = 0, Z @ = 0) o al punto de generación en el mundo.
|
||||||
A Compass always points to the world spawn point when the player is in the overworld. In other dimensions, it spins randomly.=
|
Compass=Brújula
|
||||||
Lodestone Compass=
|
|
||||||
Points to a lodestone=
|
|
||||||
Lodestone compasses resemble regular compasses, but they point to a specific lodestone.=
|
|
||||||
A Lodestone compass can be made from an ordinary compass by using it on a lodestone. After becoming a lodestone compass, it always points to its linked lodestone, provided that they are in the same dimension. If not in the same dimension, the lodestone compass spins randomly, similarly to a regular compass when outside the overworld. A lodestone compass can be relinked with another lodestone.=
|
|
|
@ -1,9 +1,4 @@
|
||||||
# textdomain: mcl_compass
|
# textdomain: mcl_compass
|
||||||
|
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Les boussoles sont des outils qui pointent vers l'origine du monde (X@=0,Z@=0) ou le point d'apparition dans l'Overworld.
|
||||||
Compass=Boussole
|
Compass=Boussole
|
||||||
Points to the world origin=Pointe vers l'origine mondiale
|
Points to the world origin=Pointe vers l'origine mondiale
|
||||||
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Les boussoles sont des outils qui pointent vers l'origine du monde (X@=0,Z@=0) ou le point d'apparition dans l'Overworld.
|
|
||||||
A Compass always points to the world spawn point when the player is in the overworld. In other dimensions, it spins randomly.=
|
|
||||||
Lodestone Compass=
|
|
||||||
Points to a lodestone=
|
|
||||||
Lodestone compasses resemble regular compasses, but they point to a specific lodestone.=
|
|
||||||
A Lodestone compass can be made from an ordinary compass by using it on a lodestone. After becoming a lodestone compass, it always points to its linked lodestone, provided that they are in the same dimension. If not in the same dimension, the lodestone compass spins randomly, similarly to a regular compass when outside the overworld. A lodestone compass can be relinked with another lodestone.=
|
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
# textdomain: mcl_compass
|
# textdomain: mcl_compass
|
||||||
|
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Kompasy to narzędzia które wskazują na punkt początku świata (X@=0, Z@=0) lub na miejsce odrodzenia na Powierzchni.
|
||||||
Compass=Kompas
|
Compass=Kompas
|
||||||
Points to the world origin=Wskazuje na początek świata
|
Points to the world origin=Wskazuje na początek świata
|
||||||
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Kompasy to narzędzia które wskazują na punkt początku świata (X@=0, Z@=0) lub na miejsce odrodzenia na Powierzchni.
|
|
||||||
A Compass always points to the world spawn point when the player is in the overworld. In other dimensions, it spins randomly.=
|
|
||||||
Lodestone Compass=
|
|
||||||
Points to a lodestone=
|
|
||||||
Lodestone compasses resemble regular compasses, but they point to a specific lodestone.=
|
|
||||||
A Lodestone compass can be made from an ordinary compass by using it on a lodestone. After becoming a lodestone compass, it always points to its linked lodestone, provided that they are in the same dimension. If not in the same dimension, the lodestone compass spins randomly, similarly to a regular compass when outside the overworld. A lodestone compass can be relinked with another lodestone.=
|
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
# textdomain: mcl_compass
|
# textdomain: mcl_compass
|
||||||
|
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Компас - инструмент, показывающий на начало мира (X@=0, Z@=0) или на точку возрождения в Верхнем Мире.
|
||||||
Compass=Компас
|
Compass=Компас
|
||||||
Points to the world origin=Указывает на начало мира
|
Points to the world origin=Указывает на начало мира
|
||||||
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Компас - инструмент, показывающий на начало мира (X@=0, Z@=0) или на точку возрождения в Верхнем Мире.
|
|
||||||
A Compass always points to the world spawn point when the player is in the overworld. In other dimensions, it spins randomly.=
|
|
||||||
Lodestone Compass=
|
|
||||||
Points to a lodestone=
|
|
||||||
Lodestone compasses resemble regular compasses, but they point to a specific lodestone.=
|
|
||||||
A Lodestone compass can be made from an ordinary compass by using it on a lodestone. After becoming a lodestone compass, it always points to its linked lodestone, provided that they are in the same dimension. If not in the same dimension, the lodestone compass spins randomly, similarly to a regular compass when outside the overworld. A lodestone compass can be relinked with another lodestone.=
|
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
# textdomain: mcl_compass
|
# textdomain: mcl_compass
|
||||||
|
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=指南針是指向世界原點(X@=0,Z@=0)或主世界的出生點的工具。
|
||||||
Compass=指南針
|
Compass=指南針
|
||||||
Points to the world origin=指向世界原點
|
Points to the world origin=指向世界原點
|
||||||
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=指南針是指向世界原點(X@=0,Z@=0)或主世界的出生點的工具。
|
|
||||||
A Compass always points to the world spawn point when the player is in the overworld. In other dimensions, it spins randomly.=
|
|
||||||
Lodestone Compass=
|
|
||||||
Points to a lodestone=
|
|
||||||
Lodestone compasses resemble regular compasses, but they point to a specific lodestone.=
|
|
||||||
A Lodestone compass can be made from an ordinary compass by using it on a lodestone. After becoming a lodestone compass, it always points to its linked lodestone, provided that they are in the same dimension. If not in the same dimension, the lodestone compass spins randomly, similarly to a regular compass when outside the overworld. A lodestone compass can be relinked with another lodestone.=
|
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
# textdomain: mcl_compass
|
# textdomain: mcl_compass
|
||||||
|
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=
|
||||||
Compass=
|
Compass=
|
||||||
Points to the world origin=
|
Points to the world origin=
|
||||||
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=
|
|
||||||
A Compass always points to the world spawn point when the player is in the overworld. In other dimensions, it spins randomly.=
|
|
||||||
Lodestone Compass=
|
|
||||||
Points to a lodestone=
|
|
||||||
Lodestone compasses resemble regular compasses, but they point to a specific lodestone.=
|
|
||||||
A Lodestone compass can be made from an ordinary compass by using it on a lodestone. After becoming a lodestone compass, it always points to its linked lodestone, provided that they are in the same dimension. If not in the same dimension, the lodestone compass spins randomly, similarly to a regular compass when outside the overworld. A lodestone compass can be relinked with another lodestone.=
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ minetest.register_node("mcl_core:slimeblock", {
|
||||||
neighbor_node = minetest.get_node(neighbor_pos)
|
neighbor_node = minetest.get_node(neighbor_pos)
|
||||||
end
|
end
|
||||||
local name = neighbor_node.name
|
local name = neighbor_node.name
|
||||||
if name ~= "air" and name ~= "ignore" and not mesecon.mvps_unsticky[name] then
|
if name ~= "air" and name ~= "ignore" then
|
||||||
local piston, piston_side, piston_up, piston_down = false, false, false, false
|
local piston, piston_side, piston_up, piston_down = false, false, false, false
|
||||||
if name == "mesecons_pistons:piston_sticky_off" or name == "mesecons_pistons:piston_normal_off" then
|
if name == "mesecons_pistons:piston_sticky_off" or name == "mesecons_pistons:piston_normal_off" then
|
||||||
piston, piston_side = true, true
|
piston, piston_side = true, true
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
mcl_fletching_table
|
|
||||||
-------------------
|
|
||||||
Fletching Tables, by PrairieWind
|
|
||||||
|
|
||||||
Adds Fletching Tables to MineClone 2/5.
|
|
||||||
|
|
||||||
License of source code
|
|
||||||
----------------------
|
|
||||||
LGPLv2.1
|
|
||||||
|
|
||||||
License of media
|
|
||||||
----------------
|
|
||||||
See the main MineClone 2 README.md file.
|
|
|
@ -1,23 +0,0 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
|
||||||
-- Fletching Table Code. No use as of current Minecraft Updates. Basically a decor block. As of now, this is complete.
|
|
||||||
minetest.register_node("mcl_fletching_table:fletching_table", {
|
|
||||||
description = S("Fletching Table"),
|
|
||||||
_tt_help = S("A fletching table"),
|
|
||||||
_doc_items_longdesc = S("This is the fletcher villager's work station. It currently has no use beyond decoration."),
|
|
||||||
tiles = {
|
|
||||||
"fletching_table_top.png", "fletching_table_top.png",
|
|
||||||
"fletching_table_side.png", "fletching_table_side.png",
|
|
||||||
"fletching_table_front.png", "fletching_table_front.png"
|
|
||||||
},
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = {choppy=1, deco_block=1, material_wood=1, flammable=1}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mcl_fletching_table:fletching_table",
|
|
||||||
recipe = {
|
|
||||||
{ "mcl_core:flint", "mcl_core:flint", "" },
|
|
||||||
{ "group:wood", "group:wood", "" },
|
|
||||||
{ "group:wood", "group:wood", "" },
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -1,3 +0,0 @@
|
||||||
name = mcl_fletching_table
|
|
||||||
author = PrairieWind
|
|
||||||
description = Adds the fletching table villager workstation to MineClone 2/5.
|
|
Before Width: | Height: | Size: 720 B |
Before Width: | Height: | Size: 745 B |
Before Width: | Height: | Size: 630 B |
|
@ -222,7 +222,7 @@ minetest.register_node("mcl_itemframes:item_frame",{
|
||||||
put_itemstack:set_count(1)
|
put_itemstack:set_count(1)
|
||||||
local itemname = put_itemstack:get_name()
|
local itemname = put_itemstack:get_name()
|
||||||
if minetest.get_item_group(itemname, "compass") > 0 then
|
if minetest.get_item_group(itemname, "compass") > 0 then
|
||||||
put_itemstack:set_name(mcl_compass.get_compass_itemname(pos, minetest.dir_to_yaw(minetest.facedir_to_dir(node.param2)), put_itemstack))
|
put_itemstack:set_name("mcl_compass:" .. mcl_compass.get_compass_image(pos, minetest.dir_to_yaw(minetest.facedir_to_dir(node.param2)), put_itemstack))
|
||||||
end
|
end
|
||||||
if minetest.get_item_group(itemname, "clock") > 0 then
|
if minetest.get_item_group(itemname, "clock") > 0 then
|
||||||
minetest.get_node_timer(pos):start(1.0)
|
minetest.get_node_timer(pos):start(1.0)
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
mcl_loom
|
|
||||||
--------
|
|
||||||
Looms, by PrairieWind
|
|
||||||
|
|
||||||
Adds Looms to MineClone 2/5. Used to add patterns to banners.
|
|
||||||
|
|
||||||
License of source code
|
|
||||||
----------------------
|
|
||||||
LGPLv2.1
|
|
||||||
|
|
||||||
License of media
|
|
||||||
----------------
|
|
||||||
See the main MineClone 2 README.md file.
|
|
|
@ -1,25 +0,0 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
|
||||||
-- Loom Code. Used to craft banner designs easier. Still needs a GUI. https://minecraft.fandom.com/wiki/Loom
|
|
||||||
|
|
||||||
minetest.register_node("mcl_loom:loom", {
|
|
||||||
description = S("Loom"),
|
|
||||||
_tt_help = S("Used to create banner designs"),
|
|
||||||
_doc_items_longdesc = S("This is the shepherd villager's work station. It is used to create banner designs."),
|
|
||||||
tiles = {
|
|
||||||
"loom_top.png", "loom_bottom.png",
|
|
||||||
"loom_side.png", "loom_side.png",
|
|
||||||
"loom_front.png", "loom_front.png"
|
|
||||||
},
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = {choppy=1, deco_block=1, material_wood=1, flammable=1}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mcl_loom:loom",
|
|
||||||
recipe = {
|
|
||||||
{ "", "", "" },
|
|
||||||
{ "mcl_mobitems:string", "mcl_mobitems:string", "" },
|
|
||||||
{ "group:wood", "group:wood", "" },
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -1,3 +0,0 @@
|
||||||
name = mcl_loom
|
|
||||||
author = PrairieWind
|
|
||||||
description = Adds the loom villager workstation to MineClone 2/5. Used to add patterns to banners.
|
|
Before Width: | Height: | Size: 315 B |
Before Width: | Height: | Size: 395 B |
Before Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 615 B |
Before Width: | Height: | Size: 360 B |
Before Width: | Height: | Size: 639 B |
Before Width: | Height: | Size: 358 B |
Before Width: | Height: | Size: 468 B |
|
@ -116,8 +116,6 @@ minetest.register_globalstep(function(dtime)
|
||||||
meta = player:get_meta()
|
meta = player:get_meta()
|
||||||
meta:set_string("_is_invisible", minetest.serialize(EF.invisible[player]))
|
meta:set_string("_is_invisible", minetest.serialize(EF.invisible[player]))
|
||||||
end
|
end
|
||||||
potions_set_hud(player)
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -197,7 +195,6 @@ minetest.register_globalstep(function(dtime)
|
||||||
if player:get_pos() then mcl_potions._add_spawner(player, "#2E5299") end
|
if player:get_pos() then mcl_potions._add_spawner(player, "#2E5299") end
|
||||||
|
|
||||||
if player:get_breath() then
|
if player:get_breath() then
|
||||||
hb.hide_hudbar(player, "breath")
|
|
||||||
if player:get_breath() < 10 then player:set_breath(10) end
|
if player:get_breath() < 10 then player:set_breath(10) end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -206,7 +203,6 @@ minetest.register_globalstep(function(dtime)
|
||||||
meta:set_string("_is_water_breathing", minetest.serialize(EF.water_breathing[player]))
|
meta:set_string("_is_water_breathing", minetest.serialize(EF.water_breathing[player]))
|
||||||
EF.water_breathing[player] = nil
|
EF.water_breathing[player] = nil
|
||||||
end
|
end
|
||||||
potions_set_hud(player)
|
|
||||||
|
|
||||||
else
|
else
|
||||||
EF.water_breathing[player] = nil
|
EF.water_breathing[player] = nil
|
||||||
|
@ -229,7 +225,6 @@ minetest.register_globalstep(function(dtime)
|
||||||
meta = player:get_meta()
|
meta = player:get_meta()
|
||||||
meta:set_string("_is_leaping", minetest.serialize(EF.leaping[player]))
|
meta:set_string("_is_leaping", minetest.serialize(EF.leaping[player]))
|
||||||
end
|
end
|
||||||
potions_set_hud(player)
|
|
||||||
|
|
||||||
else
|
else
|
||||||
EF.leaping[player] = nil
|
EF.leaping[player] = nil
|
||||||
|
@ -252,7 +247,6 @@ minetest.register_globalstep(function(dtime)
|
||||||
meta = player:get_meta()
|
meta = player:get_meta()
|
||||||
meta:set_string("_is_swift", minetest.serialize(EF.swift[player]))
|
meta:set_string("_is_swift", minetest.serialize(EF.swift[player]))
|
||||||
end
|
end
|
||||||
potions_set_hud(player)
|
|
||||||
|
|
||||||
else
|
else
|
||||||
EF.swift[player] = nil
|
EF.swift[player] = nil
|
||||||
|
@ -276,7 +270,6 @@ minetest.register_globalstep(function(dtime)
|
||||||
meta:set_int("night_vision", 0)
|
meta:set_int("night_vision", 0)
|
||||||
end
|
end
|
||||||
mcl_weather.skycolor.update_sky_color({player})
|
mcl_weather.skycolor.update_sky_color({player})
|
||||||
potions_set_hud(player)
|
|
||||||
|
|
||||||
else
|
else
|
||||||
EF.night_vision[player] = nil
|
EF.night_vision[player] = nil
|
||||||
|
@ -300,7 +293,6 @@ minetest.register_globalstep(function(dtime)
|
||||||
meta = player:get_meta()
|
meta = player:get_meta()
|
||||||
meta:set_string("_is_fire_proof", minetest.serialize(EF.fire_proof[player]))
|
meta:set_string("_is_fire_proof", minetest.serialize(EF.fire_proof[player]))
|
||||||
end
|
end
|
||||||
potions_set_hud(player)
|
|
||||||
|
|
||||||
else
|
else
|
||||||
EF.fire_proof[player] = nil
|
EF.fire_proof[player] = nil
|
||||||
|
|
|
@ -13,7 +13,6 @@ dofile(settlements.modpath.."/paths.lua")
|
||||||
settlements.grundstellungen()
|
settlements.grundstellungen()
|
||||||
|
|
||||||
|
|
||||||
local villagegen={}
|
|
||||||
--
|
--
|
||||||
-- register block for npc spawn
|
-- register block for npc spawn
|
||||||
--
|
--
|
||||||
|
@ -30,7 +29,6 @@ minetest.register_node("mcl_villages:stonebrickcarved", {
|
||||||
_mcl_hardness = 1.5,
|
_mcl_hardness = 1.5,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_villages:structblock", {drawtype="airlike",groups = {not_in_creative_inventory=1},})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,17 +48,6 @@ if minetest.get_modpath("mobs_mc") then
|
||||||
end
|
end
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
local function spawn_villagers(minp,maxp)
|
|
||||||
local beds=minetest.find_nodes_in_area(minp,maxp,{"mcl_beds:bed_red_bottom"})
|
|
||||||
for _,bed in pairs(beds) do
|
|
||||||
minetest.get_meta(bed):set_string("villagebed","true")
|
|
||||||
local v=minetest.add_entity(bed,"mobs_mc:villager")
|
|
||||||
if v then
|
|
||||||
v:get_luaentity().bed = bed
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- on map generation, try to build a settlement
|
-- on map generation, try to build a settlement
|
||||||
--
|
--
|
||||||
|
@ -79,10 +66,6 @@ local function build_a_settlement(minp, maxp, blockseed)
|
||||||
|
|
||||||
-- evaluate settlement_info and place schematics
|
-- evaluate settlement_info and place schematics
|
||||||
settlements.place_schematics(settlement_info, pr)
|
settlements.place_schematics(settlement_info, pr)
|
||||||
|
|
||||||
minetest.after(60,function()
|
|
||||||
spawn_villagers(minp,maxp)
|
|
||||||
end) --give the village some time to fully generate
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function ecb_village(blockpos, action, calls_remaining, param)
|
local function ecb_village(blockpos, action, calls_remaining, param)
|
||||||
|
@ -101,31 +84,14 @@ if mg_name ~= "singlenode" then
|
||||||
if blockseed % 77 ~= 17 then return end
|
if blockseed % 77 ~= 17 then return end
|
||||||
-- needed for manual and automated settlement building
|
-- needed for manual and automated settlement building
|
||||||
-- don't build settlements on (too) uneven terrain
|
-- don't build settlements on (too) uneven terrain
|
||||||
local n=minetest.get_node_or_nil(minp)
|
--local heightmap = minetest.get_mapgen_object("heightmap")
|
||||||
if n and n.name == "mcl_villages:structblock" then return end
|
|
||||||
if villagegen[minetest.pos_to_string(minp)] ~= nil then return end
|
|
||||||
minetest.set_node(minp,{name="mcl_villages:structblock"})
|
|
||||||
|
|
||||||
local height_difference = settlements.evaluate_heightmap()
|
local height_difference = settlements.evaluate_heightmap()
|
||||||
if height_difference > max_height_difference then return end
|
if height_difference > max_height_difference then return end
|
||||||
|
|
||||||
villagegen[minetest.pos_to_string(minp)]={minp=vector.new(minp), maxp=vector.new(maxp), blockseed=blockseed}
|
local param={minp=vector.new(minp), maxp=vector.new(maxp), blockseed=blockseed}
|
||||||
|
minetest.emerge_area(minp, maxp, ecb_village, param)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_lbm({
|
|
||||||
name = "mcl_villages:structblock",
|
|
||||||
run_at_every_load = true,
|
|
||||||
nodenames = {"mcl_villages:structblock"},
|
|
||||||
action = function(pos, node)
|
|
||||||
minetest.set_node(pos, {name = "air"})
|
|
||||||
if not villagegen[minetest.pos_to_string(pos)] then return end
|
|
||||||
local minp=villagegen[minetest.pos_to_string(pos)].minp
|
|
||||||
local maxp=villagegen[minetest.pos_to_string(pos)].maxp
|
|
||||||
minetest.emerge_area(minp, maxp, ecb_village, villagegen[minetest.pos_to_string(minp)])
|
|
||||||
villagegen[minetest.pos_to_string(minp)]=nil
|
|
||||||
end
|
|
||||||
})
|
|
||||||
-- manually place villages
|
-- manually place villages
|
||||||
if minetest.is_creative_enabled("") then
|
if minetest.is_creative_enabled("") then
|
||||||
minetest.register_craftitem("mcl_villages:tool", {
|
minetest.register_craftitem("mcl_villages:tool", {
|
||||||
|
|
|
@ -242,7 +242,8 @@ minetest.register_globalstep(function(dtime)
|
||||||
local c_x, c_y = unpack(player_collision(player))
|
local c_x, c_y = unpack(player_collision(player))
|
||||||
|
|
||||||
if player_velocity.x + player_velocity.y < .5 and c_x + c_y > 0 then
|
if player_velocity.x + player_velocity.y < .5 and c_x + c_y > 0 then
|
||||||
player:add_velocity({x = c_x, y = 0, z = c_y})
|
local add_velocity = player.add_player_velocity or player.add_velocity
|
||||||
|
add_velocity(player, {x = c_x, y = 0, z = c_y})
|
||||||
player_velocity = player:get_velocity() or player:get_player_velocity()
|
player_velocity = player:get_velocity() or player:get_player_velocity()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -285,7 +286,8 @@ minetest.register_globalstep(function(dtime)
|
||||||
if elytra.rocketing > 0 then
|
if elytra.rocketing > 0 then
|
||||||
elytra.rocketing = elytra.rocketing - dtime
|
elytra.rocketing = elytra.rocketing - dtime
|
||||||
if vector.length(player_velocity) < 40 then
|
if vector.length(player_velocity) < 40 then
|
||||||
player:add_velocity(vector.multiply(player:get_look_dir(), 4))
|
local add_velocity = player.add_velocity or player.add_player_velocity
|
||||||
|
add_velocity(player, vector.multiply(player:get_look_dir(), 4))
|
||||||
add_particle({
|
add_particle({
|
||||||
pos = fly_pos,
|
pos = fly_pos,
|
||||||
velocity = {x = 0, y = 0, z = 0},
|
velocity = {x = 0, y = 0, z = 0},
|
||||||
|
|
|
@ -452,33 +452,12 @@ function mcl_spawn.get_player_spawn_pos(player)
|
||||||
if bgroup ~= 1 and bgroup ~= 2 then
|
if bgroup ~= 1 and bgroup ~= 2 then
|
||||||
-- Bed is destroyed:
|
-- Bed is destroyed:
|
||||||
if player and player:is_player() then
|
if player and player:is_player() then
|
||||||
local checkpos = minetest.string_to_pos(player:get_meta():get_string("mcl_beds:spawn"))
|
player:get_meta():set_string("mcl_beds:spawn", "")
|
||||||
local checknode = minetest.get_node(checkpos)
|
|
||||||
|
|
||||||
if(string.match(checknode.name, "mcl_beds:respawn_anchor_charged_")) then
|
|
||||||
local charge_level = tonumber(string.sub(checknode.name, -1))
|
|
||||||
if not charge_level then
|
|
||||||
minetest.log("warning","could not get level of players respawn anchor, sending him back to spawn!")
|
|
||||||
player:get_meta():set_string("mcl_beds:spawn", "")
|
|
||||||
minetest.chat_send_player(player:get_player_name(), S("Couldn't get level of your respawn anchor!"))
|
|
||||||
return mcl_spawn.get_world_spawn_pos(), false
|
|
||||||
elseif charge_level ~= 1 then
|
|
||||||
minetest.set_node(checkpos, {name="mcl_beds:respawn_anchor_charged_".. charge_level-1})
|
|
||||||
return checkpos, false
|
|
||||||
else
|
|
||||||
minetest.set_node(checkpos, {name="mcl_beds:respawn_anchor"})
|
|
||||||
return checkpos, false
|
|
||||||
end
|
|
||||||
else
|
|
||||||
player:get_meta():set_string("mcl_beds:spawn", "")
|
|
||||||
minetest.chat_send_player(player:get_player_name(), S("Your spawn bed was missing or blocked, and you had no charged respawn anchor!"))
|
|
||||||
return mcl_spawn.get_world_spawn_pos(), false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
minetest.chat_send_player(player:get_player_name(), S("Your spawn bed was missing or blocked."))
|
||||||
|
return mcl_spawn.get_world_spawn_pos(), false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Find spawning position on/near the bed free of solid or damaging blocks iterating a square spiral 15x15:
|
-- Find spawning position on/near the bed free of solid or damaging blocks iterating a square spiral 15x15:
|
||||||
|
|
||||||
local dir = minetest.facedir_to_dir(minetest.get_node(pos).param2)
|
local dir = minetest.facedir_to_dir(minetest.get_node(pos).param2)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# textdomain: mcl_spawn
|
# textdomain: mcl_spawn
|
||||||
New respawn position set!=Neue Wiedereinstiegsposition gesetzt!
|
New respawn position set!=Neue Wiedereinstiegsposition gesetzt!
|
||||||
Respawn position cleared!=Wiedereinstiegsposition gelöscht!
|
Respawn position cleared!=Wiedereinstiegsposition gelöscht!
|
||||||
Your spawn bed was missing or blocked, and you had no charged respawn anchor!=Ihr Startbett fehlte oder war blockiert, und Sie hatten keinen geladenen Seelenanker!
|
Your spawn bed was missing or blocked.=Ihr Startbett fehlte oder war blockiert.
|
||||||
Couldn't get level of your respawn anchor!=Das Füllstand ihres Seelenankers konnte nicht erkannt werden!
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# textdomain: mcl_spawn
|
# textdomain: mcl_spawn
|
||||||
New respawn position set!=
|
New respawn position set!=
|
||||||
Respawn position cleared!=
|
Respawn position cleared!=
|
||||||
Couldn't get level of your respawn anchor!=
|
Your spawn bed was missing or blocked.=
|
||||||
Your spawn bed was missing or blocked, and you had no charged respawn anchor!=
|
|
||||||
|
|