Cuberite Forum

Full Version: blocking fire spreading doesn't work (or Im doing bad)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Try to the set the fire block back to air ( World:SetBlock )
That should not be necessary, the callback should fully block the action. If not, it's a bug in MCS.
(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.