mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-18 14:01:13 +00:00
place block with empty hand crash fixed
This commit is contained in:
parent
31f7946437
commit
874cce85bd
1 changed files with 1 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ module.exports=inject;
|
|||
function inject(serv,player)
|
||||
{
|
||||
player._client.on("block_place",function(packet){
|
||||
if(packet.direction==-1) return;
|
||||
if(packet.direction==-1 || packet.heldItem.blockId==-1) return;
|
||||
var referencePosition=new vec3(packet.location.x,packet.location.y,packet.location.z);
|
||||
var directionVector=directionToVector[packet.direction];
|
||||
var placedPosition=referencePosition.plus(directionVector);
|
||||
|
|
|
|||
Loading…
Reference in a new issue