Page 1 of 1

Why doesn't this change the entity's selection box size?

PostPosted: Sun Jan 06, 2019 20:10
by Piezo_
So, I've tried adding this to the "drops" mod to disable the outline around items, because they're useless now that I've already disabled the old pickup system by removing the item's on_punch code.

minetest.registered_entities["__builtin:item"].selectionbox = {0.0,0.0,0.0,0.0,0.0,0.0}
This is in init.lua's global scope, before any other code runs.

I've tried several variants of this, including using 'collisionbox', but it just doesn't work.
I haven't tried re-registering __builtin:item with my own definition, but I would rather not if there's a better way.

Re: Why doesn't this change the entity's selection box size?

PostPosted: Sun Jan 06, 2019 20:29
by Napiophelios
have you tried:
Code: Select all
#    Show entity selection boxes
#    type: bool
# show_entity_selectionbox = true

Re: Why doesn't this change the entity's selection box size?

PostPosted: Sun Jan 06, 2019 21:16
by Piezo_
Napiophelios wrote:have you tried:
Code: Select all
#    Show entity selection boxes
#    type: bool
# show_entity_selectionbox = true

Is this a global setting, or an entity property?
EDIT: Seems it's a setting. Well, this doesn't solve the problem, but it's very helpful nonetheless, so I've added it to my minetest.conf.

Re: Why doesn't this change the entity's selection box size?

PostPosted: Tue Jan 08, 2019 12:45
by AiTechEye
try
Code: Select all
minetest.after(0.1, function()
   minetest.registered_entities["__builtin:item"].on_activate2=minetest.registered_entities["__builtin:item"].on_activate
   minetest.registered_entities["__builtin:item"].on_activate=function(self, staticdata,time)
      minetest.registered_entities["__builtin:item"].on_activate2(self, staticdata,time)
         minetest.after(0, function(self)
            if self and self.object then
               self.object:set_properties({
                  collisionbox={0,0,0,0,0,0},
               })
            end
         end,self)
      return self
   end
end)