Merge remote-tracking branch 'upstream/master' into pumpkins

This commit is contained in:
Alexander Minges 2020-05-06 18:31:05 +02:00
commit 2044995e8d
70 changed files with 649 additions and 357 deletions

View File

@ -5,7 +5,7 @@ Wow, thank you! :-)
But first, some things to note:
MineClone 2's development target is to make a free software clone of Minecraft,
***version 1.11*** (later: 1.12), ***PC edition***.
***version 1.11***, ***PC edition***.
MineClone 2 is maintained by one person. Namely, Wuzzy. You can find me,
Wuzzy, in the Minetest forums (forums.minetest.net), in IRC in the #minetest
@ -26,8 +26,8 @@ For small and medium changes:
* Fork the repository
* Do your change in a new branch
* Upload the repository somewhere where it can be accessed from the Internet
* Ask me to pull in your changes (and briefly say what you're changed)
* Upload the repository somewhere where it can be accessed from the Internet and
notify me
For small changes, sending me a patch is also good.
@ -35,7 +35,7 @@ For big changes: Same as above, but consider notifying me first to avoid
duplicate work and possible tears of rejection. ;-)
## Quality remarks
Again: There is ***no*** guarantee I will accept anything from anything.
Again: There is ***no*** guarantee I will accept anything from anybody.
But I will gladly take in code from others when I feel it saves me work
in the long run.
@ -64,10 +64,10 @@ Depending on what you add, the chances for inclusion vary:
## Coding style guide
* Indentations should reflect the code flow
* Use tabs, not spaces for indentation
* Use tabs, not spaces for indentation (tab size = 8)
* Never use `minetest.env`
## Reporting bugs
Report all bugs and missing Minecraft features here:
<https://git.minetest.land/Wuzzy/MineClone2-Bugs>
<https://git.minetest.land/Wuzzy/MineClone2/issues>

View File

