}
}
if(!hasBalloon)
{
source.getWorld().spawnEntityInWorld(new EntityBalloon(entity, getColor(stack)));
latched = true;
}
}
if(!latched)
{
Pos3D pos = new Pos3D(coord);
switch(side)
{
case DOWN:
pos.translate(0, -2.5, 0);
break;
case UP:
pos.translate(0, 0, 0);
break;
case NORTH:
pos.translate(0, -1, -0.5);
break;
case SOUTH:
pos.translate(0, -1, 0.5);
break;
case WEST:
pos.translate(-0.5, -1, 0);
break;
case EAST:
pos.translate(0.5, -1, 0);
break;
}
if(!source.getWorld().isRemote)
{
source.getWorld().spawnEntityInWorld(new EntityBalloon(source.getWorld(), pos.xPos, pos.yPos, pos.zPos, getColor(stack)));
}
}
stack.stackSize--;
return stack;