basic digging implementation

This commit is contained in:
Romain Beaumont 2015-08-27 01:56:26 +02:00
parent f5963eb2d7
commit 757b049c15

View file

@ -0,0 +1,16 @@
module.exports=inject;
function inject(serv,player)
{
// doesn't check whether the player actually wait the correct time
player._client.on("block_dig",function(packet){
if(packet.status==2)
{
player._writeOthers("block_change",{
location:packet.location,
type:0
});
serv.world.setBlockType(packet.location.x,packet.location.y,packet.location.z,0);
}
});
}