@ -200,6 +200,7 @@ There are so many people to list (sorry). Check out the respective mod directori
* [ex-bart](https://github.com/ex-bart): Redstone comparators
* [Rootyjr](https://github.com/Rootyjr): Fishing rod and bugfixes
* [aligator](https://github.com/aligator): Improvement of doors
* [ryvnf](https://github.com/ryvnf): Explosion mechanics
* Lots of other people: TO BE WRITTEN (see mod directories for details)
### Textures

View File

@ -0,0 +1,382 @@
--[[
Explosion API mod for Minetest (adapted to MineClone 2)
This mod is based on the Minetest explosion API mod, but has been changed
to have the same explosion mechanics as Minecraft and work with MineClone.
The computation-intensive parts of the mod has been optimized to allow for
larger explosions and faster world updating.
This mod was created by Elias Astrom <ryvnf@riseup.net> and is released
under the LGPLv2.1 license.
--]]
mcl_explosions = {}
local creative_mode = minetest.settings:get_bool("creative_mode")
local mod_death_messages = minetest.get_modpath("mcl_death_messages") ~= nil
local mod_fire = minetest.get_modpath("mcl_fire") ~= nil
local CONTENT_FIRE = minetest.get_content_id("mcl_fire:fire")
local S = minetest.get_translator("mcl_explosions")
-- Saved sphere explosion shapes for various radiuses
local sphere_shapes = {}
-- Saved node definitions in table using cid-keys for faster look-up.
local node_blastres = {}
local node_on_blast = {}
local node_walkable = {}
-- The step length for the rays (Minecraft uses 0.3)
local STEP_LENGTH = 0.3
-- How many rays to compute entity exposure to explosion
local N_EXPOSURE_RAYS = 16
minetest.register_on_mods_loaded(function()
-- Store blast resistance values by content ids to improve performance.
for name, def in pairs(minetest.registered_nodes) do
node_blastres[minetest.get_content_id(name)] = def._mcl_blast_resistance or 0
node_on_blast[minetest.get_content_id(name)] = def.on_blast
node_walkable[minetest.get_content_id(name)] = def.walkable
end
end)
-- Compute the rays which make up a sphere with radius. Returns a list of rays
-- which can be used to trace explosions. This function is not efficient
-- (especially for larger radiuses), so the generated rays for various radiuses
-- should be cached and reused.
--
-- Should be possible to improve by using a midpoint circle algorithm multiple
-- times to create the sphere, currently uses more of a brute-force approach.
local function compute_sphere_rays(radius)
local rays = {}
local sphere = {}
for i=1, 2 do
for y = -radius, radius do
for z = -radius, radius do
for x = -radius, 0, 1 do
local d = x * x + y * y + z * z
if d <= radius * radius then
local pos = { x = x, y = y, z = z }
sphere[minetest.hash_node_position(pos)] = pos
break
end
end
end
end
end
for i=1,2 do
for x = -radius, radius do
for z = -radius, radius do
for y = -radius, 0, 1 do
local d = x * x + y * y + z * z
if d <= radius * radius then
local pos = { x = x, y = y, z = z }
sphere[minetest.hash_node_position(pos)] = pos
break
end
end
end
end
end
for i=1,2 do
for x = -radius, radius do
for y = -radius, radius do
for z = -radius, 0, 1 do
local d = x * x + y * y + z * z
if d <= radius * radius then
local pos = { x = x, y = y, z = z }
sphere[minetest.hash_node_position(pos)] = pos
break
end
end
end
end
end
for _, pos in pairs(sphere) do
rays[#rays + 1] = vector.normalize(pos)
end
return rays
end
-- Add particles from explosion
--
-- Parameters:
-- pos - The position of the explosion
-- radius - The radius of the explosion
local function add_particles(pos, radius)
minetest.add_particlespawner({
amount = 64,
time = 0.125,
minpos = pos,
maxpos = pos,
minvel = {x = -radius, y = -radius, z = -radius},
maxvel = {x = radius, y = radius, z = radius},
minacc = vector.new(),
maxacc = vector.new(),
minexptime = 0.5,
maxexptime = 1.0,
minsize = radius * 0.5,
maxsize = radius * 1.0,
texture = "tnt_smoke.png",
})
end
-- Traces the rays of an explosion, and updates the environment.
--
-- Parameters:
-- pos - Where the rays in the explosion should start from
-- strength - The strength of each ray
-- raydirs - The directions for each ray
-- radius - The maximum distance each ray will go
-- drop_chance - The chance that destroyed nodes will drop their items
-- fire - If true, 1/3 of destroyed nodes become fire
-- puncher - object that punches other objects (optional)
--
-- Note that this function has been optimized, it contains code which has been
-- inlined to avoid function calls and unnecessary table creation. This was
-- measured to give a significant performance increase.
local function trace_explode(pos, strength, raydirs, radius, drop_chance, fire, puncher)
local vm = minetest.get_voxel_manip()
local emin, emax = vm:read_from_map(vector.subtract(pos, radius),
vector.add(pos, radius))
local emin_x = emin.x
local emin_y = emin.y
local emin_z = emin.z
local ystride = (emax.x - emin_x + 1)
local zstride = ystride * (emax.y - emin_y + 1)
local pos_x = pos.x
local pos_y = pos.y
local pos_z = pos.z
local area = VoxelArea:new {
MinEdge = emin,
MaxEdge = emax
}
local data = vm:get_data()
local destroy = {}
-- Trace rays for environment destruction
for i = 1, #raydirs do
local rpos_x = pos.x
local rpos_y = pos.y
local rpos_z = pos.z
local rdir_x = raydirs[i].x
local rdir_y = raydirs[i].y
local rdir_z = raydirs[i].z
local rstr = (0.7 + math.random() * 0.6) * strength
for r = 0, math.ceil(radius * (1.0 / STEP_LENGTH)) do
local npos_x = math.floor(rpos_x + 0.5)
local npos_y = math.floor(rpos_y + 0.5)
local npos_z = math.floor(rpos_z + 0.5)
local idx = (npos_z - emin_z) * zstride + (npos_y - emin_y) * ystride +
npos_x - emin_x + 1
local cid = data[idx]
local br = node_blastres[cid]
local hash = (npos_z + 32768) * 65536 * 65536 +
(npos_y + 32768) * 65536 +
npos_x + 32768
rpos_x = rpos_x + STEP_LENGTH * rdir_x
rpos_y = rpos_y + STEP_LENGTH * rdir_y
rpos_z = rpos_z + STEP_LENGTH * rdir_z
rstr = rstr - 0.75 * STEP_LENGTH - (br + 0.3) * STEP_LENGTH
if rstr <= 0 then
break
end
if cid ~= minetest.CONTENT_AIR then
destroy[hash] = idx
end
end
end
-- Entities in radius of explosion
local punch_radius = 2 * strength
local objs = minetest.get_objects_inside_radius(pos, punch_radius)
-- Trace rays for entity damage
for _, obj in pairs(objs) do
local ent = obj:get_luaentity()
-- Ignore items to lower lag
if obj:is_player() or (ent and ent.name ~= '__builtin.item') then
local opos = obj:get_pos()
local collisionbox = nil
if obj:is_player() then
collisionbox = { -0.3, 0.0, -0.3, 0.3, 1.77, 0.3 }
elseif ent.name then
local def = minetest.registered_entities[ent.name]
collisionbox = def.collisionbox
end
if collisionbox then
-- Create rays from random points in the collision box
local x1 = collisionbox[1] * 2
local y1 = collisionbox[2] * 2
local z1 = collisionbox[3] * 2
local x2 = collisionbox[4] * 2
local y2 = collisionbox[5] * 2
local z2 = collisionbox[6] * 2
local x_len = math.abs(x2 - x1)
local y_len = math.abs(y2 - y1)
local z_len = math.abs(z2 - z1)
-- Move object position to the center of its bounding box
opos.x = opos.x + x1 + x2
opos.y = opos.y + y1 + y2
opos.z = opos.z + z1 + z2
-- Count number of rays from collision box which are unobstructed
local count = N_EXPOSURE_RAYS
for i = 1, N_EXPOSURE_RAYS do
local rpos_x = opos.x + math.random() * x_len - x_len / 2
local rpos_y = opos.y + math.random() * y_len - y_len / 2
local rpos_z = opos.z + math.random() * z_len - z_len / 2
local rdir_x = pos.x - rpos_x
local rdir_y = pos.y - rpos_y
local rdir_z = pos.z - rpos_z
local rdir_len = math.hypot(rdir_x, math.hypot(rdir_y, rdir_z))
rdir_x = rdir_x / rdir_len
rdir_y = rdir_y / rdir_len
rdir_z = rdir_z / rdir_len
for i=0, rdir_len / STEP_LENGTH do
rpos_x = rpos_x + rdir_x * STEP_LENGTH
rpos_y = rpos_y + rdir_y * STEP_LENGTH
rpos_z = rpos_z + rdir_z * STEP_LENGTH
local npos_x = math.floor(rpos_x + 0.5)
local npos_y = math.floor(rpos_y + 0.5)
local npos_z = math.floor(rpos_z + 0.5)
local idx = (npos_z - emin_z) * zstride + (npos_y - emin_y) * ystride +
npos_x - emin_x + 1
local cid = data[idx]
local walkable = node_walkable[cid]
if walkable then
count = count - 1
break
end
end
end
-- Punch entity with damage depending on explosion exposure and
-- distance to explosion
local exposure = count / N_EXPOSURE_RAYS
local punch_vec = vector.subtract(opos, pos)
local punch_dir = vector.normalize(punch_vec)
local impact = (1 - vector.length(punch_vec) / punch_radius) * exposure
if impact < 0 then
impact = 0
end
local damage = math.floor((impact * impact + impact) * 7 * strength + 1)
if mod_death_messages and obj:is_player() then
mcl_death_messages.player_damage(obj, S("@1 was caught in an explosion.", obj:get_player_name()))
end
local source = puncher
if not source then
source = obj
end
obj:punch(source, 10, { damage_groups = { full_punch_interval = 1,
fleshy = damage, knockback = impact * 20.0 } }, punch_dir)
if obj:is_player() then
obj:add_player_velocity(vector.multiply(punch_dir, impact * 20))
elseif ent.tnt_knockback then
obj:add_velocity(vector.multiply(punch_dir, impact * 20))
end
end
end
end
-- Remove destroyed blocks and drop items
for hash, idx in pairs(destroy) do
local do_drop = not creative_mode and math.random() <= drop_chance
local on_blast = node_on_blast[data[idx]]
local remove = true
if do_drop or on_blast ~= nil then
local npos = minetest.get_position_from_hash(hash)
if on_blast ~= nil then
remove = on_blast(npos, 1.0)
else
local name = minetest.get_name_from_content_id(data[idx])
local drop = minetest.get_node_drops(name, "")
for _, item in ipairs(drop) do
if item ~= "string" then
item = item:get_name() .. item:get_count()
end
minetest.add_item(npos, item)
end
end
end
if remove then
if mod_fire and math.random(1, 3) == 1 then
data[idx] = CONTENT_FIRE
else
data[idx] = minetest.CONTENT_AIR
end
end
end
-- Log explosion
minetest.log('action', 'Explosion at ' .. minetest.pos_to_string(pos) ..
' with strength ' .. strength .. ' and radius ' .. radius)
-- Update environment
vm:set_data(data)
vm:write_to_map(data)
vm:update_liquids()
end
-- Create an explosion with strength at pos.
--
-- Parameters:
-- pos - The position where the explosion originates from
-- strength - The blast strength of the explosion (a TNT explosion uses 4)
-- info - Table containing information about explosion.
-- puncher - object that is reported as source of punches/damage (optional)
--
-- Values in info:
-- drop_chance - If specified becomes the drop chance of all nodes in the
-- explosion (defaults to 1.0 / strength)
-- no_sound - If true then the explosion will not play a sound
-- no_particle - If true then the explosion will not create particles
function mcl_explosions.explode(pos, strength, info, puncher)
-- The maximum blast radius (in the air)
local radius = math.ceil(1.3 * strength / (0.3 * 0.75) * 0.3)
if not sphere_shapes[radius] then
sphere_shapes[radius] = compute_sphere_rays(radius)
end
shape = sphere_shapes[radius]
trace_explode(pos, strength, shape, radius, (info and info.drop_chance) or 1 / strength, info.fire == true, puncher)
if not (info and info.no_sound) then
add_particles(pos, radius)
end
if not (info and info.no_particle) then
minetest.sound_play("tnt_explode", {
pos = pos, gain = 1.0,
max_hear_distance = strength * 16
}, true)
end
end

View File

@ -0,0 +1,2 @@
# textdomain:mcl_explosions
@1 was caught in an explosion.=@1 wurde Opfer einer Explosion.

View File

@ -0,0 +1,2 @@
# textdomain:mcl_explosions
@1 was caught in an explosion.=

View File

@ -0,0 +1,3 @@
name = mcl_explosions
description = A common API to create explosions.
optional_depends = mcl_fire

View File

@ -1,3 +1,4 @@
mcl_explosions
mcl_core
mcl_sounds
mcl_player

View File

@ -206,7 +206,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
-- Explode if already ignited
if self._boomtimer then
self.object:remove()
tnt.boom(pos)
mcl_explosions.explode(pos, 4, { drop_chance = 1.0 })
return
end
@ -249,7 +249,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
local pos = self.object:get_pos()
if self._boomtimer <= 0 then
self.object:remove()
tnt.boom(pos)
mcl_explosions.explode(pos, 4, { drop_chance = 1.0 })
return
else
tnt.smoke_step(pos)
@ -685,7 +685,7 @@ register_minecart(
if not minetest.settings:get_bool("creative_mode") then
held:take_item()
local index = clicker:get_wielded_index()
local index = clicker:get_wield_index()
local inv = clicker:get_inventory()
inv:set_stack("main", index, held)
end

View File

@ -93,7 +93,7 @@ local node_snow = "mcl_core:snow"
mobs.fallback_node = minetest.registered_aliases["mapgen_dirt"] or "mcl_core:dirt"
local mod_weather = minetest.get_modpath("mcl_weather") ~= nil
local mod_tnt = minetest.get_modpath("mcl_tnt") ~= nil
local mod_explosions = minetest.get_modpath("mcl_explosions") ~= nil
local mod_mobspawners = minetest.get_modpath("mcl_mobspawners") ~= nil
local mod_hunger = minetest.get_modpath("mcl_hunger") ~= nil
local mod_worlds = minetest.get_modpath("mcl_worlds") ~= nil
@ -317,7 +317,11 @@ local is_node_dangerous = function(self, nodename)
end
if minetest.registered_nodes[nn].drowning > 0 then
if self.breath_max ~= -1 then
return true
-- check if the mob is water-breathing _and_ the block is water; only return true if neither is the case
-- this will prevent water-breathing mobs to classify water or e.g. sand below them as dangerous
if not self.breathes_in_water and minetest.get_item_group(nn, "water") ~= 0 then
return true
end
end
end
if minetest.registered_nodes[nn].damage_per_second > 0 then
@ -2028,11 +2032,19 @@ local do_states = function(self, dtime)
local is_in_danger = false
if lp then
-- If mob in or on dangerous block, look for land
if (is_node_dangerous(self, self.standing_in) or
is_node_dangerous(self, self.standing_on)) then
is_in_danger = true
local is_in_danger = false
-- if mob is flying, only check for node it is currently in (no contact with node below)
if flight_check(self) then
is_in_danger = is_node_dangerous(self, self.standing_in)
elseif (is_node_dangerous(self, self.standing_in) or
is_node_dangerous(self, self.standing_on)) then
is_in_danger = true
end
-- If mob in or on dangerous block, look for land
if is_in_danger then
lp = minetest.find_node_near(s, 5, {"group:solid"})
-- did we find land?
@ -2218,26 +2230,10 @@ local do_states = function(self, dtime)
local pos = self.object:get_pos()
-- dont damage anything if area protected or next to water
if minetest.find_node_near(pos, 1, {"group:water"})
or minetest.is_protected(pos, "") then
node_break_radius = 1
end
self.object:remove()
if mobs_griefing and mod_tnt and tnt and tnt.boom
and not minetest.is_protected(pos, "") then
tnt.boom(pos, {
radius = node_break_radius,
damage_radius = entity_damage_radius,
sound = self.sounds.explode,
is_tnt = false,
})
if mod_explosions then
if mobs_griefing and not minetest.is_protected(pos, "") then
mcl_explosions.explode(self.object:get_pos(), self.explosion_strength, { drop_chance = 1.0 }, self.object)
else
minetest.sound_play(self.sounds.explode, {
pos = pos,
gain = 1.0,
@ -2247,6 +2243,8 @@ local do_states = function(self, dtime)
entity_physics(pos, entity_damage_radius)
effect(pos, 32, "tnt_smoke.png", nil, nil, node_break_radius, 1, 0)
end
end
self.object:remove()
return true
end
@ -2742,7 +2740,7 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
self.object:set_velocity({
x = dir.x * kb,
y = up,
y = dir.y * kb + up,
z = dir.z * kb
})
@ -3365,8 +3363,8 @@ minetest.register_entity(name, {
runaway_timer = 0,
pathfinding = def.pathfinding,
immune_to = def.immune_to or {},
explosion_radius = def.explosion_radius,
explosion_damage_radius = def.explosion_damage_radius,
explosion_radius = def.explosion_radius, -- LEGACY
explosion_damage_radius = def.explosion_damage_radius, -- LEGACY
explosion_timer = def.explosion_timer or 3,
allow_fuse_reset = def.allow_fuse_reset ~= false,
stop_to_explode = def.stop_to_explode ~= false,
@ -3393,6 +3391,7 @@ minetest.register_entity(name, {
texture_mods = {},
shoot_arrow = def.shoot_arrow,
sounds_child = def.sounds_child,
explosion_strength = def.explosion_strength,
-- End of MCL2 extensions
on_spawn = def.on_spawn,
@ -3837,8 +3836,7 @@ end
-- no damage to nodes explosion
function mobs:safe_boom(self, pos, radius)
function mobs:safe_boom(self, pos, strength)
minetest.sound_play(self.sounds and self.sounds.explode or "tnt_explode", {
pos = pos,
gain = 1.0,
@ -3851,19 +3849,14 @@ end
-- make explosion with protection and tnt mod check
function mobs:boom(self, pos, radius)
function mobs:boom(self, pos, strength, fire)
if mobs_griefing
and mod_tnt and tnt and tnt.boom
and not minetest.is_protected(pos, "") then
tnt.boom(pos, {
radius = radius,
damage_radius = radius,
sound = self.sounds and self.sounds.explode,
explode_center = true,
is_tnt = false,
})
if mod_explosions then
if mobs_griefing and not minetest.is_protected(pos, "") then
mcl_explosions.explode(pos, strength, { drop_chance = 1.0, fire = fire }, self.object)
else
mobs:safe_boom(self, pos, strength)
end
else
mobs:safe_boom(self, pos, radius)
end

View File

@ -1,2 +1,2 @@
name = mcl_mobs
optional_depends = mcl_weather, mcl_tnt, mcl_hunger, mcl_worlds, invisibility, lucky_block, cmi, doc_identifier, mcl_armor
optional_depends = mcl_weather, mcl_explosions, mcl_hunger, mcl_worlds, invisibility, lucky_block, cmi, doc_identifier, mcl_armor

View File

@ -36,9 +36,8 @@ mobs:register_mob("mobs_mc:creeper", {
runaway_from = { "mobs_mc:ocelot", "mobs_mc:cat" },
attack_type = "explode",
explosion_radius = 3,
explosion_strength = 3,
reach = 4,
explosion_damage_radius = 7,
explosion_timer = 1.5,
allow_fuse_reset = true,
stop_to_explode = true,

View File

@ -79,13 +79,12 @@ mobs:register_arrow("mobs_mc:fireball", {
textures = {"mcl_fire_fire_charge.png"},
velocity = 15,
-- direct hit, no fire... just plenty of pain
hit_player = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 6},
}, nil)
mobs:boom(self, self.object:get_pos(), 3)
mobs:boom(self, self.object:get_pos(), 1, true)
end,
hit_mob = function(self, mob)
@ -93,12 +92,11 @@ mobs:register_arrow("mobs_mc:fireball", {
full_punch_interval = 1.0,
damage_groups = {fleshy = 6},
}, nil)
mobs:boom(self, self.object:get_pos(), 3)
mobs:boom(self, self.object:get_pos(), 1, true)
end,
-- node hit, explode
hit_node = function(self, pos, node)
mobs:boom(self, pos, 3)
mobs:boom(self, pos, 1, true)
end
})

View File

@ -49,8 +49,7 @@ mobs:register_mob("mobs_mc:wither", {
lava_damage = 0,
fire_damage = 0,
attack_type = "dogshoot",
explosion_radius = 3,
explosion_fire = false,
explosion_strength = 8,
dogshoot_stop = true,
arrow = "mobs_mc:wither_skull",
reach = 5,

View File

@ -20,7 +20,7 @@ mcl_weather.rain = {
mcl_weather.rain.sound_handler = function(player)
return minetest.sound_play("weather_rain", {
to_player = player,
to_player = player:get_player_name(),
loop = true,
})
end

View File

@ -174,8 +174,11 @@ minetest.register_on_dieplayer(function(player, reason)
-- Punches
local hitter = reason.object
local hittername, hittertype, hittersubtype, shooter
-- Custom message
if last_damages[name] then
msg = last_damages[name].message
-- Unknown hitter
if hitter == nil then
elseif hitter == nil then
msg = dmsg("murder_any", name)
-- Player
elseif hitter:is_player() then
@ -263,8 +266,8 @@ local start_damage_reset_countdown = function (player, sequence_number)
end, player:get_player_name(), sequence_number)
end
-- Send a custom death mesage when damaging a player via set_hp.
-- To be called directly BEFORE damaging a player via set_hp.
-- Send a custom death mesage when damaging a player via set_hp or punch.
-- To be called directly BEFORE damaging a player via set_hp or punch.
-- The next time the player dies due to a set_hp, the message will be shown.
-- The player must die via set_hp within 0.1 seconds, otherwise the message will be discarded.
function mcl_death_messages.player_damage(player, message)

View File

@ -94,7 +94,7 @@ local dispenserdef = {
end
meta:from_table(meta2:to_table())
end,
_mcl_blast_resistance = 17.5,
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
mesecons = {effector = {
-- Dispense random item when triggered

View File

@ -94,7 +94,7 @@ local dropperdef = {
return stack:get_count()
end
end,
_mcl_blast_resistance = 17.5,
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
mesecons = {effector = {
-- Drop random item when triggered

View File

@ -92,7 +92,7 @@ local dropperdef = {
return stack:get_count()
end
end,
_mcl_blast_resistance = 17.5,
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
mesecons = {effector = {
-- Drop random item when triggered

View File

@ -82,7 +82,7 @@ mesecon.register_node("mcl_observers:observer",
sounds = mcl_sounds.node_sound_stone_defaults(),
paramtype2 = "facedir",
on_rotate = false,
_mcl_blast_resistance = 17.5,
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
},
{
@ -139,7 +139,7 @@ mesecon.register_node("mcl_observers:observer_down",
sounds = mcl_sounds.node_sound_stone_defaults(),
groups = {pickaxey=1, material_stone=1, not_opaque=1, not_in_creative_inventory=1 },
on_rotate = false,
_mcl_blast_resistance = 17.5,
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
drop = "mcl_observers:observer_off",
},
@ -188,7 +188,7 @@ mesecon.register_node("mcl_observers:observer_up",
sounds = mcl_sounds.node_sound_stone_defaults(),
groups = {pickaxey=1, material_stone=1, not_opaque=1, not_in_creative_inventory=1 },
on_rotate = false,
_mcl_blast_resistance = 17.5,
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
drop = "mcl_observers:observer_off",
},

View File

@ -133,7 +133,7 @@ mesecon.register_button = function(basename, description, texture, recipeitem, s
_mcl_button_basename = basename,
_mcl_button_timer = button_timer,
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
@ -184,7 +184,7 @@ mesecon.register_button = function(basename, description, texture, recipeitem, s
end
end,
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})

View File

@ -242,7 +242,7 @@ S("Example 2:\n give @@n mcl_core:apple 5\nGives the nearest player 5 apples"
action_on = commandblock_action_on,
rules = mesecon.rules.alldirs,
}},
_mcl_blast_resistance = 18000000,
_mcl_blast_resistance = 3600000,
_mcl_hardness = -1,
})
@ -261,7 +261,7 @@ minetest.register_node("mesecons_commandblock:commandblock_on", {
action_off = commandblock_action_off,
rules = mesecon.rules.alldirs,
}},
_mcl_blast_resistance = 18000000,
_mcl_blast_resistance = 3600000,
_mcl_hardness = -1,
})

View File

@ -16,7 +16,7 @@ minetest.register_node("mesecons_lightstone:lightstone_off", {
end,
rules = mesecon.rules.alldirs,
}},
_mcl_blast_resistance = 1.5,
_mcl_blast_resistance = 0.3,
_mcl_hardness = 0.3,
})
@ -34,7 +34,7 @@ minetest.register_node("mesecons_lightstone:lightstone_on", {
end,
rules = mesecon.rules.alldirs,
}},
_mcl_blast_resistance = 1.5,
_mcl_blast_resistance = 0.3,
_mcl_hardness = 0.3,
})

View File

@ -48,7 +48,7 @@ S("The note block will only play a note when it is below air, otherwise, it stay
end,
rules = mesecon.rules.alldirs,
}},
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})

View File

@ -200,7 +200,7 @@ minetest.register_node("mesecons_pistons:piston_normal_off", {
action_on = piston_on,
rules = piston_get_rules
}},
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
@ -235,7 +235,7 @@ minetest.register_node("mesecons_pistons:piston_normal_on", {
action_off = piston_off,
rules = piston_get_rules
}},
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = false,
})
@ -262,7 +262,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_normal", {
selection_box = piston_pusher_box,
node_box = piston_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
on_rotate = false,
})
@ -304,7 +304,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", {
action_on = piston_on,
rules = piston_get_rules
}},
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
@ -339,7 +339,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", {
action_off = piston_off,
rules = piston_get_rules
}},
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = false,
})
@ -366,7 +366,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_sticky", {
selection_box = piston_pusher_box,
node_box = piston_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
on_rotate = false,
})
@ -423,7 +423,7 @@ minetest.register_node("mesecons_pistons:piston_up_normal_off", {
sounds = mcl_sounds.node_sound_stone_defaults({
footstep = mcl_sounds.node_sound_wood_defaults().footstep
}),
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
@ -459,7 +459,7 @@ minetest.register_node("mesecons_pistons:piston_up_normal_on", {
action_off = piston_off,
rules = piston_up_rules,
}},
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = false,
})
@ -486,7 +486,7 @@ minetest.register_node("mesecons_pistons:piston_up_pusher_normal", {
selection_box = piston_up_pusher_box,
node_box = piston_up_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
on_rotate = false,
})
@ -526,7 +526,7 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_off", {
action_on = piston_on,
rules = piston_up_rules,
}},
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
@ -562,7 +562,7 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_on", {
action_off = piston_off,
rules = piston_up_rules,
}},
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = false,
})
@ -589,7 +589,7 @@ minetest.register_node("mesecons_pistons:piston_up_pusher_sticky", {
selection_box = piston_up_pusher_box,
node_box = piston_up_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
on_rotate = false,
})
@ -646,7 +646,7 @@ minetest.register_node("mesecons_pistons:piston_down_normal_off", {
action_on = piston_on,
rules = piston_down_rules,
}},
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
@ -682,7 +682,7 @@ minetest.register_node("mesecons_pistons:piston_down_normal_on", {
action_off = piston_off,
rules = piston_down_rules,
}},
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = false,
})
@ -709,7 +709,7 @@ minetest.register_node("mesecons_pistons:piston_down_pusher_normal", {
selection_box = piston_down_pusher_box,
node_box = piston_down_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
on_rotate = false,
})
@ -744,7 +744,7 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_off", {
action_on = piston_on,
rules = piston_down_rules,
}},
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = function(pos, node, user, mode)
if mode == screwdriver.ROTATE_AXIS then
@ -780,7 +780,7 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_on", {
action_off = piston_off,
rules = piston_down_rules,
}},
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
on_rotate = false,
})
@ -807,7 +807,7 @@ minetest.register_node("mesecons_pistons:piston_down_pusher_sticky", {
selection_box = piston_down_pusher_box,
node_box = piston_down_pusher_box,
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
on_rotate = false,
})

