Cuberite Forum
blocking fire spreading doesn't work (or Im doing bad) - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html)
+--- Thread: blocking fire spreading doesn't work (or Im doing bad) (/thread-1487.html)



blocking fire spreading doesn't work (or Im doing bad) - tonibm19 - 06-15-2014

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


RE: blocking fire spreading doesn't work (or Im doing bad) - LO1ZB - 06-15-2014

Try to the set the fire block back to air ( World:SetBlock )


RE: blocking fire spreading doesn't work (or Im doing bad) - xoft - 06-15-2014

That should not be necessary, the callback should fully block the action. If not, it's a bug in MCS.


RE: blocking fire spreading doesn't work (or Im doing bad) - tonibm19 - 06-15-2014

(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.