forked from VoxeLibre/VoxeLibre
Added more entity's properties into initial_properties table.
This commit is contained in:
parent
3cf8655b4e
commit
a05a52c217
|
@ -31,12 +31,14 @@ local place_frequency_min = 235
|
|||
local place_frequency_max = 245
|
||||
|
||||
minetest.register_entity("mobs_mc:ender_eyes", {
|
||||
initial_properties = {
|
||||
visual = "mesh",
|
||||
mesh = "mobs_mc_spider.b3d",
|
||||
visual_size = {x=1.01/3, y=1.01/3},
|
||||
textures = {
|
||||
"mobs_mc_enderman_eyes.png",
|
||||
},
|
||||
},
|
||||
on_step = function(self)
|
||||
if self and self.object then
|
||||
if not self.object:get_attach() then
|
||||
|
|
|
@ -12,6 +12,7 @@ local S = minetest.get_translator("mobs_mc")
|
|||
|
||||
-- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture)
|
||||
minetest.register_entity("mobs_mc:spider_eyes", {
|
||||
initial_properties = {
|
||||
pointable = false,
|
||||
visual = "mesh",
|
||||
mesh = "mobs_mc_spider.b3d",
|
||||
|
@ -19,6 +20,7 @@ minetest.register_entity("mobs_mc:spider_eyes", {
|
|||
textures = {
|
||||
"mobs_mc_spider_eyes.png",
|
||||
},
|
||||
},
|
||||
on_step = function(self)
|
||||
if self and self.object then
|
||||
if not self.object:get_attach() then
|
||||
|
|
|
@ -72,7 +72,7 @@ local oban_layers = {
|
|||
|
||||
|
||||
local oban_def = table.copy(minetest.registered_entities["mcl_banners:standing_banner"])
|
||||
oban_def.visual_size = { x=1, y=1 }
|
||||
oban_def.initial_properties.visual_size = { x=1, y=1 }
|
||||
local old_step = oban_def.on_step
|
||||
oban_def.on_step = function(self,dtime)
|
||||
if not self.object:get_attach() then return self.object:remove() end
|
||||
|
|
|
@ -613,6 +613,7 @@ end
|
|||
|
||||
-- Banner entities.
|
||||
local entity_standing = {
|
||||
initial_properties = {
|
||||
physical = false,
|
||||
collide_with_objects = false,
|
||||
visual = "mesh",
|
||||
|
@ -620,6 +621,7 @@ local entity_standing = {
|
|||
visual_size = { x=2.499, y=2.499 },
|
||||
textures = {mcl_banners.make_banner_texture()},
|
||||
pointable = false,
|
||||
},
|
||||
|
||||
_base_color = nil, -- base color of banner
|
||||
_layers = nil, -- table of layers painted over the base color.
|
||||
|
@ -663,7 +665,7 @@ local entity_standing = {
|
|||
minetest.register_entity("mcl_banners:standing_banner", entity_standing)
|
||||
|
||||
local entity_hanging = table.copy(entity_standing)
|
||||
entity_hanging.mesh = "amc_banner_hanging.b3d"
|
||||
entity_hanging.initial_properties.mesh = "amc_banner_hanging.b3d"
|
||||
minetest.register_entity("mcl_banners:hanging_banner", entity_hanging)
|
||||
|
||||
-- FIXME: Prevent entity destruction by /clearobjects
|
||||
|
@ -682,4 +684,3 @@ minetest.register_craft({
|
|||
recipe = "group:banner",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ S("Arrows might get stuck on solid blocks and can be retrieved again. They are a
|
|||
})
|
||||
|
||||
local ARROW_ENTITY={
|
||||
initial_properties = {
|
||||
physical = true,
|
||||
pointable = false,
|
||||
visual = "mesh",
|
||||
|
@ -65,6 +66,7 @@ local ARROW_ENTITY={
|
|||
textures = {"mcl_bows_arrow.png"},
|
||||
collisionbox = {-0.19, -0.125, -0.19, 0.19, 0.125, 0.19},
|
||||
collide_with_objects = false,
|
||||
},
|
||||
_fire_damage_resistant = true,
|
||||
|
||||
_lastpos={},
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
minetest.register_entity("mcl_end:ender_eye", {
|
||||
initial_properties = {
|
||||
physical = false,
|
||||
textures = {"mcl_end_ender_eye.png"},
|
||||
visual_size = {x=1.5, y=1.5},
|
||||
collisionbox = {0,0,0,0,0,0},
|
||||
pointable = false,
|
||||
|
||||
},
|
||||
-- Save and restore age
|
||||
get_staticdata = function(self)
|
||||
return tostring(self._age)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
local bobber_ENTITY={
|
||||
initial_properties = {
|
||||
physical = false,
|
||||
timer=0,
|
||||
textures = {"mcl_fishing_bobber.png"},
|
||||
|
@ -10,6 +11,7 @@ local bobber_ENTITY={
|
|||
collisionbox = {0.45,0.45,0.45,0.45,0.45,0.45},
|
||||
pointable = false,
|
||||
static_save = false,
|
||||
},
|
||||
|
||||
_lastpos={},
|
||||
_dive = false,
|
||||
|
@ -308,12 +310,14 @@ bobber_ENTITY.on_step = bobber_on_step
|
|||
minetest.register_entity("mcl_fishing:bobber_entity", bobber_ENTITY)
|
||||
|
||||
local flying_bobber_ENTITY={
|
||||
initial_properties = {
|
||||
physical = false,
|
||||
timer=0,
|
||||
textures = {"mcl_fishing_bobber.png"}, --FIXME: Replace with correct texture.
|
||||
visual_size = {x=0.5, y=0.5},
|
||||
collisionbox = {0,0,0,0,0,0},
|
||||
pointable = false,
|
||||
},
|
||||
|
||||
get_staticdata = mcl_throwing.get_staticdata,
|
||||
on_activate = mcl_throwing.on_activate,
|
||||
|
|
|
@ -28,11 +28,13 @@ end)
|
|||
-- This defines the text entity for the lettering of the sign.
|
||||
-- FIXME: Prevent entity destruction by /clearobjects
|
||||
minetest.register_entity("mcl_signs:text", {
|
||||
initial_properties = {
|
||||
pointable = false,
|
||||
visual = "upright_sprite",
|
||||
textures = {},
|
||||
physical = false,
|
||||
collide_with_objects = false,
|
||||
},
|
||||
|
||||
_signnodename = nil, -- node name of sign node to which the text belongs
|
||||
|
||||
|
|
|
@ -362,6 +362,7 @@ mcl_signs.wall_standard = {
|
|||
}
|
||||
-- standing sign base (definition)
|
||||
mcl_signs.standing_standard = {
|
||||
initial_properties = {
|
||||
paramtype = "light",
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
|
||||
sunlight_propagates = true,
|
||||
|
@ -376,6 +377,7 @@ mcl_signs.standing_standard = {
|
|||
drop = "mcl_signs:wall_sign",
|
||||
stack_max = 16,
|
||||
sounds = node_sounds,
|
||||
},
|
||||
|
||||
on_destruct = function(pos)
|
||||
mcl_signs:destruct_sign(pos)
|
||||
|
|
|
@ -7,12 +7,14 @@ local mod_target = minetest.get_modpath("mcl_target")
|
|||
|
||||
-- The snowball entity
|
||||
local snowball_ENTITY={
|
||||
initial_properties = {
|
||||
physical = false,
|
||||
timer=0,
|
||||
textures = {"mcl_throwing_snowball.png"},
|
||||
visual_size = {x=0.5, y=0.5},
|
||||
collisionbox = {0,0,0,0,0,0},
|
||||
pointable = false,
|
||||
},
|
||||
|
||||
get_staticdata = mcl_throwing.get_staticdata,
|
||||
on_activate = mcl_throwing.on_activate,
|
||||
|
@ -22,12 +24,14 @@ local snowball_ENTITY={
|
|||
}
|
||||
|
||||
local egg_ENTITY={
|
||||
initial_properties = {
|
||||
physical = false,
|
||||
timer=0,
|
||||
textures = {"mcl_throwing_egg.png"},
|
||||
visual_size = {x=0.45, y=0.45},
|
||||
collisionbox = {0,0,0,0,0,0},
|
||||
pointable = false,
|
||||
},
|
||||
|
||||
get_staticdata = mcl_throwing.get_staticdata,
|
||||
on_activate = mcl_throwing.on_activate,
|
||||
|
@ -38,12 +42,14 @@ local egg_ENTITY={
|
|||
|
||||
-- Ender pearl entity
|
||||
local pearl_ENTITY={
|
||||
initial_properties = {
|
||||
physical = false,
|
||||
timer=0,
|
||||
textures = {"mcl_throwing_ender_pearl.png"},
|
||||
visual_size = {x=0.9, y=0.9},
|
||||
collisionbox = {0,0,0,0,0,0},
|
||||
pointable = false,
|
||||
},
|
||||
|
||||
get_staticdata = mcl_throwing.get_staticdata,
|
||||
on_activate = mcl_throwing.on_activate,
|
||||
|
|
|
@ -115,6 +115,7 @@ minetest.register_node("mcl_tnt:tnt", {
|
|||
|
||||
local TNT = {
|
||||
-- Static definition
|
||||
initial_properties = {
|
||||
physical = true, -- Collides with things
|
||||
--weight = -100,
|
||||
collisionbox = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
|
||||
|
@ -132,6 +133,7 @@ local TNT = {
|
|||
blinktimer = 0,
|
||||
tnt_knockback = true,
|
||||
blinkstatus = true,
|
||||
},
|
||||
}
|
||||
|
||||
function TNT:on_activate(_, _)
|
||||
|
|
Loading…
Reference in New Issue