[SOLVED] How does one create a block break particle effect?
#5
I think it might be possible. I think that the cWorld:BroadcastParticleEffect() function needs to be changed to put in block ID for the effect "blockdust" I can do this:

function OnPlayerRightClick(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, CursorY, CursorZ)
	if BlockFace == BLOCK_FACE_NONE then
		return false
	end
	local vec = Player:GetPosition() + Player:GetLookVector()
	Player:GetWorld():BroadcastParticleEffect("blockdust", vec.x, vec.y, vec.z, 0, 0, 0, 0, 1)
	return false
end

...but I run into protocol errors where the client gets kicked. The client spits out:
java.lang.IndexOutOfBoundsException: readerIndex(38) + length(1) exceeds writerIndex(38)

So it could probably be done without sound. I'm not a protocol expert though, so what I'm spouting out could be crap. Tongue
Reply
Thanks given by:


Messages In This Thread
RE: [SOLVED] How does one create a block break particle effect? - by DiamondToaster - 05-05-2015, 07:29 AM



Users browsing this thread: 1 Guest(s)