05-05-2015, 07:29 AM
(This post was last modified: 05-05-2015, 07:32 AM by DiamondToaster.)
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:
...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.
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.