voxel / voxel-clientmc

Minecraft client using WebSockets and voxel-engine (voxel.js plugin)
57 stars 13 forks source link

Send start/stop mining block_dig events to server, in sync with player actions, instead of mineflayer dig() #51

Open deathcap opened 8 years ago

deathcap commented 8 years ago

Currently when you click a block, voxel-clientmc will call mineflayer's dig() method, which handles starting and stopping digging. So you only need to hit it once, then mining will occur after it is complete, regardless of whether you continue mining. What should happen is when the player starts mining, it sends block_dig with digging start, and block_dig with digging stop when the player stops, so that if you do not fully mine the block client-side, is it not mined server-side.