View File

@ -125,7 +125,7 @@ function mesecon.register_pressure_plate(basename, description, textures_off, te
is_ground_content = false,
pressureplate_basename = basename,
pressureplate_activated_by = activated_by,
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
},{
node_box = pp_box_off,

View File

@ -36,7 +36,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_on", {
minetest.swap_node(pos, {name = "mesecons_solarpanel:solar_panel_inverted_off"})
mesecon.receptor_off(pos, mesecon.rules.pplate)
end,
_mcl_blast_resistance = 1,
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
})
@ -76,7 +76,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_off", {
minetest.swap_node(pos, {name = "mesecons_solarpanel:solar_panel_inverted_on"})
mesecon.receptor_on(pos, mesecon.rules.pplate)
end,
_mcl_blast_resistance = 1,
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
})
@ -154,7 +154,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_inverted_on", {
minetest.swap_node(pos, {name = "mesecons_solarpanel:solar_panel_off"})
mesecon.receptor_off(pos, mesecon.rules.pplate)
end,
_mcl_blast_resistance = 1,
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
})
@ -192,7 +192,7 @@ minetest.register_node("mesecons_solarpanel:solar_panel_inverted_off", {
minetest.swap_node(pos, {name = "mesecons_solarpanel:solar_panel_on"})
mesecon.receptor_on(pos, mesecon.rules.pplate)
end,
_mcl_blast_resistance = 1,
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
})

