forked from mtcontrib/mobs_monster
Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev
This commit is contained in:
commit
55d3d4b547
@ -116,6 +116,9 @@ local old_handle_node_drops = minetest.handle_node_drops
|
|||||||
|
|
||||||
function minetest.handle_node_drops(pos, drops, digger)
|
function minetest.handle_node_drops(pos, drops, digger)
|
||||||
|
|
||||||
|
-- does player exist?
|
||||||
|
if not digger then return end
|
||||||
|
|
||||||
-- are we holding Lava Pick?
|
-- are we holding Lava Pick?
|
||||||
if digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then
|
if digger:get_wielded_item():get_name() ~= ("mobs:pick_lava") then
|
||||||
return old_handle_node_drops(pos, drops, digger)
|
return old_handle_node_drops(pos, drops, digger)
|
||||||
|
@ -3,7 +3,8 @@ local S = mobs.intllib
|
|||||||
|
|
||||||
|
|
||||||
-- custom particle effects
|
-- custom particle effects
|
||||||
local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow)
|
local effect = function(
|
||||||
|
pos, amount, texture, min_size, max_size, radius, gravity, glow)
|
||||||
|
|
||||||
radius = radius or 2
|
radius = radius or 2
|
||||||
min_size = min_size or 0.5
|
min_size = min_size or 0.5
|
||||||
|
@ -5,6 +5,9 @@ local get_velocity = function(self)
|
|||||||
|
|
||||||
local v = self.object:get_velocity()
|
local v = self.object:get_velocity()
|
||||||
|
|
||||||
|
-- sanity check
|
||||||
|
if not v then return 0 end
|
||||||
|
|
||||||
return (v.x * v.x + v.z * v.z) ^ 0.5
|
return (v.x * v.x + v.z * v.z) ^ 0.5
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -120,6 +123,9 @@ mobs:register_mob("mobs_monster:spider", {
|
|||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
local yaw = self.object:get_yaw()
|
local yaw = self.object:get_yaw()
|
||||||
|
|
||||||
|
-- sanity check
|
||||||
|
if not yaw then return end
|
||||||
|
|
||||||
pos.y = pos.y + self.collisionbox[2] - 0.2
|
pos.y = pos.y + self.collisionbox[2] - 0.2
|
||||||
|
|
||||||
local dir_x = -math.sin(yaw) * (self.collisionbox[4] + 0.5)
|
local dir_x = -math.sin(yaw) * (self.collisionbox[4] + 0.5)
|
||||||
@ -160,7 +166,7 @@ mobs:spawn({
|
|||||||
name = "mobs_monster:spider",
|
name = "mobs_monster:spider",
|
||||||
nodes = {
|
nodes = {
|
||||||
"default:dirt_with_rainforest_litter", "default:snowblock",
|
"default:dirt_with_rainforest_litter", "default:snowblock",
|
||||||
"default:snow", "ethereal:crystal_dirt"
|
"default:snow", "ethereal:crystal_dirt", "ethereal:cold_dirt"
|
||||||
},
|
},
|
||||||
min_light = 0,
|
min_light = 0,
|
||||||
max_light = 8,
|
max_light = 8,
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Loading…
Reference in New Issue
Block a user