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

Post Reply
User avatar
Piezo_
Member
Posts: 219
Joined: Fri Jul 20, 2018 21:36
GitHub: is proprietary I use NotABug
Location: (x,y,z)

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

by Piezo_ » Post

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.
while (true) { suffer(); }

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

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

by Napiophelios » Post

have you tried:

Code: Select all

#    Show entity selection boxes
#    type: bool
# show_entity_selectionbox = true

User avatar
Piezo_
Member
Posts: 219
Joined: Fri Jul 20, 2018 21:36
GitHub: is proprietary I use NotABug
Location: (x,y,z)

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

by Piezo_ » Post

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.
while (true) { suffer(); }

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

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

by AiTechEye » Post

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)

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests