blocking fire spreading doesn't work (or Im doing bad)
#1
function Initialize(Plugin)
	Plugin:SetName("NoFireSpread")
	Plugin:SetVersion(1)

	cPluginManager.AddHook(cPluginManager.HOOK_BLOCK_SPREAD, OnBlockSpread)

	LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
	return true
end




function OnBlockSpread(World, BlockX, BlockY, BlockZ, Source)
	print("spreading")
	if (Source == ssFireSpread) then
	    print("spreading fire!!")
	    return true
	end
end

Am I doing something wrong Sad? I dont find any error.
Fire still spreads, and I get "spreading fire" message
Reply
Thanks given by:
#2
Try to the set the fire block back to air ( World:SetBlock )
Reply
Thanks given by:
#3
That should not be necessary, the callback should fully block the action. If not, it's a bug in MCS.
Reply
Thanks given by:
#4
(06-15-2014, 06:20 AM)LO1ZB Wrote: Try to the set the fire block back to air ( World:SetBlock )
But then fire damages the world. I want ot to not do that, only fire one block.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)