View File

@ -204,7 +204,7 @@ minetest.register_node("mesecons_torch:redstoneblock", {
state = mesecon.state.on,
rules = mesecon.rules.alldirs,
}},
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
})

View File

@ -128,7 +128,7 @@ minetest.register_node("mesecons_walllever:wall_lever_off", {
state = mesecon.state.off
}},
on_rotate = on_rotate,
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
minetest.register_node("mesecons_walllever:wall_lever_on", {
@ -160,7 +160,7 @@ minetest.register_node("mesecons_walllever:wall_lever_on", {
state = mesecon.state.on
}},
on_rotate = on_rotate,
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})

View File

@ -275,7 +275,7 @@ local anvildef = {
}
},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 6000,
_mcl_blast_resistance = 1200,
_mcl_hardness = 5,
_mcl_after_falling = damage_anvil_by_falling,

View File

@ -230,7 +230,7 @@ S("You can copy the pattern of a banner by placing two banners of the same color
respawn_banner_entity(pos, node)
end,
_mcl_hardness = 1,
_mcl_blast_resistance = 5,
_mcl_blast_resistance = 1,
on_rotate = function(pos, node, user, mode, param2)
if mode == screwdriver.ROTATE_FACE then
local meta = minetest.get_meta(pos)
@ -274,7 +274,7 @@ minetest.register_node("mcl_banners:hanging_banner", {
respawn_banner_entity(pos, node)
end,
_mcl_hardness = 1,
_mcl_blast_resistance = 5,
_mcl_blast_resistance = 1,
on_rotate = function(pos, node, user, mode, param2)
if mode == screwdriver.ROTATE_FACE then
local r = screwdriver.rotate.wallmounted(pos, node, mode)

View File

@ -3,7 +3,7 @@ mcl_sounds?
mcl_worlds?
mcl_wool?
mcl_dye?
mcl_tnt?
mcl_explosions?
mcl_weather?
mcl_spawn?
doc?

View File

@ -5,6 +5,7 @@ local pi = math.pi
local player_in_bed = 0
local is_sp = minetest.is_singleplayer()
local weather_mod = minetest.get_modpath("mcl_weather") ~= nil
local explosions_mod = minetest.get_modpath("mcl_explosions") ~= nil
-- Helper functions
@ -307,8 +308,8 @@ function mcl_beds.on_rightclick(pos, player, is_top)
if dim == "nether" or dim == "end" then
-- Bed goes BOOM in the Nether or End.
minetest.remove_node(pos)
if minetest.get_modpath("mcl_tnt") then
tnt.boom(pos, {radius = 4, damage_radius = 4, is_tnt = false})
if explosions_mod then
mcl_explosions.explode(pos, 5, {drop_chance = 1.0, fire = true})
end
return
end

View File

@ -342,7 +342,7 @@ minetest.register_node("mcl_books:bookshelf", {
groups = {handy=1,axey=1, flammable=3,building_block=1, material_wood=1, fire_encouragement=30, fire_flammability=20},
drop = "mcl_books:book 3",
sounds = wood_sound,
_mcl_blast_resistance = 7.5,
_mcl_blast_resistance = 1.5,
_mcl_hardness = 1.5,
})

View File

@ -70,7 +70,7 @@ minetest.register_node("mcl_cake:cake", {
_food_particles = false,
_mcl_saturation = 0.4,
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
@ -130,7 +130,7 @@ local register_slice = function(level, nodebox, desc)
_food_particles = false,
_mcl_saturation = 0.4,
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})

View File

@ -63,7 +63,7 @@ minetest.register_node("mcl_cauldrons:cauldron", {
},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_hardness = 2,
_mcl_blast_resistance = 10,
_mcl_blast_resistance = 2,
})
-- Template function for cauldrons with water
@ -94,7 +94,7 @@ local register_filled_cauldron = function(water_level, description, river_water)
sounds = mcl_sounds.node_sound_metal_defaults(),
drop = "mcl_cauldrons:cauldron",
_mcl_hardness = 2,
_mcl_blast_resistance = 10,
_mcl_blast_resistance = 2,
})
-- Add entry aliases for the Help

View File

@ -111,7 +111,7 @@ local crop_def = {
},
sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = false,
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
_mcl_hardness = 0.2,
}

View File

@ -36,7 +36,7 @@ minetest.register_node("mcl_colorblocks:hardened_clay", {
stack_max = 64,
groups = {pickaxey=1, hardened_clay=1,building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 21,
_mcl_blast_resistance = 4.2,
_mcl_hardness = 1.25,
})
@ -86,7 +86,7 @@ for _, row in ipairs(block.dyes) do
groups = {pickaxey=1, hardened_clay=1,building_block=1, material_stone=1},
stack_max = 64,
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 21,
_mcl_blast_resistance = 4.2,
_mcl_hardness = 1.25,
})
@ -127,7 +127,7 @@ for _, row in ipairs(block.dyes) do
-- Specify the node to which this node will convert after getting in contact with water
_mcl_colorblocks_harden_to = "mcl_colorblocks:concrete_"..name,
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
@ -141,7 +141,7 @@ for _, row in ipairs(block.dyes) do
stack_max = 64,
is_ground_content = false,
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 9,
_mcl_blast_resistance = 1.8,
_mcl_hardness = 1.8,
})
@ -158,7 +158,7 @@ for _, row in ipairs(block.dyes) do
stack_max = 64,
is_ground_content = false,
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 7,
_mcl_blast_resistance = 4.2,
_mcl_hardness = 1.4,
on_rotate = on_rotate,
})

View File

