Prevent flying blocks from landing in area
#1
Is there currently any way to prevent flying blocks (from explosions) from landing in a specific area?
Reply
Thanks given by:
#2
You could use the OnExploding hook to detect them.
Reply
Thanks given by:
#3
(09-29-2016, 01:22 AM)NiLSPACE Wrote: You could use the OnExploding hook to detect them.

Do you have any code examples? I know that I can disable flying/falling blocks completely, but I'd like to make them disappear only when hitting the ground in a protected area.
Reply
Thanks given by:
#4
Something like this
function OnExploding(World, ExplosionSize, CanCauseFire, X, Y, Z, Source, SourceData)
	if (--[[Explosion is not in protected area]]) then
		return false;
	end
	return true
end
Reply
Thanks given by:
#5
That wouldn't help if the explosion is close to a protected area - the shrapnel can fly into the protected area even from an outside explosion.

As far as I know there's currently no way to block it; file a (request) issue at github.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)