Added more entity's properties into initial_properties table.

This commit is contained in:
James David Clarke 2024-01-15 03:19:08 +00:00 committed by the-real-herowl
parent 76d7f9f349
commit e5f931a0ea
5 changed files with 28 additions and 26 deletions
mods
ENTITIES/mobs_mc
ENVIRONMENT/mcl_raids
ITEMS
mcl_banners
mcl_end

View file

@ -116,10 +116,8 @@ mcl_mobs.register_mob("mobs_mc:rover", {
can_despawn = true,
passive = true,
pathfinding = 1,
initial_properties = {
hp_min = 40,
hp_max = 40
},
hp_min = 40,
hp_max = 40,
xp_min = 5,
xp_max = 5,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 2.89, 0.3},

View file

@ -12,12 +12,14 @@ 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", {
pointable = false,
visual = "mesh",
mesh = "mobs_mc_spider.b3d",
visual_size = {x=1.01/3, y=1.01/3},
textures = {
"mobs_mc_spider_eyes.png",
initial_properties = {
pointable = false,
visual = "mesh",
mesh = "mobs_mc_spider.b3d",
visual_size = {x=1.01/3, y=1.01/3},
textures = {
"mobs_mc_spider_eyes.png",
},
},
on_step = function(self)
if self and self.object then

View file

@ -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

View file

@ -613,13 +613,15 @@ end
-- Banner entities.
local entity_standing = {
physical = false,
collide_with_objects = false,
visual = "mesh",
mesh = "amc_banner.b3d",
visual_size = { x=2.499, y=2.499 },
textures = {mcl_banners.make_banner_texture()},
pointable = false,
initial_properties = {
physical = false,
collide_with_objects = false,
visual = "mesh",
mesh = "amc_banner.b3d",
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,
})

View file

@ -2,12 +2,13 @@
local S = minetest.get_translator(minetest.get_current_modname())
minetest.register_entity("mcl_end:ender_eye", {
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,
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)