Compare commits
34 Commits
zombie_tex
...
master
Author | SHA1 | Date |
---|---|---|
loveaabb | 195b193260 | |
loveaabb | 83a651d375 | |
loveaabb | 19190d92e7 | |
loveaabb | f50ef6b52a | |
loveaabb | 50fda3e844 | |
Mikita Wiśniewski | 3b1c55c234 | |
Mikita Wiśniewski | 0ef81681ba | |
the-real-herowl | efc6ab0bbf | |
Bram van den Heuvel | 69acc5074b | |
the-real-herowl | 7d999535e7 | |
teknomunk | 81ca224bb8 | |
nixnoxus | 3975449ad2 | |
teknomunk | 6756658ee9 | |
the-real-herowl | 4dde321a04 | |
Araca | cd0509c2e6 | |
the-real-herowl | cc1e01ad78 | |
the-real-herowl | b9428e3438 | |
teknomunk | 0c372f987d | |
Bakawun | 22c4daab22 | |
nixnoxus | 760fe1aa68 | |
Eliy21 | f78ad93fd3 | |
the-real-herowl | d321b166ea | |
JoseDouglas26 | 18342e44c8 | |
JoseDouglas26 | 2430953a81 | |
the-real-herowl | a25e2b8eb3 | |
the-real-herowl | ee2998e21b | |
the-real-herowl | e0aadc7996 | |
the-real-herowl | 9f65c5efb7 | |
the-real-herowl | 7ad4ca2dbe | |
JoseDouglas26 | 1161d5cd36 | |
SmokeyDope | 538c206985 | |
Doods | 31facbd902 | |
the-real-herowl | 5f70189e08 | |
nixnoxus | 9809c627dc |
|
@ -168,7 +168,7 @@ end
|
|||
|
||||
|
||||
function boat.on_activate(self, staticdata, dtime_s)
|
||||
self.object:set_armor_groups({fleshy = 100})
|
||||
self.object:set_armor_groups({fleshy = 125})
|
||||
local data = minetest.deserialize(staticdata)
|
||||
if type(data) == "table" then
|
||||
self._v = data.v
|
||||
|
|
|
@ -6,9 +6,6 @@ local pool = {}
|
|||
|
||||
local tick = false
|
||||
|
||||
|
||||
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
pool[player:get_player_name()] = 0
|
||||
end)
|
||||
|
@ -172,17 +169,17 @@ minetest.register_globalstep(function(_)
|
|||
|
||||
local pos = player:get_pos()
|
||||
|
||||
if tick == true and pool[name] > 0 then
|
||||
if tick == true and (pool[name] or 0) > 0 then
|
||||
minetest.sound_play("item_drop_pickup", {
|
||||
pos = pos,
|
||||
gain = 0.3,
|
||||
max_hear_distance = 16,
|
||||
pitch = math.random(70, 110) / 100
|
||||
})
|
||||
if pool[name] > 6 then
|
||||
if (pool[name] or 0) > 6 then
|
||||
pool[name] = 6
|
||||
else
|
||||
pool[name] = pool[name] - 1
|
||||
pool[name] = (pool[name] or 1) - 1
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -374,7 +374,7 @@ function mcl_mobs.register_arrow(name, def)
|
|||
rotate = def.rotate,
|
||||
on_punch = def.on_punch or function(self, puncher, time_from_last_punch, tool_capabilities, dir, damage)
|
||||
local vel = self.object:get_velocity():length()
|
||||
self.object:set_velocity({x=dir.x * vel, y=dir.y * vel, z=dir.z * vel})
|
||||
self.object:set_velocity(dir * vel)
|
||||
self._puncher = puncher
|
||||
end,
|
||||
collisionbox = def.collisionbox or {0, 0, 0, 0, 0, 0},
|
||||
|
|
|
@ -87,7 +87,8 @@ function mob_class:check_item_pickup()
|
|||
end
|
||||
if self.pick_up then
|
||||
for k,v in pairs(self.pick_up) do
|
||||
if not player_near(p) and self.on_pick_up and l.itemstring:find(v) then
|
||||
local itemstack = ItemStack(l.itemstring)
|
||||
if not player_near(p) and self.on_pick_up and itemstack:get_name():find(v) then
|
||||
local r = self.on_pick_up(self,l)
|
||||
if r and r.is_empty and not r:is_empty() then
|
||||
l.itemstring = r:to_string()
|
||||
|
|
|
@ -126,13 +126,14 @@ mcl_mobs.register_arrow("mobs_mc:fireball", {
|
|||
end,
|
||||
|
||||
hit_mob = function(self, mob)
|
||||
local name = mob:get_luaentity().name
|
||||
mob:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = 6},
|
||||
}, nil)
|
||||
mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1, true)
|
||||
local ent = mob:get_luaentity()
|
||||
if not ent or ent.health <= 0 then
|
||||
if (not ent or ent.health <= 0) and self._puncher and name == "mobs_mc:ghast" then
|
||||
awards.unlock(self._puncher:get_player_name(), "mcl:fireball_redir_serv")
|
||||
end
|
||||
end,
|
||||
|
|
|
@ -122,10 +122,10 @@ local horse = {
|
|||
stand_speed = 25,
|
||||
stand_start = 0,
|
||||
stand_end = 0,
|
||||
walk_speed = 25,
|
||||
walk_speed = 100,
|
||||
walk_start = 0,
|
||||
walk_end = 40,
|
||||
run_speed = 60,
|
||||
run_speed = 200,
|
||||
run_start = 0,
|
||||
run_end = 40,
|
||||
},
|
||||
|
@ -543,11 +543,6 @@ donkey.description = S("Donkey")
|
|||
donkey.textures = {{"blank.png", "mobs_mc_donkey.png", "blank.png"}}
|
||||
donkey.spawn_in_group = 3
|
||||
donkey.spawn_in_group_min = 1
|
||||
donkey.animation = {
|
||||
speed_normal = 25,
|
||||
stand_start = 0, stand_end = 0,
|
||||
walk_start = 0, walk_end = 40,
|
||||
}
|
||||
donkey.sounds = {
|
||||
random = "mobs_mc_donkey_random",
|
||||
damage = "mobs_mc_donkey_hurt",
|
||||
|
|
|
@ -1989,6 +1989,17 @@ local trade_inventory = {
|
|||
-- Otherwise, 20% chance to unlock if used freshly reset trade
|
||||
unlock_stuff = true
|
||||
end
|
||||
-- calculate xp based on the price
|
||||
local emeralds = 0
|
||||
if wanted1:get_name() == "mcl_core:emerald" then
|
||||
emeralds = wanted1:get_count()
|
||||
elseif wanted2:get_name() == "mcl_core:emerald" then
|
||||
emeralds = wanted2:get_count()
|
||||
else
|
||||
local offered = inv:get_stack("offered", 1)
|
||||
emeralds = offered:get_name() == "mcl_core:emerald" and offered:get_count() or 0
|
||||
end
|
||||
local xp = 2 + math.ceil(emeralds / (64/4)) -- 1..64 emeralds = 3..6 xp
|
||||
local update_formspec = false
|
||||
if unlock_stuff then
|
||||
-- First-time trade unlock all trades and unlock next trade tier
|
||||
|
@ -2000,6 +2011,7 @@ local trade_inventory = {
|
|||
set_textures(trader)
|
||||
update_max_tradenum(trader)
|
||||
update_formspec = true
|
||||
xp = xp + 5
|
||||
end
|
||||
for t=1, #trades do
|
||||
trades[t].locked = false
|
||||
|
@ -2010,6 +2022,7 @@ local trade_inventory = {
|
|||
-- TODO: Replace by Regeneration I
|
||||
trader.health = math.min(trader.hp_max, trader.health + 4)
|
||||
end
|
||||
mcl_experience.add_xp(player, xp)
|
||||
trade.trade_counter = trade.trade_counter + 1
|
||||
mcl_log("Trade counter is: ".. trade.trade_counter)
|
||||
-- Semi-randomly lock trade for repeated trade (not if there's only 1 trade)
|
||||
|
@ -2047,6 +2060,7 @@ local trade_inventory = {
|
|||
if update_formspec then
|
||||
show_trade_formspec(name, trader, tradenum)
|
||||
end
|
||||
|
||||
else
|
||||
minetest.log("error", "[mobs_mc] Player took item from trader output but player_trading_with or player_tradenum is nil!")
|
||||
end
|
||||
|
|
|
@ -106,6 +106,31 @@ local item_lists = {
|
|||
"craftpreview",
|
||||
}
|
||||
|
||||
local function init_data(name)
|
||||
player_data[name] = {
|
||||
filter = "",
|
||||
pagenum = 1,
|
||||
iX = sfinv_only and 8 or DEFAULT_SIZE,
|
||||
items = init_items,
|
||||
items_raw = init_items,
|
||||
lang_code = M.get_player_information(name).lang_code or 'en',
|
||||
}
|
||||
end
|
||||
local function get_player_data(name)
|
||||
-- If the data alrady exists, use it
|
||||
local data = player_data[name]
|
||||
if data then return data end
|
||||
|
||||
-- Initialize player data if it doesn't exist
|
||||
init_data(name)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
local meta = player:get_meta()
|
||||
local data = player_data[name]
|
||||
|
||||
data.inv_items = deserialize(meta:get_string("inv_items")) or {}
|
||||
return data
|
||||
end
|
||||
|
||||
local function table_merge(t, t2)
|
||||
t, t2 = t or {}, t2 or {}
|
||||
local c = #t
|
||||
|
@ -624,7 +649,7 @@ local function get_recipe_fs(data, iY)
|
|||
end
|
||||
|
||||
local function make_formspec(name)
|
||||
local data = player_data[name]
|
||||
local data = get_player_data(name)
|
||||
local iY = sfinv_only and 4 or data.iX - 5
|
||||
local ipp = data.iX * iY
|
||||
|
||||
|
@ -831,17 +856,6 @@ local function get_inv_items(player)
|
|||
return inv_items
|
||||
end
|
||||
|
||||
local function init_data(name)
|
||||
player_data[name] = {
|
||||
filter = "",
|
||||
pagenum = 1,
|
||||
iX = sfinv_only and 8 or DEFAULT_SIZE,
|
||||
items = init_items,
|
||||
items_raw = init_items,
|
||||
lang_code = M.get_player_information(name).lang_code or 'en',
|
||||
}
|
||||
end
|
||||
|
||||
local function reset_data(data)
|
||||
data.filter = ""
|
||||
data.pagenum = 1
|
||||
|
@ -877,7 +891,7 @@ end
|
|||
|
||||
local function on_receive_fields(player, fields)
|
||||
local name = player:get_player_name()
|
||||
local data = player_data[name]
|
||||
local data = get_player_data(name)
|
||||
|
||||
for elem_name, def in pairs(formspec_elements) do
|
||||
if fields[elem_name] and def.action then
|
||||
|
@ -981,7 +995,7 @@ if sfinv_only then
|
|||
on_enter = function(self, player, context)
|
||||
if next(recipe_filters) then
|
||||
local name = player:get_player_name()
|
||||
local data = player_data[name]
|
||||
local data = get_player_data(name)
|
||||
|
||||
data.items_raw = get_filtered_items(player)
|
||||
search(data)
|
||||
|
@ -1005,7 +1019,7 @@ else
|
|||
local name = user:get_player_name()
|
||||
|
||||
if next(recipe_filters) then
|
||||
local data = player_data[name]
|
||||
local data = get_player_data(name)
|
||||
data.items_raw = get_filtered_items(user)
|
||||
search(data)
|
||||
end
|
||||
|
@ -1051,7 +1065,7 @@ if progressive_mode then
|
|||
|
||||
local function progressive_filter(recipes, player)
|
||||
local name = player:get_player_name()
|
||||
local data = player_data[name]
|
||||
local data = get_player_data(name)
|
||||
|
||||
if #data.inv_items == 0 then
|
||||
return {}
|
||||
|
@ -1076,7 +1090,7 @@ if progressive_mode then
|
|||
for i = 1, #players do
|
||||
local player = players[i]
|
||||
local name = player:get_player_name()
|
||||
local data = player_data[name]
|
||||
local data = get_player_data(name)
|
||||
local inv_items = get_inv_items(player)
|
||||
local diff = table_diff(inv_items, data.inv_items)
|
||||
|
||||
|
@ -1095,12 +1109,7 @@ if progressive_mode then
|
|||
mcl_craftguide.add_recipe_filter("Default progressive filter", progressive_filter)
|
||||
|
||||
M.register_on_joinplayer(function(player)
|
||||
local name = player:get_player_name()
|
||||
init_data(name)
|
||||
local meta = player:get_meta()
|
||||
local data = player_data[name]
|
||||
|
||||
data.inv_items = deserialize(meta:get_string("inv_items")) or {}
|
||||
get_player_data(player:get_player_name())
|
||||
end)
|
||||
|
||||
local function save_meta(player)
|
||||
|
@ -1145,7 +1154,7 @@ end
|
|||
function mcl_craftguide.show(name)
|
||||
local player = get_player_by_name(name)
|
||||
if next(recipe_filters) then
|
||||
local data = player_data[name]
|
||||
local data = get_player_data(name)
|
||||
data.items_raw = get_filtered_items(player)
|
||||
search(data)
|
||||
end
|
||||
|
|
|
@ -76,6 +76,7 @@ function tt.reload_itemstack_description(itemstack)
|
|||
orig_desc = minetest.colorize(tt.NAME_COLOR, meta:get_string("name"))
|
||||
end
|
||||
local desc = apply_snippets(orig_desc, itemstring, toolcaps or def.tool_capabilities, itemstack)
|
||||
if desc == def.description and meta:get_string("description") == "" then return end
|
||||
meta:set_string("description", desc)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -36,9 +36,14 @@ function mcl_inventory.register_survival_inventory_tab(def)
|
|||
end
|
||||
|
||||
local player_current_tab = {}
|
||||
function get_player_tab(player)
|
||||
local tab = player_current_tab[player] or "main"
|
||||
player_current_tab[player] = tab
|
||||
return tab
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player, last_login)
|
||||
player_current_tab[player] = "main"
|
||||
get_player_tab(player)
|
||||
end)
|
||||
|
||||
minetest.register_on_leaveplayer(function(player, timed_out)
|
||||
|
@ -184,7 +189,7 @@ function mcl_inventory.build_survival_formspec(player)
|
|||
inv:set_width("craft", 2)
|
||||
inv:set_size("craft", 4)
|
||||
|
||||
local tab = player_current_tab[player]
|
||||
local tab = get_player_tab(player)
|
||||
|
||||
local tab_def = nil
|
||||
|
||||
|
@ -213,7 +218,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
|
||||
for _, d in ipairs(mcl_inventory.registered_survival_inventory_tabs) do
|
||||
if player_current_tab[player] == d.id and d.access(player) then
|
||||
if get_player_tab(player) == d.id and d.access(player) then
|
||||
d.handle(player, fields)
|
||||
return
|
||||
end
|
||||
|
|
|
@ -16,19 +16,31 @@ local function offhand_get_count(player)
|
|||
return mcl_offhand.get_offhand(player):get_count()
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player, last_login)
|
||||
mcl_offhand[player] = {
|
||||
local function get_offhand(player)
|
||||
-- Get offhand data if it already exists
|
||||
local offhand = mcl_offhand[player]
|
||||
if offhand then return offhand end
|
||||
|
||||
-- Otherwise initialize it
|
||||
offhand = {
|
||||
hud = {},
|
||||
last_wear = offhand_get_wear(player),
|
||||
last_count = offhand_get_count(player),
|
||||
}
|
||||
mcl_offhand[player] = offhand
|
||||
return offhand
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player, last_login)
|
||||
get_offhand(player)
|
||||
end)
|
||||
|
||||
local function remove_hud(player, hud)
|
||||
local offhand_hud = mcl_offhand[player].hud[hud]
|
||||
local offhand = get_offhand(player)
|
||||
local offhand_hud = offhand.hud[hud]
|
||||
if offhand_hud then
|
||||
player:hud_remove(offhand_hud)
|
||||
mcl_offhand[player].hud[hud] = nil
|
||||
offhand.hud[hud] = nil
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -48,7 +60,8 @@ local function update_wear_bar(player, itemstack)
|
|||
else
|
||||
color = {255, 511 - wear_i, 0}
|
||||
end
|
||||
local wear_bar = mcl_offhand[player].hud.wear_bar
|
||||
local offhand = get_offhand(player)
|
||||
local wear_bar = offhand.hud.wear_bar
|
||||
player:hud_change(wear_bar, "text", "mcl_wear_bar.png^[colorize:#" .. rgb_to_hex(color[1], color[2], color[3]))
|
||||
player:hud_change(wear_bar, "scale", {x = 40 * wear_bar_percent, y = 3})
|
||||
player:hud_change(wear_bar, "offset", {x = -320 - (20 - player:hud_get(wear_bar).scale.x / 2), y = -13})
|
||||
|
@ -58,7 +71,8 @@ minetest.register_globalstep(function(dtime)
|
|||
for _, player in pairs(minetest.get_connected_players()) do
|
||||
local itemstack = mcl_offhand.get_offhand(player)
|
||||
local offhand_item = itemstack:get_name()
|
||||
local offhand_hud = mcl_offhand[player].hud
|
||||
local offhand = get_offhand(player)
|
||||
local offhand_hud = offhand.hud
|
||||
local item = minetest.registered_items[offhand_item]
|
||||
if offhand_item ~= "" and item then
|
||||
local item_texture = item.inventory_image .. "^[resize:" .. max_offhand_px .. "x" .. max_offhand_px
|
||||
|
@ -145,7 +159,8 @@ minetest.register_globalstep(function(dtime)
|
|||
end
|
||||
|
||||
elseif offhand_hud.slot then
|
||||
for index, _ in pairs(mcl_offhand[player].hud) do
|
||||
local offhand = get_offhand(player)
|
||||
for index, _ in pairs(offhand.hud) do
|
||||
remove_hud(player, index)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ local is_sp = minetest.is_singleplayer()
|
|||
local weather_mod = minetest.get_modpath("mcl_weather")
|
||||
local explosions_mod = minetest.get_modpath("mcl_explosions")
|
||||
local spawn_mod = minetest.get_modpath("mcl_spawn")
|
||||
local worlds_mod = minetest.get_modpath("mcl_worlds")
|
||||
local pos_to_dim = minetest.get_modpath("mcl_worlds") and mcl_worlds.pos_to_dimension or function(pos) return "overworld" end
|
||||
|
||||
local function mcl_log (message)
|
||||
mcl_util.mcl_log (message, "[Beds]")
|
||||
|
@ -38,6 +38,16 @@ local function is_night_skip_enabled()
|
|||
return players_in_bed_setting() <= 100
|
||||
end
|
||||
|
||||
local function players_in_overworld(players)
|
||||
local count = 0
|
||||
for _, player in pairs(players) do
|
||||
if player and pos_to_dim(player:get_pos()) == "overworld" then
|
||||
count = count +1
|
||||
end
|
||||
end
|
||||
return count
|
||||
end
|
||||
|
||||
local function check_in_beds(players)
|
||||
if not players then
|
||||
players = minetest.get_connected_players()
|
||||
|
@ -45,7 +55,7 @@ local function check_in_beds(players)
|
|||
if player_in_bed <= 0 then
|
||||
return false
|
||||
end
|
||||
return players_in_bed_setting() <= (player_in_bed * 100) / #players
|
||||
return players_in_bed_setting() <= (player_in_bed * 100) / players_in_overworld(players)
|
||||
end
|
||||
|
||||
-- These monsters do not prevent sleep
|
||||
|
@ -206,10 +216,10 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
|||
return true
|
||||
end
|
||||
|
||||
local function update_formspecs(finished, ges)
|
||||
local ges = ges or #minetest.get_connected_players()
|
||||
local function update_formspecs(finished, players)
|
||||
local ges = players_in_overworld(players or minetest.get_connected_players())
|
||||
local form_n = "size[12,5;true]"
|
||||
local all_in_bed = players_in_bed_setting() <= (player_in_bed * 100) / ges
|
||||
local all_in_bed = ges and players_in_bed_setting() <= (player_in_bed * 100) / ges or 0
|
||||
local night_skip = is_night_skip_enabled()
|
||||
local button_leave = "button_exit[4,3;4,0.75;leave;"..F(S("Leave bed")).."]"
|
||||
local button_abort = "button_exit[4,3;4,0.75;leave;"..F(S("Abort sleep")).."]"
|
||||
|
@ -349,25 +359,36 @@ function mcl_beds.get_bed_bottom (pos)
|
|||
return bed_bottom
|
||||
end
|
||||
|
||||
local function recheck_in_beds()
|
||||
if check_in_beds() then
|
||||
update_formspecs(is_night_skip_enabled())
|
||||
mcl_beds.sleep()
|
||||
end
|
||||
|
||||
-- check again (a player can change the dimension)
|
||||
if player_in_bed > 0 then
|
||||
update_formspecs(false)
|
||||
minetest.after(5, recheck_in_beds)
|
||||
end
|
||||
end
|
||||
|
||||
function mcl_beds.on_rightclick(pos, player, is_top)
|
||||
-- Anti-Inception: Don't allow to sleep while you're sleeping
|
||||
if player:get_meta():get_string("mcl_beds:sleeping") == "true" then
|
||||
return
|
||||
end
|
||||
if worlds_mod then
|
||||
local dim = mcl_worlds.pos_to_dimension(pos)
|
||||
if dim == "nether" or dim == "end" then
|
||||
-- Bed goes BOOM in the Nether or End.
|
||||
local node = minetest.get_node(pos)
|
||||
local dir = minetest.facedir_to_dir(node.param2)
|
||||
local dim = pos_to_dim(pos)
|
||||
if dim == "nether" or dim == "end" then
|
||||
-- Bed goes BOOM in the Nether or End.
|
||||
local node = minetest.get_node(pos)
|
||||
local dir = minetest.facedir_to_dir(node.param2)
|
||||
|
||||
minetest.remove_node(pos)
|
||||
minetest.remove_node(string.sub(node.name, -4) == "_top" and vector.subtract(pos, dir) or vector.add(pos, dir))
|
||||
if explosions_mod then
|
||||
mcl_explosions.explode(pos, 5, {drop_chance = 1.0, fire = true})
|
||||
end
|
||||
return
|
||||
minetest.remove_node(pos)
|
||||
minetest.remove_node(string.sub(node.name, -4) == "_top" and vector.subtract(pos, dir) or vector.add(pos, dir))
|
||||
if explosions_mod then
|
||||
mcl_explosions.explode(pos, 5, {drop_chance = 1.0, fire = true})
|
||||
end
|
||||
return
|
||||
end
|
||||
local name = player:get_player_name()
|
||||
local ppos = player:get_pos()
|
||||
|
@ -385,10 +406,13 @@ function mcl_beds.on_rightclick(pos, player, is_top)
|
|||
mcl_title.set(player, "actionbar", {text=message, color="white", stay=60})
|
||||
else -- someone just successfully entered a bed
|
||||
local connected_players = minetest.get_connected_players()
|
||||
local sleep_hud_message = S("@1/@2 players currently in bed.", player_in_bed, math.ceil(players_in_bed_setting() * #connected_players / 100))
|
||||
local ges = players_in_overworld(connected_players)
|
||||
local sleep_hud_message = S("@1/@2 players currently in bed.", player_in_bed, math.ceil(players_in_bed_setting() * ges / 100))
|
||||
for _, player in pairs(connected_players) do
|
||||
if not mcl_beds.player[player:get_player_name()] then -- only send message to players not sleeping.
|
||||
if mcl_title.params_get(player) then mcl_title.clear(player) end -- clear, old message is still being displayed
|
||||
-- only send message to players not sleeping and in the "overworld"
|
||||
if not mcl_beds.player[player:get_player_name()] and pos_to_dim(player:get_pos()) == "overworld" then
|
||||
-- clear, old message is still being displayed
|
||||
if mcl_title.params_get(player) then mcl_title.clear(player) end
|
||||
mcl_title.set(player, "actionbar", {text=sleep_hud_message, color="white", stay=60})
|
||||
end
|
||||
end
|
||||
|
@ -400,13 +424,8 @@ function mcl_beds.on_rightclick(pos, player, is_top)
|
|||
update_formspecs(false)
|
||||
|
||||
-- skip the night and let all players stand up
|
||||
if check_in_beds() then
|
||||
minetest.after(5, function()
|
||||
if check_in_beds() then
|
||||
update_formspecs(is_night_skip_enabled())
|
||||
mcl_beds.sleep()
|
||||
end
|
||||
end)
|
||||
if player_in_bed > 0 then
|
||||
minetest.after(5, recheck_in_beds)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -433,15 +452,10 @@ minetest.register_on_leaveplayer(function(player)
|
|||
break
|
||||
end
|
||||
end
|
||||
if check_in_beds(players) then
|
||||
minetest.after(5, function()
|
||||
if check_in_beds() then
|
||||
update_formspecs(is_night_skip_enabled())
|
||||
mcl_beds.sleep()
|
||||
end
|
||||
end)
|
||||
if player_in_bed > 0 then
|
||||
minetest.after(5, recheck_in_beds)
|
||||
end
|
||||
update_formspecs(false, #players)
|
||||
update_formspecs(false, players)
|
||||
end)
|
||||
|
||||
local message_rate_limit = tonumber(minetest.settings:get("chat_message_limit_per_10sec")) or 8 --NEVER change this! if this was java, i would've declared it as final
|
||||
|
|
|
@ -8,36 +8,60 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
|||
-- Function to allow harvesting honey and honeycomb from the beehive and bee nest.
|
||||
local honey_harvest = function(pos, node, player, itemstack, pointed_thing)
|
||||
local inv = player:get_inventory()
|
||||
local shears = minetest.get_item_group(player:get_wielded_item():get_name(), "shears") > 0
|
||||
local bottle = player:get_wielded_item():get_name() == "mcl_potions:glass_bottle"
|
||||
local beehive = "mcl_beehives:beehive"
|
||||
local item = player:get_wielded_item()
|
||||
local is_creative = minetest.is_creative_enabled(player:get_player_name())
|
||||
|
||||
-- Determine the node name to replace the beehive with if harvest is successful
|
||||
local beehive = "mcl_beehives:beehive"
|
||||
if node.name == "mcl_beehives:beehive_5" then
|
||||
beehive = "mcl_beehives:beehive"
|
||||
elseif node.name == "mcl_beehives:bee_nest_5" then
|
||||
beehive = "mcl_beehives:bee_nest"
|
||||
end
|
||||
|
||||
-- Check for a campfire within 5 blocks below the beehive
|
||||
local campfire_area = vector.offset(pos, 0, -5, 0)
|
||||
local campfire = minetest.find_nodes_in_area(pos, campfire_area, "group:lit_campfire")
|
||||
|
||||
if bottle then
|
||||
-- Player used a bottle
|
||||
if item:get_name() == "mcl_potions:glass_bottle" then
|
||||
local honey = "mcl_honey:honey_bottle"
|
||||
if inv:room_for_item("main", honey) then
|
||||
-- Replace the beehive with the version without honey or comb
|
||||
node.name = beehive
|
||||
minetest.set_node(pos, node)
|
||||
|
||||
-- Give honey bottle and take the empty bottle if survival mode
|
||||
inv:add_item("main", "mcl_honey:honey_bottle")
|
||||
if not is_creative then
|
||||
itemstack:take_item()
|
||||
end
|
||||
if not campfire[1] then mcl_util.deal_damage(player, 10) else awards.unlock(player:get_player_name(), "mcl:bee_our_guest") end
|
||||
|
||||
-- Hurt the player if there was no campfire, or give award if there was
|
||||
if not campfire[1] then
|
||||
mcl_util.deal_damage(player, 10)
|
||||
else
|
||||
awards.unlock(player:get_player_name(), "mcl:bee_our_guest")
|
||||
end
|
||||
end
|
||||
elseif shears then
|
||||
|
||||
-- Player used shears
|
||||
elseif minetest.get_item_group(item:get_name(), "shears") > 0 then
|
||||
-- Give honeycomb
|
||||
minetest.add_item(pos, "mcl_honey:honeycomb 3")
|
||||
|
||||
-- Replace the beehive with the version without honey or comb
|
||||
node.name = beehive
|
||||
minetest.set_node(pos, node)
|
||||
|
||||
-- Hurt the player if there was no campfire
|
||||
if not campfire[1] then mcl_util.deal_damage(player, 10) end
|
||||
|
||||
-- Add wear to the shears
|
||||
if not is_creative then
|
||||
mcl_util.use_item_durability(item, 1)
|
||||
return item
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -191,6 +215,18 @@ minetest.register_craft({
|
|||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "group:bee_nest",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "group:beehive",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
-- Temporary ABM to update honey levels
|
||||
minetest.register_abm({
|
||||
label = "Update Beehive Honey Levels",
|
||||
|
|
|
@ -26,3 +26,9 @@ minetest.register_craft({
|
|||
{ "group:wood", "group:wood", "" },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "mcl_cartography_table:cartography_table",
|
||||
burntime = 15,
|
||||
})
|
||||
|
|
|
@ -164,6 +164,12 @@ minetest.register_node("mcl_core:deadbush", {
|
|||
_mcl_hardness = 0,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "mcl_core:deadbush",
|
||||
burntime = 5,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_core:barrier", {
|
||||
description = S("Barrier"),
|
||||
_doc_items_longdesc = S("Barriers are invisible walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block."),
|
||||
|
|
|
@ -74,6 +74,7 @@ local end_rod_def = {
|
|||
light_source = minetest.LIGHT_MAX,
|
||||
sunlight_propagates = true,
|
||||
groups = { dig_immediate=3, deco_block=1, destroy_by_lava_flow=1, end_rod=1 },
|
||||
use_texture_alpha = "clip",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
|
@ -153,6 +154,7 @@ for num, row in ipairs(colored_end_rods) do
|
|||
def.description = desc
|
||||
def._doc_items_longdesc = nil
|
||||
def._doc_items_create_entry = false
|
||||
def.use_texture_alpha = "clip"
|
||||
local side_tex
|
||||
if name == "pink" then
|
||||
def.tiles[1] = def.tiles[1] .. "^(" .. def.tiles[1] .. end_rod_mask .. "^[multiply:" .. name .. "^[hsl:0:300)"
|
||||
|
|
|
@ -23,4 +23,10 @@ minetest.register_craft({
|
|||
{ "group:wood", "group:wood", "" },
|
||||
{ "group:wood", "group:wood", "" },
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "mcl_fletching_table:fletching_table",
|
||||
burntime = 15,
|
||||
})
|
||||
|
|
|
@ -195,6 +195,7 @@ def_clover.tiles = { "mcl_flowers_clover.png" }
|
|||
def_clover.inventory_image = "mcl_flowers_clover_inv.png"
|
||||
def_clover.wield_image = "mcl_flowers_clover_inv.png"
|
||||
def_clover.drop = nil
|
||||
def_clover.use_texture_alpha = "clip"
|
||||
def_clover.selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -4/16, -0.5, -4/16, 4/16, 0, 4/16 },
|
||||
|
@ -210,6 +211,7 @@ def_4l_clover.mesh = "mcl_clover_4leaf.obj"
|
|||
def_4l_clover.tiles = { "mcl_flowers_fourleaf_clover.png" }
|
||||
def_4l_clover.inventory_image = "mcl_flowers_fourleaf_clover_inv.png"
|
||||
def_4l_clover.wield_image = "mcl_flowers_fourleaf_clover_inv.png"
|
||||
def_4l_clover.use_texture_alpha = "clip"
|
||||
|
||||
minetest.register_node("mcl_flowers:fourleaf_clover", def_4l_clover)
|
||||
|
||||
|
@ -268,6 +270,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
|||
end
|
||||
-- Sunflower mesh and tiles
|
||||
local top_drawtype, bottom_drawtype
|
||||
local alpha = nil
|
||||
local bottom_tiles = {}
|
||||
if not mesh then
|
||||
top_drawtype = "plantlike"
|
||||
|
@ -277,6 +280,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
|||
top_drawtype = "airlike"
|
||||
bottom_drawtype = "mesh"
|
||||
bottom_tiles = bottom_img
|
||||
alpha = "clip"
|
||||
end
|
||||
-- Bottom
|
||||
minetest.register_node("mcl_flowers:"..name, {
|
||||
|
@ -298,6 +302,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
|||
_mcl_shears_drop = shears_drop,
|
||||
_mcl_fortune_drop = fortune_drop,
|
||||
node_placement_prediction = "",
|
||||
use_texture_alpha = alpha,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -selbox_radius, -0.5, -selbox_radius, selbox_radius, 0.5, selbox_radius },
|
||||
|
@ -397,6 +402,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
|||
palette = palette,
|
||||
walkable = false,
|
||||
buildable_to = false,
|
||||
use_texture_alpha = alpha,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -selbox_radius, -0.5, -selbox_radius, selbox_radius, selbox_top_height, selbox_radius },
|
||||
|
|
|
@ -638,7 +638,7 @@ function mcl_itemframes.create_base_definitions()
|
|||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
groups = { dig_immediate = 3, deco_block = 1, dig_by_piston = 1, container = 1, }, -- attached_node_facedir = 1 }, -- allows for more placement options.
|
||||
groups = { dig_immediate = 3, deco_block = 1, dig_by_piston = 1, container = 1, attached_node_facedir = 1 },
|
||||
sounds = mcl_sounds.node_sound_defaults(),
|
||||
node_placement_prediction = "",
|
||||
|
||||
|
|
|
@ -76,8 +76,7 @@ local lectern_def = {
|
|||
if wdir == 0 then
|
||||
return itemstack
|
||||
-- IE., no Hanging Lecterns for you!
|
||||
end
|
||||
if wdir == 1 then
|
||||
else
|
||||
-- (only make standing nodes...)
|
||||
-- Determine the rotation based on player's yaw
|
||||
local yaw = pi * 2 - placer:get_look_horizontal()
|
||||
|
@ -136,5 +135,11 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "mcl_lectern:lectern",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
-- Base Aliases.
|
||||
minetest.register_alias("lectern", "mcl_lectern:lectern")
|
||||
|
|
|
@ -26,3 +26,9 @@ minetest.register_craft({
|
|||
{ "group:wood", "group:wood", "" },
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "mcl_loom:loom",
|
||||
burntime = 15,
|
||||
})
|
||||
|
|
|
@ -426,6 +426,12 @@ minetest.register_craft({
|
|||
burntime = 15,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "mcl_mangrove:mangrove_roots",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
local adjacents = {
|
||||
vector.new(1,0,0),
|
||||
vector.new(-1,0,0),
|
||||
|
|
|
@ -251,6 +251,15 @@ local function remove_shield_entity(player, i)
|
|||
end
|
||||
end
|
||||
|
||||
local function is_node_stack(itemstack)
|
||||
return itemstack:get_definition().drawtype -- only node's definition table contains element "drawtype"
|
||||
end
|
||||
|
||||
local function is_rmb_conflicting_node(nodename)
|
||||
local nodedef = minetest.registered_nodes[nodename]
|
||||
return nodedef.on_rightclick
|
||||
end
|
||||
|
||||
local function handle_blocking(player)
|
||||
local player_shield = mcl_shields.players[player]
|
||||
local rmb = player:get_player_control().RMB
|
||||
|
@ -266,7 +275,7 @@ local function handle_blocking(player)
|
|||
local pos = player:get_pos()
|
||||
if shield_in_hand then
|
||||
if not_blocking then
|
||||
minetest.after(0.25, function()
|
||||
minetest.after(0.05, function()
|
||||
if (not_blocking or not shield_in_offhand) and shield_in_hand and rmb then
|
||||
player_shield.blocking = 2
|
||||
set_shield(player, true, 2)
|
||||
|
@ -277,11 +286,16 @@ local function handle_blocking(player)
|
|||
end
|
||||
elseif shield_in_offhand then
|
||||
local pointed_thing = mcl_util.get_pointed_thing(player, true)
|
||||
local offhand_can_block = (wielded_item(player) == "" or not pointed_thing)
|
||||
and (minetest.get_item_group(wielded_item(player), "bow") ~= 1 and minetest.get_item_group(wielded_item(player), "crossbow") ~= 1)
|
||||
local wielded_stack = player:get_wielded_item()
|
||||
local offhand_can_block = (minetest.get_item_group(wielded_item(player), "bow") ~= 1
|
||||
and minetest.get_item_group(wielded_item(player), "crossbow") ~= 1)
|
||||
|
||||
if pointed_thing and pointed_thing.type == "node" then
|
||||
if minetest.get_item_group(minetest.get_node(pointed_thing.under).name, "container") > 1 then
|
||||
local pointed_node = minetest.get_node(pointed_thing.under)
|
||||
if minetest.get_item_group(pointed_node.name, "container") > 1
|
||||
or is_rmb_conflicting_node(pointed_node.name)
|
||||
or is_node_stack(wielded_stack)
|
||||
then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
@ -290,7 +304,7 @@ local function handle_blocking(player)
|
|||
return
|
||||
end
|
||||
if not_blocking then
|
||||
minetest.after(0.25, function()
|
||||
minetest.after(0.05, function()
|
||||
if (not_blocking or not shield_in_hand) and shield_in_offhand and rmb and offhand_can_block then
|
||||
player_shield.blocking = 1
|
||||
set_shield(player, true, 1)
|
||||
|
|
|
@ -257,6 +257,12 @@ minetest.register_craft({
|
|||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "mcl_smithing_table:table",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
-- this is the exact same as mcl_smithing_table.upgrade_item_netherite , in case something relies on the old function
|
||||
function mcl_smithing_table.upgrade_item(itemstack)
|
||||
return mcl_smithing_table.upgrade_item_netherite(itemstack)
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
# ```vl_hollow_logs```
|
||||
|
||||
This mod registers hollow logs derived from normal logs.
|
||||
Hollow logs mostly have a decorative function, but some of them can be used in recipes. Changes may appear soon.
|
||||
|
||||
## Functions:
|
||||
### ```vl_hollow_logs.register_hollow_log(defs)```
|
||||
This is the function that registers the hollow trunk.
|
||||
For a hollow log to be registered, the <span style="color:firebrick"> defs </span> parameter must be a table that contains up to 5 values, which are, in this order, the <span style="color:firebrick"> itemstring </span> of the hollow log, the <span style="color:firebrick"> itemstring </span> of the stripped hollow log, the <span style="color:firebrick"> description </span> of the hollow log, the <span style="color:firebrick"> description </span> of the stripped hollow log and, optionally, a <span style="color:turquoise"> boolean </span> to inform whether this trunk is NOT flammable. If the hollow log is defined as flammable, it becomes part of the <span style="color:springgreen"> hollow_log_flammable </span> group, which allows the log to be used as fuel for furnaces and also allows it to be an ingredient for chacoal.
|
||||
|
||||
Examples:
|
||||
```lua
|
||||
-- Flammable
|
||||
{"tree", "stripped_oak", "Hollow Oak Log", "Stripped Hollow Oak Log"}
|
||||
|
||||
-- Not flammable
|
||||
{"crimson_hyphae", "stripped_crimson_hyphae", "Hollow Crimson Stem", "Stripped Hollow Crimson Stem", true}
|
||||
```
|
||||
### ```vl_hollow_logs.register_craft(material, result)```
|
||||
|
||||
This function records the crafting recipe for a hollow log based on its non-hollow variant.
|
||||
This function also defines a recipe for the stonecutter. The <span style="color:firebrick"> material </span> and <span style="color:firebrick"> result </span> parameters must be, respectively, the <span style="color:firebrick"> complete itemstring </span> of the source material and the (partial) <span style="color:firebrick"> itemstring </span> of the result. See the following examples:
|
||||
|
||||
```lua
|
||||
vl_hollow_logs.register_craft("mcl_core:tree", "tree")
|
||||
|
||||
vl_hollow_logs.register_craft("mcl_crimson:stripped_crimson_hyphae", "stripped_crimson_hyphae")
|
||||
```
|
|
@ -0,0 +1,112 @@
|
|||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
vl_hollow_logs = {}
|
||||
--- Function to register a hollow log. See API.md to learn how to use this function.
|
||||
---@param defs table {name:string, stripped_name>string, desc:string, stripped_desc:string, not_flammable:boolean|nil}
|
||||
function vl_hollow_logs.register_hollow_log(defs)
|
||||
if not defs or #defs < 4 then
|
||||
error("Incomplete definition provided")
|
||||
end
|
||||
|
||||
for i = 1, 4 do
|
||||
if type(defs[i]) ~= "string" then
|
||||
error("defs["..i.."] must be a string")
|
||||
end
|
||||
end
|
||||
if defs[5] and type(defs[5]) ~= "boolean" then
|
||||
error("defs[5] must be a boolean if present")
|
||||
end
|
||||
|
||||
local modname = minetest.get_current_modname()
|
||||
|
||||
if #defs > 5 then
|
||||
minetest.log("warning", "[vl_hollow_logs] unused vars passed, dumping the table")
|
||||
minetest.log("warning", "from mod " .. modname .. ": " .. dump(defs))
|
||||
end
|
||||
|
||||
local name = defs[1]
|
||||
local stripped_name = defs[2]
|
||||
local desc = defs[3]
|
||||
local stripped_desc = defs[4]
|
||||
|
||||
local collisionbox = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, -0.375},
|
||||
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5},
|
||||
{0.375, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
{-0.5, -0.5, 0.375, 0.5, 0.5, 0.5},
|
||||
}
|
||||
}
|
||||
|
||||
local groups = {axey = 1, building_block = 1, handy = 1, hollow_log = 1}
|
||||
|
||||
if not defs[5] then
|
||||
groups = table.insert(groups, {fire_encouragement = 5, fire_flammability = 5, flammable = 2, hollow_log_burnable = 1})
|
||||
end
|
||||
|
||||
minetest.register_node(modname .. ":"..name.."_hollow", {
|
||||
collision_box = collisionbox,
|
||||
description = S(desc),
|
||||
drawtype = "mesh",
|
||||
groups = groups,
|
||||
mesh = "vl_hollow_logs_log.obj",
|
||||
on_place = mcl_util.rotate_axis,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "clip",
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
sunlight_propagates = true,
|
||||
tiles = {modname .. "_"..name..".png"},
|
||||
_mcl_blast_resistance = 2,
|
||||
_mcl_hardness = 2,
|
||||
_mcl_stripped_variant = modname .. ":stripped_"..name.."_hollow"
|
||||
})
|
||||
|
||||
minetest.register_node(modname .. ":"..stripped_name.."_hollow", {
|
||||
collision_box = collisionbox,
|
||||
description = S(stripped_desc),
|
||||
drawtype = "mesh",
|
||||
groups = groups,
|
||||
mesh = "vl_hollow_logs_log.obj",
|
||||
on_place = mcl_util.rotate_axis,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "clip",
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
sunlight_propagates = true,
|
||||
tiles = {modname .. "_stripped_"..name..".png"},
|
||||
_mcl_blast_resistance = 2,
|
||||
_mcl_hardness = 2
|
||||
})
|
||||
end
|
||||
|
||||
vl_hollow_logs.logs = {
|
||||
{"acaciatree", "stripped_acacia", "Hollow Acacia Log", "Stripped Hollow Acacia Log"},
|
||||
{"birchtree", "stripped_birch", "Hollow Birch Log", "Stripped Hollow Birch Log"},
|
||||
{"darktree", "stripped_dark_oak", "Hollow Dark Oak Log", "Stripped Hollow Dark Oak Log"},
|
||||
{"jungletree", "stripped_jungle", "Hollow Jungle Log", "Stripped Hollow Jungle Log"},
|
||||
{"sprucetree", "stripped_spruce", "Hollow Spruce Log", "Stripped Hollow Spruce Log"},
|
||||
{"tree", "stripped_oak", "Hollow Oak Log", "Stripped Hollow Oak Log"}
|
||||
}
|
||||
|
||||
|
||||
if minetest.get_modpath("mcl_cherry_blossom") then
|
||||
table.insert(vl_hollow_logs.logs, {"cherrytree", "stripped_cherrytree", "Hollow Cherry Log", "Stripped Hollow Cherry Log"})
|
||||
end
|
||||
|
||||
if minetest.get_modpath("mcl_mangrove") then
|
||||
table.insert(vl_hollow_logs.logs, {"mangrove_tree", "mangrove_stripped", "Hollow Mangrove Log", "Stripped Hollow Mangrove Log"})
|
||||
end
|
||||
|
||||
if minetest.get_modpath("mcl_crimson") then
|
||||
table.insert(vl_hollow_logs.logs, {"crimson_hyphae", "stripped_crimson_hyphae", "Hollow Crimson Stem", "Stripped Hollow Crimson Stem", true})
|
||||
table.insert(vl_hollow_logs.logs, {"warped_hyphae", "stripped_warped_hyphae", "Hollow Warped Stem", "Stripped Hollow Warped Stem", true})
|
||||
end
|
||||
|
||||
for _, defs in pairs(vl_hollow_logs.logs) do
|
||||
vl_hollow_logs.register_hollow_log(defs)
|
||||
end
|
||||
|
||||
dofile(modpath.."/recipes.lua")
|
|
@ -0,0 +1,21 @@
|
|||
# textdomain: mcl_hollow_logs
|
||||
Hollow Acacia Log=
|
||||
Hollow Birch Log=
|
||||
Hollow Cherry Log=
|
||||
Hollow Dark Oak Log=
|
||||
Hollow Jungle Log=
|
||||
Hollow Mangrove Log=
|
||||
Hollow Oak Log=
|
||||
Hollow Spruce Log=
|
||||
Hollow Crimson Stem=
|
||||
Hollow Warped Stem=
|
||||
Stripped Hollow Acacia Log=
|
||||
Stripped Hollow Birch Log=
|
||||
Stripped Hollow Cherry Log=
|
||||
Stripped Hollow Dark Oak Log=
|
||||
Stripped Hollow Jungle Log=
|
||||
Stripped Hollow Mangrove Log=
|
||||
Stripped Hollow Oak Log=
|
||||
Stripped Hollow Spruce Log=
|
||||
Stripped Hollow Crimson Stem=
|
||||
Stripped Hollow Warped Stem=
|
|
@ -0,0 +1,21 @@
|
|||
# textdomain: mcl_hollow_logs
|
||||
Hollow Acacia Log=Tronco Oco de Acácia
|
||||
Hollow Birch Log=Tronco Oco de Bétula
|
||||
Hollow Cherry Log=Tronco Oco de Cerejeira
|
||||
Hollow Dark Oak Log=Tronco Oco de Carvalho Escuro
|
||||
Hollow Jungle Log=Tronco Oco da Selva
|
||||
Hollow Mangrove Log=Tronco Oco de Mangue
|
||||
Hollow Oak Log=Tronco Oco de Carvalho
|
||||
Hollow Spruce Log=Tronco Oco de Pinheiro
|
||||
Hollow Crimson Stem=Caule Oco Carmesim
|
||||
Hollow Warped Stem=Caule Oco Distorcido
|
||||
Stripped Hollow Acacia Log=Tronco Oco Descascado de Acácia
|
||||
Stripped Hollow Birch Log=Tronco Oco Descascado de Bétula
|
||||
Stripped Hollow Cherry Log=Tronco Oco Descascado de Cerejeira
|
||||
Stripped Hollow Dark Oak Log=Tronco Oco Descascado de Carvalho Escuro
|
||||
Stripped Hollow Jungle Log=Tronco Oco Descascado da Selva
|
||||
Stripped Hollow Mangrove Log=Tronco Oco Descascado de Mangue
|
||||
Stripped Hollow Oak Log=Tronco Oco Descascado de Carvalho
|
||||
Stripped Hollow Spruce Log=Tronco Oco Descascado de Pinheiro
|
||||
Stripped Hollow Crimson Stem=Caule Oco Descascado Carmesim
|
||||
Stripped Hollow Warped Stem=Caule Oco Descascado Distorcido
|
|
@ -0,0 +1,4 @@
|
|||
name = vl_hollow_logs
|
||||
depends = mcl_core, mcl_sounds, mcl_util
|
||||
optional_depends = mcl_cherry_blossom, mcl_crimson, mcl_mangrove
|
||||
author = JoseDouglas26
|
|
@ -0,0 +1,54 @@
|
|||
# Blender 3.6.7
|
||||
# www.blender.org
|
||||
o hollow_log
|
||||
v -0.312500 -0.500000 0.312500
|
||||
v -0.312500 0.500000 0.312500
|
||||
v -0.312500 -0.500000 -0.312500
|
||||
v -0.312500 0.500000 -0.312500
|
||||
v 0.312500 -0.500000 0.312500
|
||||
v 0.312500 0.500000 0.312500
|
||||
v 0.312500 -0.500000 -0.312500
|
||||
v 0.312500 0.500000 -0.312500
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 0.500000 -0.500000
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 0.500000 -0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
vn -1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 -1.0000
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.0000 -0.0000 1.0000
|
||||
vn -0.0000 -1.0000 -0.0000
|
||||
vn -0.0000 1.0000 -0.0000
|
||||
vt 0.380952 0.000000
|
||||
vt 0.380952 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.619048 0.000000
|
||||
vt 0.619048 1.000000
|
||||
vt 0.928571 0.187500
|
||||
vt 0.928571 0.812500
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 0.690476 0.187500
|
||||
vt 0.690476 0.812500
|
||||
s 0
|
||||
f 10/1/1 11/2/1 12/3/1 9/4/1
|
||||
f 9/1/2 12/2/2 14/3/2 13/4/2
|
||||
f 13/1/3 14/2/3 16/3/3 15/4/3
|
||||
f 15/1/4 16/2/4 11/3/4 10/4/4
|
||||
f 7/5/4 8/6/4 4/2/4 3/1/4
|
||||
f 5/5/1 6/6/1 8/2/1 7/1/1
|
||||
f 3/7/5 1/8/5 10/9/5 9/10/5
|
||||
f 2/8/6 4/7/6 12/10/6 11/9/6
|
||||
f 7/11/5 3/7/5 9/10/5 13/5/5
|
||||
f 4/7/6 8/11/6 14/5/6 12/10/6
|
||||
f 5/12/5 7/11/5 13/5/5 15/6/5
|
||||
f 8/11/6 6/12/6 16/6/6 14/5/6
|
||||
f 1/8/5 5/12/5 15/6/5 10/9/5
|
||||
f 6/12/6 2/8/6 11/9/6 16/6/6
|
||||
f 3/5/3 4/6/3 2/2/3 1/1/3
|
||||
f 1/5/2 2/6/2 6/2/2 5/1/2
|
|
@ -0,0 +1,48 @@
|
|||
function vl_hollow_logs.register_craft(material, result)
|
||||
minetest.register_craft({
|
||||
output = "vl_hollow_logs:"..result.."_hollow 4",
|
||||
recipe = {
|
||||
{"", material, ""},
|
||||
{material, "", material},
|
||||
{"", material, ""}
|
||||
},
|
||||
type = "shaped"
|
||||
})
|
||||
|
||||
mcl_stonecutter.register_recipe(material, "vl_hollow_logs:"..result.."_hollow", 1)
|
||||
end
|
||||
|
||||
for _, defs in pairs(vl_hollow_logs.logs) do
|
||||
local mod, material, stripped_material
|
||||
local name = defs[1]
|
||||
local stripped_name = defs[2]
|
||||
|
||||
if name:find("cherry") then
|
||||
mod = "mcl_cherry_blossom:"
|
||||
elseif name:find("mangrove") then
|
||||
mod = "mcl_mangrove:"
|
||||
elseif name:find("hyphae") then
|
||||
mod = "mcl_crimson:"
|
||||
else
|
||||
mod = "mcl_core:"
|
||||
end
|
||||
|
||||
material = mod..name
|
||||
stripped_material = mod..stripped_name
|
||||
|
||||
vl_hollow_logs.register_craft(material, name)
|
||||
vl_hollow_logs.register_craft(stripped_material, stripped_name)
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
burntime = 10,
|
||||
recipe = "group:hollow_log_burnable",
|
||||
type = "fuel",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
cooktime = 5,
|
||||
output = "mcl_core:charcoal_lump",
|
||||
recipe = "group:hollow_log_burnable",
|
||||
type = "cooking"
|
||||
})
|
|
@ -406,13 +406,16 @@ local function dungeons_nodes(minp, maxp, blockseed)
|
|||
local pr = PseudoRandom(blockseed)
|
||||
for a=1, attempts do
|
||||
local dim = dungeonsizes[pr:next(1, #dungeonsizes)]
|
||||
local x = pr:next(minp.x, maxp.x-dim.x-1)
|
||||
local y = pr:next(ymin , ymax -dim.y-1)
|
||||
local z = pr:next(minp.z, maxp.z-dim.z-1)
|
||||
local p1 = {x=x,y=y,z=z}
|
||||
local p2 = {x = x+dim.x+1, y = y+dim.y+1, z = z+dim.z+1}
|
||||
minetest.log("verbose","[mcl_dungeons] size=" ..minetest.pos_to_string(dim) .. ", emerge from "..minetest.pos_to_string(p1) .. " to " .. minetest.pos_to_string(p2))
|
||||
emerge_area(p1, p2, ecb_spawn_dungeon, {p1=p1, p2=p2, dim=dim, pr=pr})
|
||||
|
||||
if ymin <= ymax - dim.y - 1 then
|
||||
local x = pr:next(minp.x, maxp.x-dim.x-1)
|
||||
local y = pr:next(ymin , ymax -dim.y-1)
|
||||
local z = pr:next(minp.z, maxp.z-dim.z-1)
|
||||
local p1 = {x=x,y=y,z=z}
|
||||
local p2 = {x = x+dim.x+1, y = y+dim.y+1, z = z+dim.z+1}
|
||||
minetest.log("verbose","[mcl_dungeons] size=" ..minetest.pos_to_string(dim) .. ", emerge from "..minetest.pos_to_string(p1) .. " to " .. minetest.pos_to_string(p2))
|
||||
emerge_area(p1, p2, ecb_spawn_dungeon, {p1=p1, p2=p2, dim=dim, pr=pr})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -38,9 +38,19 @@ local player_sneak = {}
|
|||
local player_visible = {}
|
||||
mcl_player.player_attached = {}
|
||||
|
||||
local function get_player_textures(name)
|
||||
local textures = player_textures[name]
|
||||
if textures then return textures end
|
||||
|
||||
local textures = { "character.png", "blank.png", "blank.png" }
|
||||
player_textures[name] = textures
|
||||
return textures
|
||||
|
||||
end
|
||||
|
||||
function mcl_player.player_get_animation(player)
|
||||
local name = player:get_player_name()
|
||||
local textures = player_textures[name]
|
||||
local textures = get_player_textures(name)
|
||||
|
||||
if not player_visible[name] then
|
||||
textures = table.copy(textures)
|
||||
|
@ -63,7 +73,7 @@ end
|
|||
|
||||
local function update_player_textures(player)
|
||||
local name = player:get_player_name()
|
||||
local textures = player_textures[name]
|
||||
local textures = get_player_textures(name)
|
||||
|
||||
if not player_visible[name] then
|
||||
textures = table.copy(textures)
|
||||
|
@ -125,18 +135,21 @@ end
|
|||
|
||||
function mcl_player.player_set_skin(player, texture)
|
||||
local name = player:get_player_name()
|
||||
player_textures[name][1] = texture
|
||||
local textures = get_player_textures(name)
|
||||
textures[1] = texture
|
||||
update_player_textures(player)
|
||||
end
|
||||
|
||||
function mcl_player.player_get_skin(player)
|
||||
local name = player:get_player_name()
|
||||
return player_textures[name][1]
|
||||
local textures = get_player_textures(name)
|
||||
return textures[1]
|
||||
end
|
||||
|
||||
function mcl_player.player_set_armor(player, texture)
|
||||
local name = player:get_player_name()
|
||||
player_textures[name][2] = texture
|
||||
local textures = get_player_textures(name)
|
||||
textures[2] = texture
|
||||
update_player_textures(player)
|
||||
end
|
||||
|
||||
|
@ -151,7 +164,7 @@ function mcl_player.get_player_formspec_model(player, x, y, w, h, fsname)
|
|||
local name = player:get_player_name()
|
||||
local model = player_model[name]
|
||||
local anim = models[model].animations[player_anim[name]]
|
||||
local textures = player_textures[name]
|
||||
local textures = get_player_textures(name)
|
||||
if not player_visible[name] then
|
||||
textures = table.copy(textures)
|
||||
textures[1] = "blank.png"
|
||||
|
@ -179,7 +192,7 @@ minetest.register_on_joinplayer(function(player)
|
|||
local name = player:get_player_name()
|
||||
mcl_player.player_attached[name] = false
|
||||
player_visible[name] = true
|
||||
player_textures[name] = { "character.png", "blank.png", "blank.png" }
|
||||
get_player_textures(name)
|
||||
|
||||
--player:set_local_animation({x=0, y=79}, {x=168, y=187}, {x=189, y=198}, {x=200, y=219}, 30)
|
||||
-- player:set_fov(86.1) -- see <https://minecraft.gamepedia.com/Options#Video_settings>>>>
|
||||
|
|
|
@ -59,6 +59,50 @@ mcl_skins = {
|
|||
player_formspecs = {},
|
||||
}
|
||||
|
||||
local player_skins = mcl_skins.player_skins
|
||||
|
||||
local function get_player_skins(player)
|
||||
local player_skins = player_skins[player]
|
||||
if player_skins then return player_skins end
|
||||
|
||||
local skin = player:get_meta():get_string("mcl_skins:skin")
|
||||
if skin then
|
||||
skin = minetest.deserialize(skin)
|
||||
end
|
||||
if skin then
|
||||
if not mcl_skins.texture_to_simple_skin[skin.simple_skins_id] then
|
||||
skin.simple_skins_id = nil
|
||||
end
|
||||
|
||||
mcl_skins.player_skins[player] = skin
|
||||
else
|
||||
if math.random() > 0.5 then
|
||||
skin = table.copy(mcl_skins.template1)
|
||||
else
|
||||
skin = table.copy(mcl_skins.template2)
|
||||
end
|
||||
mcl_skins.player_skins[player] = skin
|
||||
end
|
||||
|
||||
mcl_skins.player_formspecs[player] = {
|
||||
active_tab = "skin",
|
||||
page_num = 1
|
||||
}
|
||||
|
||||
if #mcl_skins.simple_skins > 0 then
|
||||
local skin_id = tonumber(player:get_meta():get_string("mcl_skins:skin_id"))
|
||||
if skin_id and mcl_skins.simple_skins[skin_id] then
|
||||
local texture = mcl_skins.simple_skins[skin_id].texture
|
||||
local player_skins = get_player_skins(player)
|
||||
player_skins.simple_skins_id = texture
|
||||
end
|
||||
end
|
||||
mcl_skins.save(player)
|
||||
mcl_skins.update_player_skin(player)
|
||||
|
||||
return mcl_skins.player_skins[player]
|
||||
end
|
||||
|
||||
function mcl_skins.register_item(item)
|
||||
assert(mcl_skins[item.type], "Skin item type " .. item.type .. " does not exist.")
|
||||
|
||||
|
@ -160,7 +204,7 @@ function mcl_skins.update_player_skin(player)
|
|||
return
|
||||
end
|
||||
|
||||
local skin = mcl_skins.player_skins[player]
|
||||
local skin = get_player_skins(player)
|
||||
local skinval = mcl_skins.compile_skin(skin)
|
||||
|
||||
if not skin.cape then skin.cape = "blank.png" end
|
||||
|
@ -186,39 +230,7 @@ end
|
|||
|
||||
-- Load player skin on join
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local skin = player:get_meta():get_string("mcl_skins:skin")
|
||||
if skin then
|
||||
skin = minetest.deserialize(skin)
|
||||
end
|
||||
if skin then
|
||||
if not mcl_skins.texture_to_simple_skin[skin.simple_skins_id] then
|
||||
skin.simple_skins_id = nil
|
||||
end
|
||||
|
||||
mcl_skins.player_skins[player] = skin
|
||||
else
|
||||
if math.random() > 0.5 then
|
||||
skin = table.copy(mcl_skins.template1)
|
||||
else
|
||||
skin = table.copy(mcl_skins.template2)
|
||||
end
|
||||
mcl_skins.player_skins[player] = skin
|
||||
end
|
||||
|
||||
mcl_skins.player_formspecs[player] = {
|
||||
active_tab = "skin",
|
||||
page_num = 1
|
||||
}
|
||||
|
||||
if #mcl_skins.simple_skins > 0 then
|
||||
local skin_id = tonumber(player:get_meta():get_string("mcl_skins:skin_id"))
|
||||
if skin_id and mcl_skins.simple_skins[skin_id] then
|
||||
local texture = mcl_skins.simple_skins[skin_id].texture
|
||||
mcl_skins.player_skins[player].simple_skins_id = texture
|
||||
end
|
||||
end
|
||||
mcl_skins.save(player)
|
||||
mcl_skins.update_player_skin(player)
|
||||
get_player_skins(player)
|
||||
end)
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
|
@ -245,7 +257,7 @@ end
|
|||
|
||||
function mcl_skins.show_formspec(player, active_tab, page_num)
|
||||
local formspec_data = mcl_skins.player_formspecs[player]
|
||||
local skin = mcl_skins.player_skins[player]
|
||||
local skin = get_player_skins(player)
|
||||
formspec_data.active_tab = active_tab
|
||||
|
||||
local page_count = calculate_page_count(active_tab, player)
|
||||
|
@ -555,7 +567,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
mcl_skins.show_formspec(player, active_tab, page_num)
|
||||
return true
|
||||
elseif fields.nocape then
|
||||
mcl_skins.player_skins[player].cape = "blank.png"
|
||||
local player_skins = get_player_skins(player)
|
||||
player_skins.cape = "blank.png"
|
||||
mcl_skins.update_player_skin(player)
|
||||
mcl_armor.update(player) --update elytra cape
|
||||
mcl_skins.show_formspec(player, active_tab, page_num)
|
||||
|
@ -564,7 +577,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
for cape_index = ((page_num - 1) * 5) + 1, math.min(#mcl_skins.cape, page_num * 5) do
|
||||
local cape = mcl_skins.cape[cape_index]
|
||||
if fields[cape.name] then
|
||||
mcl_skins.player_skins[player].cape = cape.mask -- the actual overlay image
|
||||
local player_skins = get_player_skins(player)
|
||||
player_skins.cape = cape.mask -- the actual overlay image
|
||||
mcl_skins.update_player_skin(player)
|
||||
mcl_armor.update(player) --update elytra cape
|
||||
mcl_skins.show_formspec(player, active_tab, page_num)
|
||||
|
@ -580,7 +594,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
end
|
||||
|
||||
local skin = mcl_skins.player_skins[player]
|
||||
local skin = get_player_skins(player)
|
||||
if not skin then return true end
|
||||
|
||||
if fields.next_page then
|
||||
|
|
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 261 B |
Before Width: | Height: | Size: 302 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 174 B After Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 220 B |
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 254 B |
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 271 B |
After Width: | Height: | Size: 830 B |
After Width: | Height: | Size: 862 B |
After Width: | Height: | Size: 723 B |
After Width: | Height: | Size: 606 B |
After Width: | Height: | Size: 745 B |
After Width: | Height: | Size: 848 B |
After Width: | Height: | Size: 543 B |
After Width: | Height: | Size: 874 B |
After Width: | Height: | Size: 910 B |
After Width: | Height: | Size: 979 B |
After Width: | Height: | Size: 797 B |
After Width: | Height: | Size: 463 B |
After Width: | Height: | Size: 916 B |
After Width: | Height: | Size: 1018 B |
After Width: | Height: | Size: 404 B |
After Width: | Height: | Size: 983 B |
After Width: | Height: | Size: 997 B |
After Width: | Height: | Size: 499 B |
After Width: | Height: | Size: 790 B |
After Width: | Height: | Size: 635 B |
|
@ -1151,15 +1151,28 @@ Source path,Source file,Target file,xs,ys,xl,yl,xt,yt,Blacklisted?
|
|||
/assets/minecraft/textures/block,redstone_dust_line1.png,redstone_redstone_dust_line1.png,,,,,,,
|
||||
/assets/minecraft/textures/block,attached_melon_stem.png,mcl_farming_melon_stem_connected.png,,,,,,,
|
||||
/assets/minecraft/textures/block,melon_stem.png,mcl_farming_melon_stem_disconnected.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/signs,acacia.png,mcl_signs_sign_acacia.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/signs,acacia.png,mcl_signs_acacia_sign.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/signs,bamboo.png,mcl_bamboo_bamboo_sign.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/signs,birch.png,mcl_signs_birch_sign.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/signs,cherry.png,mcl_cherry_blossom_sign.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/signs,crimson.png,mcl_signs_crimson_sign.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/signs,dark_oak.png,mcl_signs_sign_dark.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/signs,jungle.png,mcl_signs_jungle_sign.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/signs,mangrove.png,mcl_signs_mangrove_sign.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/signs,oak.png,mcl_signs_sign.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/signs,spruce.png,mcl_signs_spruce_sign.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/signs,warped.png,mcl_signs_warped_sign.png,,,,,,,
|
||||
/assets/minecraft/textures/item,acacia_sign.png,mcl_signs_acacia_sign_inv.png,,,,,,,
|
||||
/assets/minecraft/textures/item,bamboo_sign.png,mcl_bamboo_bamboo_sign_wield.png,,,,,,,
|
||||
/assets/minecraft/textures/item,cherry_sign.png,mcl_cherry_blossom_sign_inv.png,,,,,,,
|
||||
/assets/minecraft/textures/item,dark_oak_sign.png,mcl_signs_default_sign_dark.png,,,,,,,
|
||||
/assets/minecraft/textures/item,birch_sign.png,mcl_signs_birch_sign_inv.png,,,,,,,
|
||||
/assets/minecraft/textures/item,cherry_sign.png,mcl_cherry_blossom_inv.png,,,,,,,
|
||||
/assets/minecraft/textures/item,crimson_sign.png,mcl_signs_crimson_sign_inv.png,,,,,,,
|
||||
/assets/minecraft/textures/item,dark_oak_sign.png,mcl_signs_default_dark.png,,,,,,,
|
||||
/assets/minecraft/textures/item,jungle_sign.png,mcl_signs_jungle_sign_inv.png,,,,,,,
|
||||
/assets/minecraft/textures/item,mangrove_sign.png,mcl_signs_mangrove_sign_inv.png,,,,,,,
|
||||
/assets/minecraft/textures/item,oak_sign.png,mcl_signs_default_sign.png,,,,,,,
|
||||
/assets/minecraft/textures/item,spruce_sign.png,mcl_signs_spruce_sign_inv.png,,,,,,,
|
||||
/assets/minecraft/textures/item,warped_sign.png,mcl_signs_warped_sign_inv.png,,,,,,,
|
||||
/assets/minecraft/textures/entity,banner_base.png,mcl_banners_banner_base.png,,,,,,,
|
||||
/assets/minecraft/textures/entity/banner,base.png,mcl_banners_base.png,,,,,,,
|
||||
/assets/minecraft/textures/block,nether_portal.png,mcl_portals_portal.png,,,,,,,
|
||||
|
|
|
|
@ -122,6 +122,9 @@ def convert_textures(make_texture_pack, dry_run, verbose, base_dir, tex_dir, tem
|
|||
description_file.write(description)
|
||||
description_file.close()
|
||||
|
||||
# Create override file
|
||||
shutil.copyfile("override.txt", target_dir("/", make_texture_pack, output_dir, output_dir_name, mineclone2_path) + "/override.txt")
|
||||
|
||||
# Create preview image (screenshot.png)
|
||||
os.system("convert -size 300x200 canvas:transparent "+target_dir("/", make_texture_pack, output_dir, output_dir_name, mineclone2_path) + "/screenshot.png")
|
||||
os.system("composite "+base_dir+"/pack.png "+target_dir("/", make_texture_pack, output_dir, output_dir_name, mineclone2_path) + "/screenshot.png -gravity center "+target_dir("/", make_texture_pack, output_dir, output_dir_name, mineclone2_path) + "/screenshot.png")
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
Signs:
|
||||
|
||||
mcl_signs:wall_sign_warped_hyphae_wood inventory mcl_signs_warped_sign_inv.png
|
||||
mcl_signs:wall_sign_warped_hyphae_wood wield mcl_signs_warped_sign_inv.png
|
||||
mcl_signs:wall_sign_warped_hyphae_wood all mcl_signs_warped_sign.png
|
||||
mcl_signs:standing_sign_warped_hyphae_wood all mcl_signs_warped_sign.png
|
||||
mcl_signs:standing_sign22_5_warped_hyphae_wood all mcl_signs_warped_sign.png
|
||||
mcl_signs:standing_sign45_warped_hyphae_wood all mcl_signs_warped_sign.png
|
||||
mcl_signs:standing_sign67_5_warped_hyphae_wood all mcl_signs_warped_sign.png
|
||||
|
||||
mcl_signs:wall_sign_c rimson_hyphae_wood inventory mcl_signs_crimson_sign_inv.png
|
||||
mcl_signs:wall_sign_crimson_hyphae_wood wield mcl_signs_crimson_sign_inv.png
|
||||
mcl_signs:wall_sign_crimson_hyphae_wood all mcl_signs_crimson_sign.png
|
||||
mcl_signs:standing_sign_crimson_hyphae_wood all mcl_signs_crimson_sign.png
|
||||
mcl_signs:standing_sign22_5_crimson_hyphae_wood all mcl_signs_crimson_sign.png
|
||||
mcl_signs:standing_sign45_crimson_hyphae_wood all mcl_signs_crimson_sign.png
|
||||
mcl_signs:standing_sign67_5_crimson_hyphae_wood all mcl_signs_crimson_sign.png
|
||||
|
||||
mcl_signs:wall_sign_acaciawood inventory mcl_signs_acacia_sign_inv.png
|
||||
mcl_signs:wall_sign_acaciawood wield mcl_signs_acacia_sign_inv.png
|
||||
mcl_signs:wall_sign_acaciawood all mcl_signs_acacia_sign.png
|
||||
mcl_signs:standing_sign_acaciawood all mcl_signs_acacia_sign.png
|
||||
mcl_signs:standing_sign22_5_acaciawood all mcl_signs_acacia_sign.png
|
||||
mcl_signs:standing_sign45_acaciawood all mcl_signs_acacia_sign.png
|
||||
mcl_signs:standing_sign67_5_acaciawood all mcl_signs_acacia_sign.png
|
||||
|
||||
mcl_signs:wall_sign_birchwood inventory mcl_signs_birch_sign_inv.png
|
||||
mcl_signs:wall_sign_birchwood wield mcl_signs_birch_sign_inv.png
|
||||
mcl_signs:wall_sign_birchwood all mcl_signs_birch_sign.png
|
||||
mcl_signs:standing_sign_birchwood all mcl_signs_birch_sign.png
|
||||
mcl_signs:standing_sign22_5_birchwood all mcl_signs_birch_sign.png
|
||||
mcl_signs:standing_sign45_birchwood all mcl_signs_birch_sign.png
|
||||
mcl_signs:standing_sign67_5_birchwood all mcl_signs_birch_sign.png
|
||||
|
||||
mcl_signs:wall_sign_junglewood inventory mcl_signs_jungle_sign_inv.png
|
||||
mcl_signs:wall_sign_junglewood wield mcl_signs_jungle_sign_inv.png
|
||||
mcl_signs:wall_sign_junglewood all mcl_signs_jungle_sign.png
|
||||
mcl_signs:standing_sign_junglewood all mcl_signs_jungle_sign.png
|
||||
mcl_signs:standing_sign22_5_junglewood all mcl_signs_jungle_sign.png
|
||||
mcl_signs:standing_sign45_junglewood all mcl_signs_jungle_sign.png
|
||||
mcl_signs:standing_sign67_5_junglewood all mcl_signs_jungle_sign.png
|
||||
|
||||
mcl_signs:wall_sign_mangrove_wood inventory mcl_signs_mangrove_sign_inv.png
|
||||
mcl_signs:wall_sign_mangrove_wood wield mcl_signs_mangrove_sign_inv.png
|
||||
mcl_signs:wall_sign_mangrove_wood all mcl_signs_mangrove_sign.png
|
||||
mcl_signs:standing_sign_mangrove_wood all mcl_signs_mangrove_sign.png
|
||||
mcl_signs:standing_sign22_5_mangrove_wood all mcl_signs_mangrove_sign.png
|
||||
mcl_signs:standing_sign45_mangrove_wood all mcl_signs_mangrove_sign.png
|
||||
mcl_signs:standing_sign67_5_mangrove_wood all mcl_signs_mangrove_sign.png
|
||||
|
||||
mcl_signs:wall_sign_sprucewood inventory mcl_signs_spruce_sign_inv.png
|
||||
mcl_signs:wall_sign_sprucewood wield mcl_signs_spruce_sign_inv.png
|
||||
mcl_signs:wall_sign_sprucewood all mcl_signs_spruce_sign.png
|
||||
mcl_signs:standing_sign_sprucewood all mcl_signs_spruce_sign.png
|
||||
mcl_signs:standing_sign22_5_sprucewood all mcl_signs_spruce_sign.png
|
||||
mcl_signs:standing_sign45_sprucewood all mcl_signs_spruce_sign.png
|
||||
mcl_signs:standing_sign67_5_sprucewood all mcl_signs_spruce_sign.png
|