Cuberite Forum

Full Version: Prevent flying blocks from landing in area
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there currently any way to prevent flying blocks (from explosions) from landing in a specific area?
You could use the OnExploding hook to detect them.
(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.
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
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.