deathcap
deathcap
Maybe not strictly necessary, the current default is actually (in clientmc.js): ``` javascript opts.url = opts.url || 'ws://'+document.location.hostname+':24444/server'; ``` with the intention that servers will run their own wsmc plugins...
To allow loading voxel-clientmc as a plugin in other apps (e.g. https://github.com/deathcap/voxelmetaverse), could perhaps default `opts.url` to undefined and if unspecified prompt the user, but set it to `'ws://'+document.location.hostname+':24444/server'` in...
Interesting, if cheesebot was able to use mineflayer in nw.js, probably could just drop all the wsmc stuff for the nw port and use it natively, connecting to voxel.js. Or...
This probably requires GH-10 Client positioning, since the server won't let clients mine any arbitrary block (must be within a certain radius?)
yup, from http://wiki.vg/Protocol#Player_Digging: > Player Digging > Sent when the player mines a block. A Notchian server only accepts digging packets with coordinates within a 6-unit radius of the player's...
Added showing server-side block destroy animations (from other players) as of https://github.com/deathcap/voxel-clientmc/commit/26891ae3661bd0d3fb975528f9c47494c8a5a0b6, some progress on client block digging. Calling from voxel-reach start mining event: ``` javascript self.digStart = function(event) {...
Yeah I have my own logic on the client-side for block 'hardness' = mining time, I think it is shorter than the server expects which may be causing these conflicts.
Since have changed to use mineflayer dig() API: ``` javascript self.digStart = function(event) { var block = self.bot.blockAt(vec3Object(event.position[0], event.position[1], event.position[2])); if (!block) return; self.bot.dig(block, function(err) { console.log('dig:',err); }); ``` I...
start/stop mining (voxel.js, or more specifically [voxel-mine](https://github.com/voxel/voxel-mine) events) is seemingly triggered repeatedly - this is for holding down the left mouse button once: ``` start mining Object {voxel: Array[3], adjacent:...
Actually this works (able to mine blocks, pickup the item drops, and place blocks), the failure I was seeing was caused by the client being located in the spawn area...