@ -20,7 +20,7 @@ minetest.register_node("mcl_core:stone", {
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
drop = 'mcl_core:cobble',
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -34,7 +34,7 @@ minetest.register_node("mcl_core:stone_with_coal", {
groups = {pickaxey=1, building_block=1, material_stone=1},
drop = 'mcl_core:coal_lump',
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
})
@ -47,7 +47,7 @@ minetest.register_node("mcl_core:stone_with_iron", {
groups = {pickaxey=3, building_block=1, material_stone=1},
drop = 'mcl_core:stone_with_iron',
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
})
@ -61,7 +61,7 @@ minetest.register_node("mcl_core:stone_with_gold", {
groups = {pickaxey=4, building_block=1, material_stone=1},
drop = "mcl_core:stone_with_gold",
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
})
@ -93,7 +93,7 @@ minetest.register_node("mcl_core:stone_with_redstone", {
sounds = mcl_sounds.node_sound_stone_defaults(),
on_punch = redstone_ore_activate,
on_walk_over = redstone_ore_activate, -- Uses walkover mod
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
})
@ -131,7 +131,7 @@ minetest.register_node("mcl_core:stone_with_redstone_lit", {
on_timer = function(pos, elapsed)
minetest.swap_node(pos, {name="mcl_core:stone_with_redstone"})
end,
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
})
@ -153,7 +153,7 @@ minetest.register_node("mcl_core:stone_with_lapis", {
}
},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
})
@ -166,7 +166,7 @@ minetest.register_node("mcl_core:stone_with_emerald", {
groups = {pickaxey=4, building_block=1, material_stone=1},
drop = "mcl_core:emerald",
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
})
@ -179,7 +179,7 @@ minetest.register_node("mcl_core:stone_with_diamond", {
groups = {pickaxey=4, building_block=1, material_stone=1},
drop = "mcl_core:diamond",
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
})
@ -191,7 +191,7 @@ minetest.register_node("mcl_core:stonebrick", {
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -203,7 +203,7 @@ minetest.register_node("mcl_core:stonebrickcarved", {
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -215,7 +215,7 @@ minetest.register_node("mcl_core:stonebrickcracked", {
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -227,7 +227,7 @@ minetest.register_node("mcl_core:stonebrickmossy", {
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -239,7 +239,7 @@ minetest.register_node("mcl_core:stone_smooth", {
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = false,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -251,7 +251,7 @@ minetest.register_node("mcl_core:granite", {
stack_max = 64,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -263,7 +263,7 @@ minetest.register_node("mcl_core:granite_smooth", {
is_ground_content = false,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -275,7 +275,7 @@ minetest.register_node("mcl_core:andesite", {
stack_max = 64,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -299,7 +299,7 @@ minetest.register_node("mcl_core:diorite", {
stack_max = 64,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -311,7 +311,7 @@ minetest.register_node("mcl_core:diorite_smooth", {
stack_max = 64,
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -344,7 +344,7 @@ minetest.register_node("mcl_core:dirt_with_grass", {
return mcl_core.on_snowable_construct(pos)
end,
_mcl_snowed = "mcl_core:dirt_with_grass_snow",
_mcl_blast_resistance = 3,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.6,
})
mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", nil, nil, true)
@ -368,7 +368,7 @@ minetest.register_node("mcl_core:grass_path", {
sounds = mcl_sounds.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
_mcl_blast_resistance = 3.25,
_mcl_blast_resistance = 0.65,
_mcl_hardness = 0.6,
})
@ -387,7 +387,7 @@ minetest.register_node("mcl_core:mycelium", {
on_construct = mcl_core.on_snowable_construct,
_mcl_snowed = "mcl_core:mycelium_snow",
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.6,
})
mcl_core.register_snowed_node("mcl_core:mycelium_snow", "mcl_core:mycelium")
@ -403,7 +403,7 @@ minetest.register_node("mcl_core:podzol", {
sounds = mcl_sounds.node_sound_dirt_defaults(),
on_construct = mcl_core.on_snowable_construct,
_mcl_snowed = "mcl_core:podzol_snow",
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.6,
})
mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol")
@ -417,7 +417,7 @@ minetest.register_node("mcl_core:dirt", {
stack_max = 64,
groups = {handy=1,shovely=1, dirt=1,soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, enderman_takable=1, building_block=1},
sounds = mcl_sounds.node_sound_dirt_defaults(),
_mcl_blast_resistance = 3,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
@ -429,7 +429,7 @@ minetest.register_node("mcl_core:coarse_dirt", {
stack_max = 64,
groups = {handy=1,shovely=1, dirt=3,soil=1, soil_sugarcane=1, cultivatable=1, enderman_takable=1, building_block=1},
sounds = mcl_sounds.node_sound_dirt_defaults(),
_mcl_blast_resistance = 3,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
@ -450,7 +450,7 @@ minetest.register_node("mcl_core:gravel", {
sounds = mcl_sounds.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.45},
}),
_mcl_blast_resistance = 3,
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,
})
@ -464,7 +464,7 @@ minetest.register_node("mcl_core:sand", {
stack_max = 64,
groups = {handy=1,shovely=1, falling_node=1, sand=1, soil_sugarcane=1, enderman_takable=1, building_block=1, material_sand=1},
sounds = mcl_sounds.node_sound_sand_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
@ -477,7 +477,7 @@ minetest.register_node("mcl_core:sandstone", {
stack_max = 64,
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
@ -489,7 +489,7 @@ minetest.register_node("mcl_core:sandstonesmooth", {
stack_max = 64,
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
@ -501,7 +501,7 @@ minetest.register_node("mcl_core:sandstonecarved", {
stack_max = 64,
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
@ -514,7 +514,7 @@ minetest.register_node("mcl_core:sandstonesmooth2", {
stack_max = 64,
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
@ -528,7 +528,7 @@ minetest.register_node("mcl_core:redsand", {
stack_max = 64,
groups = {handy=1,shovely=1, falling_node=1, sand=1, soil_sugarcane=1, enderman_takable=1, building_block=1, material_sand=1},
sounds = mcl_sounds.node_sound_sand_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
@ -540,7 +540,7 @@ minetest.register_node("mcl_core:redsandstone", {
stack_max = 64,
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
@ -552,7 +552,7 @@ minetest.register_node("mcl_core:redsandstonesmooth", {
stack_max = 64,
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
@ -564,7 +564,7 @@ minetest.register_node("mcl_core:redsandstonecarved", {
stack_max = 64,
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
@ -576,7 +576,7 @@ minetest.register_node("mcl_core:redsandstonesmooth2", {
stack_max = 64,
groups = {pickaxey=1, sandstone=1, red_sandstone=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
@ -592,7 +592,7 @@ minetest.register_node("mcl_core:clay", {
groups = {handy=1,shovely=1, enderman_takable=1, building_block=1},
drop = 'mcl_core:clay_lump 4',
sounds = mcl_sounds.node_sound_dirt_defaults(),
_mcl_blast_resistance = 3,
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,
})
@ -605,7 +605,7 @@ minetest.register_node("mcl_core:brick_block", {
stack_max = 64,
groups = {pickaxey=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})
@ -621,7 +621,7 @@ minetest.register_node("mcl_core:bedrock", {
is_ground_content = false,
on_blast = function() end,
drop = '',
_mcl_blast_resistance = 18000000,
_mcl_blast_resistance = 3600000,
_mcl_hardness = -1,
-- Eternal fire on top of bedrock, if in the End dimension
@ -658,7 +658,7 @@ minetest.register_node("mcl_core:cobble", {
stack_max = 64,
groups = {pickaxey=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})
@ -670,7 +670,7 @@ minetest.register_node("mcl_core:mossycobble", {
stack_max = 64,
groups = {pickaxey=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})
@ -682,7 +682,7 @@ minetest.register_node("mcl_core:coalblock", {
stack_max = 64,
groups = {pickaxey=1, flammable=1, building_block=1, material_stone=1, fire_encouragement=5, fire_flammability=5},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
})
@ -694,7 +694,7 @@ minetest.register_node("mcl_core:ironblock", {
stack_max = 64,
groups = {pickaxey=2, building_block=1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
})
@ -706,7 +706,7 @@ minetest.register_node("mcl_core:goldblock", {
stack_max = 64,
groups = {pickaxey=4, building_block=1},
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
})
@ -718,7 +718,7 @@ minetest.register_node("mcl_core:diamondblock", {
stack_max = 64,
groups = {pickaxey=4, building_block=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
})
@ -730,7 +730,7 @@ minetest.register_node("mcl_core:lapisblock", {
stack_max = 64,
groups = {pickaxey=3, building_block=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
})
@ -742,7 +742,7 @@ minetest.register_node("mcl_core:emeraldblock", {
stack_max = 64,
groups = {pickaxey=4, building_block=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
})
@ -754,7 +754,7 @@ minetest.register_node("mcl_core:obsidian", {
sounds = mcl_sounds.node_sound_stone_defaults(),
stack_max = 64,
groups = {pickaxey=5, building_block=1, material_stone=1},
_mcl_blast_resistance = 6000,
_mcl_blast_resistance = 1200,
_mcl_hardness = 50,
})
@ -774,7 +774,7 @@ minetest.register_node("mcl_core:ice", {
after_dig_node = function(pos, oldnode)
mcl_core.melt_ice(pos)
end,
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
@ -787,7 +787,7 @@ minetest.register_node("mcl_core:packed_ice", {
groups = {handy=1,pickaxey=1, slippery=3, building_block=1},
drop = "",
sounds = mcl_sounds.node_sound_glass_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
@ -851,7 +851,7 @@ for i=0,3 do
local timer = minetest.get_node_timer(pos)
timer:start(1.5)
end,
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
@ -970,7 +970,7 @@ for i=1,8 do
on_place = on_place,
after_destruct = mcl_core.after_snow_destruct,
drop = "mcl_throwing:snowball "..(i+1),
_mcl_blast_resistance = 0.5,
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,
})
end
@ -987,7 +987,7 @@ minetest.register_node("mcl_core:snowblock", {
on_construct = mcl_core.on_snow_construct,
after_destruct = mcl_core.after_snow_destruct,
drop = "mcl_throwing:snowball 4",
_mcl_blast_resistance = 1,
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
})

View File

@ -42,7 +42,7 @@ minetest.register_node("mcl_core:cactus", {
if not node_below then return false end
return (node_below.name == "mcl_core:cactus" or minetest.get_item_group(node_below.name, "sand") == 1)
end),
_mcl_blast_resistance = 2,
_mcl_blast_resistance = 0.4,
_mcl_hardness = 0.4,
})

View File

@ -81,7 +81,7 @@ minetest.register_node("mcl_core:ladder", {
return itemstack
end,
_mcl_blast_resistance = 2,
_mcl_blast_resistance = 0.4,
_mcl_hardness = 0.4,
on_rotate = rotate_climbable,
})
@ -164,7 +164,7 @@ minetest.register_node("mcl_core:vine", {
end,
_mcl_blast_resistance = 1,
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
on_rotate = false,
})

View File

@ -14,7 +14,7 @@ minetest.register_node("mcl_core:glass", {
groups = {handy=1, glass=1, building_block=1, material_glass=1},
sounds = mcl_sounds.node_sound_glass_defaults(),
drop = "",
_mcl_blast_resistance = 1.5,
_mcl_blast_resistance = 0.3,
_mcl_hardness = 0.3,
})
@ -49,7 +49,7 @@ function mcl_core.add_stained_glass(desc, recipeitem, colorgroup, color)
groups = {handy=1, glass=1, building_block=1, material_glass=1},
sounds = mcl_sounds.node_sound_glass_defaults(),
drop = "",
_mcl_blast_resistance = 1.5,
_mcl_blast_resistance = 0.3,
_mcl_hardness = 0.3,
})

View File

@ -49,7 +49,7 @@ minetest.register_node("mcl_core:water_flowing", {
liquid_range = 7,
post_effect_color = {a=209, r=0x03, g=0x3C, b=0x5C},
groups = { water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, freezes=1, melt_around=1, dig_by_piston=1},
_mcl_blast_resistance = 500,
_mcl_blast_resistance = 100,
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
_mcl_hardness = -1,
})
@ -93,7 +93,7 @@ S("• When water is directly below lava, the water turns into stone."),
post_effect_color = {a=209, r=0x03, g=0x3C, b=0x5C},
stack_max = 64,
groups = { water=3, liquid=3, puts_out_fire=1, freezes=1, not_in_creative_inventory=1, dig_by_piston=1},
_mcl_blast_resistance = 500,
_mcl_blast_resistance = 100,
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
_mcl_hardness = -1,
})
@ -139,7 +139,7 @@ minetest.register_node("mcl_core:lava_flowing", {
_mcl_node_death_message = lava_death_messages,
post_effect_color = {a=255, r=208, g=73, b=10},
groups = { lava=3, liquid=2, destroys_items=1, not_in_creative_inventory=1, dig_by_piston=1},
_mcl_blast_resistance = 500,
_mcl_blast_resistance = 100,
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
_mcl_hardness = -1,
})
@ -194,7 +194,7 @@ S("• When lava is directly above water, the water turns into stone."),
post_effect_color = {a=255, r=208, g=73, b=10},
stack_max = 64,
groups = { lava=3, liquid=2, destroys_items=1, not_in_creative_inventory=1, dig_by_piston=1},
_mcl_blast_resistance = 500,
_mcl_blast_resistance = 100,
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
_mcl_hardness = -1,
})

View File

@ -17,7 +17,7 @@ minetest.register_node("mcl_core:bone_block", {
groups = {pickaxey=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
on_rotate = on_rotate,
_mcl_blast_resistance = 10,
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
@ -76,7 +76,7 @@ minetest.register_node("mcl_core:cobweb", {
drop = "mcl_mobitems:string",
_mcl_shears_drop = true,
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 20,
_mcl_blast_resistance = 4,
_mcl_hardness = 4,
})
@ -135,7 +135,7 @@ minetest.register_node("mcl_core:barrier", {
groups = {creative_breakable=1, not_in_creative_inventory = 1, not_solid = 1 },
on_blast = function() end,
drop = "",
_mcl_blast_resistance = 18000003,
_mcl_blast_resistance = 36000008,
_mcl_hardness = -1,
after_place_node = function (pos, placer, itemstack, pointed_thing)
if placer == nil then
@ -195,7 +195,7 @@ minetest.register_node("mcl_core:realm_barrier", {
groups = {not_in_creative_inventory = 1, not_solid = 1 },
on_blast = function() end,
drop = "",
_mcl_blast_resistance = 18000003,
_mcl_blast_resistance = 36000008,
_mcl_hardness = -1,
-- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of.
node_placement_prediction = "",

View File

@ -20,7 +20,7 @@ local register_tree_trunk = function(subname, description_trunk, description_bar
groups = {handy=1,axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = on_rotate,
_mcl_blast_resistance = 10,
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
@ -35,7 +35,7 @@ local register_tree_trunk = function(subname, description_trunk, description_bar
sounds = mcl_sounds.node_sound_wood_defaults(),
is_ground_content = false,
on_rotate = on_rotate,
_mcl_blast_resistance = 10,
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
@ -58,7 +58,7 @@ local register_wooden_planks = function(subname, description, tiles)
is_ground_content = false,
groups = {handy=1,axey=1, flammable=3,wood=1,building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
_mcl_hardness = 2,
})
end
@ -108,7 +108,7 @@ local register_leaves = function(subname, description, longdesc, tiles, drop1, d
drop = drop,
_mcl_shears_drop = true,
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 1,
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
})
end

View File

@ -35,7 +35,7 @@ minetest.register_node("mcl_crafting_table:crafting_table", {
minetest.show_formspec(player:get_player_name(), "main", form)
end,
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 12.5,
_mcl_blast_resistance = 2.5,
_mcl_hardness = 2.5,
})

View File

@ -13,7 +13,7 @@ mcl_doors:register_door("mcl_doors:wooden_door", {
inventory_image = "doors_item_wood.png",
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_doors_door_wood_lower.png", "mcl_doors_door_wood_side_lower.png"},
tiles_top = {"mcl_doors_door_wood_upper.png", "mcl_doors_door_wood_side_upper.png"},
sounds = mcl_sounds.node_sound_wood_defaults(),
@ -36,7 +36,7 @@ mcl_doors:register_door("mcl_doors:acacia_door", {
inventory_image = "mcl_doors_door_acacia.png",
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_doors_door_acacia_lower.png", "mcl_doors_door_acacia_side_lower.png"},
tiles_top = {"mcl_doors_door_acacia_upper.png", "mcl_doors_door_acacia_side_upper.png"},
sounds = mcl_sounds.node_sound_wood_defaults(),
@ -59,7 +59,7 @@ mcl_doors:register_door("mcl_doors:birch_door", {
inventory_image = "mcl_doors_door_birch.png",
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_doors_door_birch_lower.png", "mcl_doors_door_birch_side_lower.png"},
tiles_top = {"mcl_doors_door_birch_upper.png", "mcl_doors_door_birch_side_upper.png"},
sounds = mcl_sounds.node_sound_wood_defaults(),
@ -82,7 +82,7 @@ mcl_doors:register_door("mcl_doors:dark_oak_door", {
inventory_image = "mcl_doors_door_dark_oak.png",
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_doors_door_dark_oak_lower.png", "mcl_doors_door_dark_oak_side_lower.png"},
tiles_top = {"mcl_doors_door_dark_oak_upper.png", "mcl_doors_door_dark_oak_side_upper.png"},
sounds = mcl_sounds.node_sound_wood_defaults(),
@ -105,7 +105,7 @@ mcl_doors:register_door("mcl_doors:jungle_door", {
inventory_image = "mcl_doors_door_jungle.png",
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_doors_door_jungle_lower.png", "mcl_doors_door_jungle_side_lower.png"},
tiles_top = {"mcl_doors_door_jungle_upper.png", "mcl_doors_door_jungle_side_upper.png"},
sounds = mcl_sounds.node_sound_wood_defaults(),
@ -128,7 +128,7 @@ mcl_doors:register_door("mcl_doors:spruce_door", {
inventory_image = "mcl_doors_door_spruce.png",
groups = {handy=1,axey=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
tiles_bottom = {"mcl_doors_door_spruce_lower.png", "mcl_doors_door_spruce_side_lower.png"},
tiles_top = {"mcl_doors_door_spruce_upper.png", "mcl_doors_door_spruce_side_upper.png"},
sounds = mcl_sounds.node_sound_wood_defaults(),
@ -182,7 +182,7 @@ mcl_doors:register_door("mcl_doors:iron_door", {
inventory_image = "doors_item_steel.png",
groups = {pickaxey=1, mesecon_effector_on=1},
_mcl_hardness = 5,
_mcl_blast_resistance = 25,
_mcl_blast_resistance = 5,
tiles_bottom = {"mcl_doors_door_iron_lower.png^[transformFX", "mcl_doors_door_iron_side_lower.png"},
tiles_top = {"mcl_doors_door_iron_upper.png^[transformFX", "mcl_doors_door_iron_side_upper.png"},
sounds = mcl_sounds.node_sound_metal_defaults(),
@ -224,7 +224,7 @@ for w=1, #woods do
wield_image = woods[w][3],
groups = {handy=1,axey=1, mesecon_effector_on=1, material_wood=1, flammable=-1},
_mcl_hardness = 3,
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
sounds = mcl_sounds.node_sound_wood_defaults(),
})
@ -251,7 +251,7 @@ mcl_doors:register_trapdoor("mcl_doors:iron_trapdoor", {
wield_image = "doors_trapdoor_steel.png",
groups = {pickaxey=1, mesecon_effector_on=1},
_mcl_hardness = 5,
_mcl_blast_resistance = 25,
_mcl_blast_resistance = 5,
sounds = mcl_sounds.node_sound_metal_defaults(),
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",

View File

@ -15,7 +15,7 @@ minetest.register_node("mcl_end:end_stone", {
groups = {pickaxey=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
after_dig_node = mcl_end.check_detach_chorus_plant,
_mcl_blast_resistance = 45,
_mcl_blast_resistance = 9,
_mcl_hardness = 3,
})
@ -27,7 +27,7 @@ minetest.register_node("mcl_end:end_bricks", {
stack_max = 64,
groups = {pickaxey=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 9,
_mcl_hardness = 0.8,
})
@ -39,7 +39,7 @@ minetest.register_node("mcl_end:purpur_block", {
stack_max = 64,
groups = {pickaxey=1, building_block=1, material_stone=1, purpur_block=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -54,7 +54,7 @@ minetest.register_node("mcl_end:purpur_pillar", {
groups = {pickaxey=1, building_block=1, material_stone=1, purpur_block=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
on_rotate = on_rotate,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
})
@ -167,7 +167,7 @@ minetest.register_node("mcl_end:dragon_egg", {
},
groups = {handy=1, falling_node = 1, deco_block = 1, not_in_creative_inventory = 1, dig_by_piston = 1 },
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 45,
_mcl_blast_resistance = 9,
_mcl_hardness = 3,
-- TODO: Make dragon egg teleport on punching
})

View File

@ -200,7 +200,7 @@ minetest.register_node("mcl_end:chorus_flower", {
end,
after_dig_node = mcl_end.check_detach_chorus_plant,
on_blast = mcl_end.check_blast_chorus_plant,
_mcl_blast_resistance = 2,
_mcl_blast_resistance = 0.4,
_mcl_hardness = 0.4,
})

View File

@ -33,7 +33,7 @@ local melon_base_def = {
}
},
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 5,
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
}

View File

@ -101,7 +101,7 @@ local pumpkin_base_def = {
groups = {handy=1,axey=1, plant=1,building_block=1, dig_by_piston=1, enderman_takable=1},
sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = on_rotate,
_mcl_blast_resistance = 5,
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
}
minetest.register_node("mcl_farming:pumpkin", pumpkin_base_def)
@ -149,7 +149,7 @@ minetest.register_node("mcl_farming:pumpkin_face_light", {
mobs_mc.tools.check_snow_golem_summon(pos)
end,
on_rotate = on_rotate,
_mcl_blast_resistance = 5,
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
})

View File

@ -21,7 +21,7 @@ minetest.register_node("mcl_farming:soil", {
end,
groups = {handy=1,shovely=1, dirtifies_below_solid=1, dirtifier=1, soil=2, soil_sapling=1, deco_block=1 },
sounds = mcl_sounds.node_sound_dirt_defaults(),
_mcl_blast_resistance = 3,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.6,
})
@ -44,7 +44,7 @@ minetest.register_node("mcl_farming:soil_wet", {
end,
groups = {handy=1,shovely=1, not_in_creative_inventory=1, dirtifies_below_solid=1, dirtifier=1, soil=3, soil_sapling=1 },
sounds = mcl_sounds.node_sound_dirt_defaults(),
_mcl_blast_resistance = 3,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.6,
})

View File

@ -149,7 +149,7 @@ minetest.register_node("mcl_farming:hay_block", {
groups = {handy=1, flammable=2, fire_encouragement=60, fire_flammability=20, building_block=1, fall_damage_add_percent=-80},
sounds = mcl_sounds.node_sound_leaves_defaults(),
on_rotate = on_rotate,
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})

View File

@ -359,7 +359,7 @@ minetest.register_node("mcl_furnaces:furnace", {
allow_metadata_inventory_take = allow_metadata_inventory_take,
on_metadata_inventory_take = on_metadata_inventory_take,
on_receive_fields = receive_fields,
_mcl_blast_resistance = 17.5,
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
on_rotate = on_rotate,
})
@ -402,7 +402,7 @@ minetest.register_node("mcl_furnaces:furnace_active", {
allow_metadata_inventory_take = allow_metadata_inventory_take,
on_metadata_inventory_take = on_metadata_inventory_take,
on_receive_fields = receive_fields,
_mcl_blast_resistance = 17.5,
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
on_rotate = on_rotate,
})

View File

@ -112,7 +112,7 @@ local function addhead(name, texture, desc, longdesc, rangemob, rangefactor)
_mcl_armor_mob_range_mob = rangemob,
_mcl_armor_mob_range_factor = rangefactor,
_mcl_blast_resistance = 5,
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
})
@ -146,7 +146,7 @@ local function addhead(name, texture, desc, longdesc, rangemob, rangefactor)
}),
drop = "mcl_heads:"..name,
on_rotate = on_rotate_wall,
_mcl_blast_resistance = 5,
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
})

View File

@ -114,7 +114,7 @@ local def_hopper = {
end,
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 24,
_mcl_blast_resistance = 4.8,
_mcl_hardness = 3,
}
@ -303,7 +303,7 @@ local def_hopper_side = {
on_rotate = on_rotate,
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 24,
_mcl_blast_resistance = 4.8,
_mcl_hardness = 3,
}

View File

@ -227,7 +227,7 @@ minetest.register_node("mcl_jukebox:jukebox", {
end
meta:from_table(meta2:to_table())
end,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})

View File

@ -323,7 +323,7 @@ minetest.register_node("mcl_mobspawners:spawner", {
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 25,
_mcl_blast_resistance = 5,
_mcl_hardness = 5,
})

View File

@ -26,7 +26,7 @@ local register_block = function(subname, description, tiles, is_ground_content)
_tt_help = S("Hides a silverfish"),
_doc_items_longdesc = S("An infested block is a block from which a silverfish will pop out when it is broken. It looks identical to its normal counterpart."),
_mcl_hardness = 0,
_mcl_blast_resistance = 3.75,
_mcl_blast_resistance = 0.5,
})
end

View File

@ -4,7 +4,7 @@ local template = {
groups = {handy=1,axey=1, building_block = 1, material_wood = 1, flammable = -1 },
sounds = mcl_sounds.node_sound_wood_defaults(),
is_ground_content = true,
_mcl_blast_resistance = 1,
_mcl_blast_resistance = 0.2,
_mcl_hardness = 0.2,
}

View File

@ -25,7 +25,7 @@ minetest.register_node("mcl_nether:glowstone", {
paramtype = "light",
light_source = minetest.LIGHT_MAX,
sounds = mcl_sounds.node_sound_glass_defaults(),
_mcl_blast_resistance = 1.5,
_mcl_blast_resistance = 0.3,
_mcl_hardness = 0.3,
})
@ -38,7 +38,7 @@ minetest.register_node("mcl_nether:quartz_ore", {
groups = {pickaxey=1, building_block=1, material_stone=1},
drop = 'mcl_nether:quartz',
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 15,
_mcl_blast_resistance = 3,
_mcl_hardness = 3,
})
@ -75,7 +75,7 @@ minetest.register_node("mcl_nether:netherrack", {
is_ground_content = true,
groups = {pickaxey=1, building_block=1, material_stone=1, enderman_takable=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 2,
_mcl_blast_resistance = 0.4,
_mcl_hardness = 0.4,
-- Eternal fire on top
@ -104,7 +104,7 @@ minetest.register_node("mcl_nether:magma", {
player:set_hp(player:get_hp() - 1, { type = "punch", from = "mod" })
end
end,
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
-- Eternal fire on top
@ -125,7 +125,7 @@ minetest.register_node("mcl_nether:soul_sand", {
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5 - 2/16, 0.5 },
},
sounds = mcl_sounds.node_sound_sand_defaults(),
_mcl_blast_resistance = 2.5,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
-- Movement handling is done in mcl_playerplus mod
})
@ -139,7 +139,7 @@ minetest.register_node("mcl_nether:nether_brick", {
is_ground_content = false,
groups = {pickaxey=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})
@ -152,7 +152,7 @@ minetest.register_node("mcl_nether:red_nether_brick", {
is_ground_content = false,
groups = {pickaxey=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})
@ -170,7 +170,7 @@ minetest.register_node("mcl_nether:nether_wart_block", {
dug={name="default_dirt_footstep", gain=1.5},
}
),
_mcl_blast_resistance = 5,
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
})
@ -182,7 +182,7 @@ minetest.register_node("mcl_nether:quartz_block", {
tiles = {"mcl_nether_quartz_block_top.png", "mcl_nether_quartz_block_bottom.png", "mcl_nether_quartz_block_side.png"},
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
@ -194,7 +194,7 @@ minetest.register_node("mcl_nether:quartz_chiseled", {
tiles = {"mcl_nether_quartz_chiseled_top.png", "mcl_nether_quartz_chiseled_top.png", "mcl_nether_quartz_chiseled_side.png"},
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
@ -209,7 +209,7 @@ minetest.register_node("mcl_nether:quartz_pillar", {
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
on_rotate = on_rotate,
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})
minetest.register_node("mcl_nether:quartz_smooth", {
@ -220,7 +220,7 @@ minetest.register_node("mcl_nether:quartz_smooth", {
tiles = {"mcl_nether_quartz_block_bottom.png"},
groups = {pickaxey=1, quartz_block=1,building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
_mcl_hardness = 0.8,
})

View File

@ -90,7 +90,7 @@ for c=1, #corals do
sounds = mcl_sounds.node_sound_dirt_defaults(),
drop = "mcl_ocean:dead_"..id.."_coral_block",
_mcl_hardness = 1.5,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
})
minetest.register_node("mcl_ocean:dead_"..id.."_coral_block", {
description = corals[c][3],
@ -99,7 +99,7 @@ for c=1, #corals do
groups = { pickaxey = 1, building_block = 1, coral=2, coral_block=2, coral_species=c, },
sounds = mcl_sounds.node_sound_dirt_defaults(),
_mcl_hardness = 1.5,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
})
-- Coral

View File

@ -19,7 +19,7 @@ minetest.register_node("mcl_ocean:sea_lantern", {
tiles = {{name="mcl_ocean_sea_lantern.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.25}}},
groups = {handy=1, building_block=1, material_glass=1},
sounds = mcl_sounds.node_sound_glass_defaults(),
_mcl_blast_resistance = 1.5,
_mcl_blast_resistance = 0.3,
_mcl_hardness = 0.3,
})
@ -32,7 +32,7 @@ minetest.register_node("mcl_ocean:prismarine", {
tiles = {{name="mcl_ocean_prismarine_anim.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=45.0}}},
groups = {pickaxey=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 1.5,
_mcl_hardness = 1.5,
})
@ -44,7 +44,7 @@ minetest.register_node("mcl_ocean:prismarine_brick", {
tiles = {"mcl_ocean_prismarine_bricks.png"},
groups = {pickaxey=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 1.5,
_mcl_hardness = 1.5,
})
@ -56,7 +56,7 @@ minetest.register_node("mcl_ocean:prismarine_dark", {
tiles = {"mcl_ocean_prismarine_dark.png"},
groups = {pickaxey=1, building_block=1, material_stone=1},
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 1.5,
_mcl_hardness = 1.5,
})

View File

@ -79,7 +79,7 @@ minetest.register_node("mcl_portals:portal_end", {
groups = {portal=1, not_in_creative_inventory = 1, disable_jump = 1},
_mcl_hardness = -1,
_mcl_blast_resistance = 18000000,
_mcl_blast_resistance = 36000000,
})
-- Obsidian platform at the End portal destination in the End
@ -329,7 +329,7 @@ minetest.register_node("mcl_portals:end_portal_frame", {
on_rotate = rotate_frame,
_mcl_blast_resistance = 18000000,
_mcl_blast_resistance = 36000000,
_mcl_hardness = -1,
})
@ -368,7 +368,7 @@ minetest.register_node("mcl_portals:end_portal_frame_eye", {
on_rotate = rotate_frame_eye,
_mcl_blast_resistance = 18000000,
_mcl_blast_resistance = 36000000,
_mcl_hardness = -1,
})

View File

@ -412,7 +412,7 @@ minetest.register_node("mcl_signs:wall_sign", {
end
end,
_mcl_hardness = 1,
_mcl_blast_resistance = 5,
_mcl_blast_resistance = 1,
})
-- Standing sign nodes.
@ -452,7 +452,7 @@ local ssign = {
end,
_mcl_hardness = 1,
_mcl_blast_resistance = 5,
_mcl_blast_resistance = 1,
}
minetest.register_node("mcl_signs:standing_sign", ssign)

View File

@ -90,7 +90,7 @@ minetest.register_node("mcl_sponges:sponge", {
end
return minetest.item_place_node(itemstack, placer, pointed_thing)
end,
_mcl_blast_resistance = 3,
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,
})
@ -108,7 +108,7 @@ minetest.register_node("mcl_sponges:sponge_wet", {
stack_max = 64,
sounds = mcl_sounds.node_sound_dirt_defaults(),
groups = {handy=1, building_block=1},
_mcl_blast_resistance = 3,
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,
})
@ -127,7 +127,7 @@ if minetest.get_modpath("mclx_core") then
stack_max = 64,
sounds = mcl_sounds.node_sound_dirt_defaults(),
groups = {handy=1, building_block=1},
_mcl_blast_resistance = 3,
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,
})

View File

@ -1,3 +1,4 @@
mcl_explosions
mcl_sounds?
mcl_mobitems?
mcl_death_messages?

View File

@ -10,40 +10,6 @@ local function spawn_tnt(pos, entname)
return tnt
end
local function activate_if_tnt(nname, np, tnt_np, tntr)
if nname == "mcl_tnt:tnt" then
local e = spawn_tnt(np, nname)
e:set_velocity({x=(np.x - tnt_np.x)*5+(tntr / 4), y=(np.y - tnt_np.y)*5+(tntr / 3), z=(np.z - tnt_np.z)*5+(tntr / 4)})
minetest.remove_node(np)
minetest.check_for_falling(np)
end
end
local function do_tnt_physics(tnt_np, tntr, tnt_obj)
local objs = minetest.get_objects_inside_radius(tnt_np, tntr)
for k, obj in pairs(objs) do
local ent = obj:get_luaentity()
local v = obj:get_velocity()
local p = obj:get_pos()
if ent and ent.name == "mcl_tnt:tnt" and v ~= nil then
obj:set_velocity({x=(p.x - tnt_np.x) + (tntr / 2) + v.x, y=(p.y - tnt_np.y) + tntr + v.y, z=(p.z - tnt_np.z) + (tntr / 2) + v.z})
else
if v ~= nil and not obj:is_player() then
obj:set_velocity({x=(p.x - tnt_np.x) + (tntr / 4) + v.x, y=(p.y - tnt_np.y) + (tntr / 2) + v.y, z=(p.z - tnt_np.z) + (tntr / 4) + v.z})
end
local dist = math.max(1, vector.distance(tnt_np, p))
local damage = (4 / dist) * tntr
if obj:is_player() == true then
if mod_death_messages then
mcl_death_messages.player_damage(obj, S("@1 was caught in an explosion.", obj:get_player_name()))
end
end
local puncher = tnt_obj or obj
obj:punch(puncher, nil, { damage_groups = { fleshy = damage }})
end
end
end
tnt = {}
tnt.ignite = function(pos)
minetest.remove_node(pos)
@ -103,6 +69,11 @@ minetest.register_node("mcl_tnt:tnt", {
_doc_items_usagehelp = S("Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds."),
groups = { dig_immediate = 3, tnt = 1, enderman_takable=1 },
mesecons = tnt_mesecons,
on_blast = function(pos)
local e = spawn_tnt(pos, "mcl_tnt:tnt")
e:get_luaentity().timer = tnt.BOOMTIMER - (0.5 + math.random())
return true
end,
_on_ignite = function(player, pointed_thing)
tnt.ignite(pointed_thing.under)
return true
@ -129,6 +100,7 @@ local TNT = {
-- Initial value for our timer
timer = 0,
blinktimer = 0,
tnt_knockback = true,
blinkstatus = true,}
function TNT:on_activate(staticdata)
@ -204,76 +176,11 @@ function TNT:on_step(dtime)
self.blinkstatus = not self.blinkstatus
end
if self.timer > tnt.BOOMTIMER then
tnt.boom(self.object:get_pos(), nil, self.object)
mcl_explosions.explode(self.object:get_pos(), 4, { drop_chance = 1.0 }, self.object)
self.object:remove()
end
end
tnt.boom = function(pos, info, tnt_obj)
if not info then info = {} end
local range = info.radius or TNT_RANGE
local damage_range = info.damage_radius or TNT_RANGE
pos.x = math.floor(pos.x+0.5)
pos.y = math.floor(pos.y+0.5)
pos.z = math.floor(pos.z+0.5)
do_tnt_physics(pos, range, tnt_obj)
local meta = minetest.get_meta(pos)
local sound
if not info.sound then
sound = "tnt_explode"
else
sound = info.sound
end
if info.is_tnt == nil then
info.is_tnt = true
end
minetest.sound_play(sound, {pos = pos,gain = 1.0,max_hear_distance = 16,}, true)
local node = minetest.get_node(pos)
if minetest.get_item_group("water") == 1 or minetest.get_item_group("lava") == 1 then
-- Cancel the Explosion
return
end
for x=-range,range do
for y=-range,range do
for z=-range,range do
if x*x+y*y+z*z <= range * range + range then
local np={x=pos.x+x,y=pos.y+y,z=pos.z+z}
local n = minetest.get_node(np)
local def = minetest.registered_nodes[n.name]
-- Simple blast resistance check (for now). This keeps the important blocks like bedrock, command block, etc. intact.
-- TODO: Implement the real blast resistance algorithm
if def and n.name ~= "air" and n.name ~= "ignore" and (def._mcl_blast_resistance == nil or def._mcl_blast_resistance < 1000) then
activate_if_tnt(n.name, np, pos, 3)
if (not tnt_griefing) and info.is_tnt ~= false then
-- No-op
-- Custom blast function defined by node.
-- Node removal and drops must be handled manually.
elseif def.on_blast then
def.on_blast(np, 1.0)
-- Default destruction handling: Remove nodes, drop items
else
minetest.remove_node(np)
minetest.check_for_falling(np)
if n.name ~= "mcl_tnt:tnt" and math.random() > 0.9 then
local drop = minetest.get_node_drops(n.name, "")
for _,item in ipairs(drop) do
if type(item) == "string" then
if math.random(1,100) > 40 then
local obj = minetest.add_item(np, item)
end
end
end
end
end
end
end
end
end
add_effects(pos, range, {})
end
end
minetest.register_entity("mcl_tnt:tnt", TNT)
if minetest.get_modpath("mcl_mobitems") then

View File

@ -166,7 +166,7 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory
fixed = take
},
sounds = sounds,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})
@ -193,7 +193,7 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory
fixed = {pillar, full_blocks[1]}
},
sounds = sounds,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})
-- Add entry alias for the Help
@ -218,7 +218,7 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory
fixed = {pillar, full_blocks[2]}
},
sounds = sounds,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})
-- Add entry alias for the Help
@ -249,7 +249,7 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory
collisionbox = {-0.2, 0, -0.2, 0.2, 1.4, 0.2},
on_construct = update_wall,
sounds = sounds,
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 2,
})
if source then

View File

@ -63,7 +63,7 @@ for _, row in ipairs(wool.dyes) do
groups = {handy=1,shearsy_wool=1, flammable=1,fire_encouragement=30, fire_flammability=60, wool=1,building_block=1,[color_group]=1},
sounds = mcl_sounds.node_sound_wool_defaults(),
_mcl_hardness = 0.8,
_mcl_blast_resistance = 4,
_mcl_blast_resistance = 0.8,
})
minetest.register_node("mcl_wool:"..name.."_carpet", {
description = desc_carpet,
@ -89,7 +89,7 @@ for _, row in ipairs(wool.dyes) do
},
},
_mcl_hardness = 0.1,
_mcl_blast_resistance = 0.5,
_mcl_blast_resistance = 0.1,
})
if mod_doc and not is_canonical then
doc.add_entry_alias("nodes", "mcl_wool:"..canonical_color, "nodes", "mcl_wool:"..name)

View File

@ -202,7 +202,7 @@ local pane = function(description, node, append)
{node, node, node},
},
drop = "",
_mcl_blast_resistance = 1.5,
_mcl_blast_resistance = 0.3,
_mcl_hardness = 0.3,
})
@ -225,7 +225,7 @@ xpanes.register_pane("bar", {
{"mcl_core:iron_ingot", "mcl_core:iron_ingot", "mcl_core:iron_ingot"},
{"mcl_core:iron_ingot", "mcl_core:iron_ingot", "mcl_core:iron_ingot"},
},
_mcl_blast_resistance = 30,
_mcl_blast_resistance = 6,
_mcl_hardness = 5,
})